[PATCH 2/3] Fix sed usage in tests to work around broken xpg4/sed on Solaris

2015-07-19 Thread Ben Walton
-by: Ben Walton bdwal...@gmail.com --- t/t5601-clone.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh index 8299d14..8b7f8e1 100755 --- a/t/t5601-clone.sh +++ b/t/t5601-clone.sh @@ -445,7 +445,7 @@ test_expect_success 'clone ssh://host.xz:22

Adapt some tests to work around broken Solaris tools

2015-07-19 Thread Ben Walton
This series is a respin of the previous submission, taking feedback into account. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 3/3] Fix sed usage in tests to work around broken xpg4/sed on Solaris

2015-07-19 Thread Ben Walton
of the file and exits with status 2. % echo CHANGE_ME | \ tr -d \\012 | /usr/xpg4/bin/sed -e 's/CHANGE_ME/change_me/' sed: Missing newline at end of file standard input. change_me % echo $? 2 To work around this, use perl to perform the substitution instead. Signed-off-by: Ben Walton bdwal...@gmail.com

[PATCH 1/3] Modify tr expressions so that xpg4/tr handles it on Solaris

2015-07-19 Thread Ben Walton
of [ and ] instead. Reference the octal expression as a newly exported variable so that it's shared across tests and more easily understood when reading it. Signed-off-by: Ben Walton bdwal...@gmail.com --- t/t5500-fetch-pack.sh | 2 +- t/t5601-clone.sh | 8 t/test-lib.sh | 5 - 3

[PATCH 2/2] Fix sed usage in tests to work around broken xpg4/sed on Solaris

2015-07-18 Thread Ben Walton
subsequently drop the mv command. Signed-off-by: Ben Walton bdwal...@gmail.com --- t/t5601-clone.sh |2 +- t/t9500-gitweb-standalone-no-errors.sh |3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh index fa6be3c

[PATCH 1/2] Modify tr expression so that xpg4/tr handles it on Solaris

2015-07-18 Thread Ben Walton
of [ and ] instead. Signed-off-by: Ben Walton bdwal...@gmail.com --- t/t5500-fetch-pack.sh |2 +- t/t5601-clone.sh |8 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh index 3a9b775..5bc4da9 100755 --- a/t/t5500-fetch-pack.sh

[PATCH] Use unsigned char to squash compiler warnings

2015-03-02 Thread Ben Walton
or another option at build time, declare tolower_trans_tbl as unsigned char. Update all appropriate references to the new type. Signed-off-by: Ben Walton bdwal...@gmail.com --- ctype.c | 2 +- git-compat-util.h | 2 +- kwset.c | 8 kwset.h | 2 +- 4 files changed, 7

[PATCH] Use wc instead of awk to count subtrees in t0090-cache-tree

2014-12-22 Thread Ben Walton
And with GNU awk for comparison: echo dir | /opt/csw/gnu/awk -v c=0 '$1 {++c} END {print c}' 1 Instead of modifying the awk code to work, use wc -w instead as that is both adequate and simpler. Signed-off-by: Ben Walton bdwal...@gmail.com --- t/t0090-cache-tree.sh | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH] Ensure SHELL_PATH is the hash bang for test suite askpass helper script.

2014-09-29 Thread Ben Walton
the chmod step as well, since write_script handles that. Signed-off-by: Ben Walton bdwal...@gmail.com --- t/lib-credential.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/t/lib-credential.sh b/t/lib-credential.sh index 9e7d796..d8e41f7 100755 --- a/t/lib-credential.sh

[PATCH] Do not make trace.c/getnanotime an inlined function

2014-09-28 Thread Ben Walton
Oracle Studio compilers don't allow for static variables in functions that are defined to be inline. GNU C does permit this. Let's reference the C99 standard though, which doesn't allow for inline functions to contain modifiable static variables. Signed-off-by: Ben Walton bdwal...@gmail.com

[PATCH] Use SHELL_PATH as hash bang in test suite askpass helper script.

2014-09-28 Thread Ben Walton
The askpass script that is created for use by the test suite should use SHELL_PATH for its hash bang instead of /bin/sh. Commit 5a4352024 introduced the use of idioms not supported in some legacy /bin/sh implementations. Signed-off-by: Ben Walton bdwal...@gmail.com --- t/lib-credential.sh | 4

[PATCH] Fix a bug in compat/bswap.h endianness detection

2014-05-30 Thread Ben Walton
. Signed-off-by: Ben Walton bdwal...@gmail.com --- I think that this should be applied to cb/byte-swap and re-merged with next. compat/bswap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compat/bswap.h b/compat/bswap.h index c4293db..f6fd9a6 100644 --- a/compat/bswap.h +++ b

[PATCH] Change sed i\ usage to something Solaris' sed can handle

2013-11-03 Thread Ben Walton
Solaris' sed was choking on the i\ commands used in t4015-diff-whitespace as it couldn't parse the program properly. Modify two uses of sed that worked in GNU sed but not Solaris' (/usr/bin or /usr/xpg4/bin) to an equivalent form that is handled properly by both. Signed-off-by: Ben Walton bdwal

Re: [PATCH] Avoid broken Solaris tr

2013-10-28 Thread Ben Walton
On Tue, Jun 18, 2013 at 11:31 PM, Junio C Hamano gits...@pobox.com wrote: Sorry for the very slow reply. This got lost in my inbox and I forgot about it. Ben Walton bdwal...@gmail.com writes: Solaris' tr (both /usr/bin/ and /usr/xpg4/bin) fail to handle the case where the first argument

[PATCH] Avoid difference in tr semantics between System V and BSD

2013-10-28 Thread Ben Walton
broken_c_unquote. Replace the other two identical transforms with a fuction named broken_c_unquote_verbose. Signed-off-by: Ben Walton bdwal...@gmail.com --- t/t0008-ignores.sh | 30 ++ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/t/t0008-ignores.sh b/t/t0008

Re: [PATCH] Avoid difference in tr semantics between System V and BSD

2013-10-28 Thread Ben Walton
I'm happy to defer to your judgement on this - If you'd like the tests wrapped, I'll do so. Thanks -Ben On Mon, Oct 28, 2013 at 7:08 PM, Junio C Hamano gits...@pobox.com wrote: Jonathan Nieder jrnie...@gmail.com writes: Johannes Sixt wrote: In other tests, we check for prerequisite PERL,

Re: [PATCH] Change sed i\ usage to something Solaris' sed can handle

2013-10-28 Thread Ben Walton
On Mon, Oct 28, 2013 at 5:39 PM, Andreas Schwab sch...@linux-m68k.org wrote: Ben Walton bdwal...@gmail.com writes: diff --git a/t/t4015-diff-whitespace.sh b/t/t4015-diff-whitespace.sh index 3fb4b97..0126154 100755 --- a/t/t4015-diff-whitespace.sh +++ b/t/t4015-diff-whitespace.sh @@ -145,7

Re: [PATCH] Avoid difference in tr semantics between System V and BSD

2013-10-28 Thread Ben Walton
On Mon, Oct 28, 2013 at 9:04 PM, Ben Walton bdwal...@gmail.com wrote: I'm happy to defer to your judgement on this - If you'd like the tests wrapped, I'll do so. Thanks -Ben On Mon, Oct 28, 2013 at 7:08 PM, Junio C Hamano gits...@pobox.com wrote: Jonathan Nieder jrnie...@gmail.com writes

[PATCH] Avoid difference in tr semantics between System V and BSD

2013-10-28 Thread Ben Walton
broken_c_unquote. Replace the other two identical transforms with a fuction named broken_c_unquote_verbose. Signed-off-by: Ben Walton bdwal...@gmail.com --- t/t0008-ignores.sh | 30 ++ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/t/t0008-ignores.sh b/t/t0008

Re: [PATCH] t/README: tests can use perl even with NO_PERL

2013-10-28 Thread Ben Walton
On Mon, Oct 28, 2013 at 9:04 PM, Jonathan Nieder jrnie...@gmail.com wrote: Jeff King wrote: Speaking of which, is there any reason to use the ugly $PERL_PATH everywhere, and not simply do: perl () { $PERL_PATH $@ } in test-lib.sh? Sounds like a nice potential improvement to me.

[PATCH] Avoid difference in tr semantics between System V and BSD

2013-10-28 Thread Ben Walton
broken_c_unquote. Replace the other two identical transforms with a fuction named broken_c_unquote_verbose. Signed-off-by: Ben Walton bdwal...@gmail.com --- ...Forgot to quote PERL_PATH in the previous iteration. t/t0008-ignores.sh | 30 ++ 1 file changed, 18 insertions(+), 12

Re: [PATCH] Avoid difference in tr semantics between System V and BSD

2013-10-28 Thread Ben Walton
Ignore this version. The immediate followup quotes PERL_PATH. On Mon, Oct 28, 2013 at 9:40 PM, Ben Walton bdwal...@gmail.com wrote: Solaris' tr (both /usr/bin/ and /usr/xpg4/bin) uses the System V semantics for tr whereby string1's length is truncated to the length of string2 if string2

[PATCH] Change sed i\ usage to something Solaris' sed can handle

2013-10-27 Thread Ben Walton
Solaris' sed was choking on the i\ commands used in t4015-diff-whitespace as it couldn't parse the program properly. Modify two uses of sed that worked in GNU sed but not Solaris' (/usr/bin or /usr/xpg4/bin) to an equivalent form that is handled properly by both. Signed-off-by: Ben Walton bdwal

[PATCH] Avoid broken Solaris tr

2013-06-18 Thread Ben Walton
invocations with it too. We make this change globally in t0008-ignores instead of just for the cases where it matters in order to maintain consistency. Signed-off-by: Ben Walton bdwal...@gmail.com --- t/t0008-ignores.sh | 26 ++ 1 file changed, 14 insertions(+), 12

[PATCH 1/3] Move Git::SVN::get_tz to Git::get_tz_offset

2013-02-09 Thread Ben Walton
. Signed-off-by: Ben Walton bdwal...@gmail.com --- perl/Git.pm | 23 +++ perl/Git/SVN.pm | 12 ++-- perl/Git/SVN/Log.pm |8 ++-- 3 files changed, 31 insertions(+), 12 deletions(-) diff --git a/perl/Git.pm b/perl/Git.pm index 931047c..5649bcc 100644

[PATCH 2/3] Fix get_tz_offset to properly handle DST boundary cases

2013-02-09 Thread Ben Walton
documentation. Modify this algorithm, using an approach suggested by Junio C Hamano that obtains the GMT time stamp by using timegm(localtime()) instead of timelocal(gmtime()). This avoids the ambigious conversion and allows a correct time to be returned on every occassion. Signed-off-by: Ben Walton

[PATCH 0/3] Fix a portability issue with git-cvsimport

2013-02-09 Thread Ben Walton
of get_tz_offset is by git-cvsimport and Git::SVN::Log currently. There are tests that validate it works currently so I didn't add anything additional. If the git-cvsimport tests are removed, there are no tests remaining that exercise the code full as the SVN tests use UTC times. Ben Walton (3

[PATCH 3/3] Avoid non-portable strftime format specifiers in git-cvsimport

2013-02-09 Thread Ben Walton
Neither %s or %z are portable strftime format specifiers. There is no need for %s in git-cvsimport as the supplied time is already in seconds since the epoch. For %z, use the function get_tz_offset provided by Git.pm instead. Signed-off-by: Ben Walton bdwal...@gmail.com --- git-cvsimport.perl

Re: [PATCH 2/3] Allow Git::get_tz_offset to properly handle DST boundary times

2013-01-20 Thread Ben Walton
On Thu, Jan 17, 2013 at 7:09 PM, Junio C Hamano gits...@pobox.com wrote: Ben Walton bdwal...@gmail.com writes: The Git::get_tz_offset is meant to provide a workalike replacement for the GNU strftime %z format specifier. The algorithm used failed to properly handle DST boundary cases

Re: [PATCH 3/3] Avoid non-portable strftime format specifiers in git-cvsimport

2013-01-16 Thread Ben Walton
On Wed, Jan 16, 2013 at 1:53 AM, Chris Rorvick ch...@rorvick.com wrote: On Tue, Jan 15, 2013 at 5:10 PM, Ben Walton bdwal...@gmail.com wrote: Neither %s or %z are portable strftime format specifiers. There is no need for %s in git-cvsimport as the supplied time is already in seconds since

[PATCH 1/3] Move Git::SVN::get_tz to Git::get_tz_offset

2013-01-15 Thread Ben Walton
. Signed-off-by: Ben Walton bdwal...@gmail.com --- perl/Git.pm | 23 +++ perl/Git/SVN.pm | 12 ++-- perl/Git/SVN/Log.pm |8 ++-- 3 files changed, 31 insertions(+), 12 deletions(-) diff --git a/perl/Git.pm b/perl/Git.pm index 931047c..5649bcc 100644

[PATCH 3/3] Avoid non-portable strftime format specifiers in git-cvsimport

2013-01-15 Thread Ben Walton
Neither %s or %z are portable strftime format specifiers. There is no need for %s in git-cvsimport as the supplied time is already in seconds since the epoch. For %z, use the function get_tz_offset provided by Git.pm instead. Signed-off-by: Ben Walton bdwal...@gmail.com --- git-cvsimport.perl

[PATCH 2/3] Allow Git::get_tz_offset to properly handle DST boundary times

2013-01-15 Thread Ben Walton
timelocal(). If the is_dst field of the two times disagree then we must modify the value returned from timelocal() by an hour in the correct direction. Signed-off-by: Ben Walton bdwal...@gmail.com --- perl/Git.pm | 20 1 file changed, 20 insertions(+) diff --git a/perl

[PATCH 0/3] Fix a portability issue with git-cvsimport

2013-01-15 Thread Ben Walton
that as part of this series if it seems the right way to go. Ben Walton (3): Move Git::SVN::get_tz to Git::get_tz_offset Allow Git::get_tz_offset to properly handle DST boundary times Avoid non-portable strftime format specifiers in git-cvsimport git-cvsimport.perl |5 - perl/Git.pm

[PATCH] Avoid using non-POSIX cp options

2013-01-01 Thread Ben Walton
t/3600-rm was using the -a option to cp. This option is a GNU extention and is not portable. Instead, use just -R (no -p necessary). Signed-off-by: Ben Walton bdwal...@gmail.com --- t/t3600-rm.sh |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t/t3600-rm.sh b/t

Re: git config error message

2012-10-27 Thread Ben Walton
On Sat, Oct 27, 2012 at 9:32 AM, Angelo Borsotti angelo.borso...@gmail.com wrote: Hi Angelo, I wrote value, but I meant name. The first example I made contains a name with a nonexistent section, the second a name with a nonexistent key. This still wouldn't be an error condition though,

Re: [PATCH] Fix t9200 on case insensitive file systems

2012-10-27 Thread Ben Walton
On Fri, Oct 26, 2012 at 5:18 PM, Torsten Bögershausen tbo...@web.de wrote: t/t9200-git-cvsexportcommit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh index b59be9a..69934b2 100755 ---

Re: [PATCH] Use character class for sed expression instead of \s

2012-10-25 Thread Ben Walton
Hi Torsten, On Thu, Oct 25, 2012 at 5:28 PM, Torsten Bögershausen tbo...@web.de wrote: BTW: While we are talking CVS: (I installed a fresh version) cvs --version Concurrent Versions System (CVS) 1.11.23 (client/server) I have 1.12.13-MirDebian-8 here. And t9200 fails: git checkout

[PATCH] t/t5400-send-pack: Use POSIX options to cp for portability

2012-10-08 Thread Ben Walton
Avoid a GNU-ism in the cp options used by t5400-send-pack. Change -a to -pR. Signed-off-by: Ben Walton bdwal...@gmail.com --- t/t5400-send-pack.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh index 250c720..65b3b0f 100755

Re: [PATCH] t/t5400-send-pack: Use POSIX options to cp for portability

2012-10-08 Thread Ben Walton
words, how about doing this instead? This works. I was responding to a failing test so I didn't look for other instances. Clearly I should have...I must not be exercising those other tests. Acked-By: Ben Walton bdwal...@gmail.com Thanks -Ben

Re: [PATCH] Remove the hard coded length limit on variable names in config files

2012-09-30 Thread Ben Walton
Hi Michael, The patch doesn't apply to the current master; it appears to have been built against master 883a2a3504 (2012-02-23) or older. It will have to be rebased to the current master. Junio had asked that it be based on maint so that's what I (thought I?) did. I'm happy to redo it

[PATCH] Remove the hard coded length limit on variable names in config files

2012-09-30 Thread Ben Walton
to preserve the external api. None of the external callers rely on the old size limitation for sizing their own buffers so removing the limit should have no externally visible effect. Signed-off-by: Ben Walton bdwal...@gmail.com --- config.c | 59

[PATCH] Remove the hard coded length limit on variable names in config files

2012-09-29 Thread Ben Walton
of the static buffer. Send the buf member of the strbuf to external callback functions to preserve the external api. Signed-off-by: Ben Walton bdwal...@gmail.com --- Hi Junio, (Sorry that this patch took so long to submit. I've been busy moving.) I think this should remove the length limitations

Re: Unable to clone GIT project

2012-09-17 Thread Ben Walton
If I had to guess, I'd say it was ssh, the library is installed in a non-standard place (e.g., because he built them as a regular user and put them in his home directory), and LD_LIBRARY_PATH does not get set properly by ssh for the incoming ssh session. This would be my guess as well. If

[PATCH] Prevent git-config from storing section keys that are too long

2012-09-06 Thread Ben Walton
to t1303-wacky-config to catch any future issues with this check. Signed-off-by: Ben Walton bwal...@artsci.utoronto.ca --- Hi All, I happened to notice this while running the test suite in a deeply nested directory... The check for baselen exceeding half of MAXNAME could be done earlier

Re: [PATCH] Prevent git-config from storing section keys that are too long

2012-09-06 Thread Ben Walton
that same config file. I'll still base the change on maint-1.7.9 as suggested though. Thanks -Ben -- Ben Walton Systems Programmer - CHASS University of Toronto C:416.407.5610 | W:416.978.4302 -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord

Re: [PATCH] Enable HAVE_DEV_TTY for Solaris

2012-08-07 Thread Ben Walton
Excerpts from Jeff King's message of Tue Aug 07 00:10:26 -0400 2012: Signed-off-by: Jeff King p...@peff.net Acked-by: Ben Walton bwal...@artsci.utoronto.ca I agree with your assesment that this is the right way to go (vs migrating out of stdio) for now. If the changes Tay needs to make

Re: [PATCH] Avoid crippled getpass function on Solaris

2012-08-06 Thread Ben Walton
Excerpts from Jeff King's message of Mon Aug 06 17:34:04 -0400 2012: On Mon, Aug 06, 2012 at 05:31:00PM -0400, Ben Walton wrote: I'm happy to spend a few cycles on it. I don't have access to any real Solaris boxes these days, but I imagine I can get OpenSolaris running under

Re: [PATCH] Avoid crippled getpass function on Solaris

2012-08-06 Thread Ben Walton
about a few characters of keyboard input, it should be OK. I noticed the same requirement. I'm currently building/testing a patch that switches from FILE - fd and also to strbuf_getwholeline_fd. Personally, I like this approach more than calling an open function multiple times. Thanks -Ben -- Ben

Re: [PATCH] Avoid crippled getpass function on Solaris

2012-08-06 Thread Ben Walton
Excerpts from Jeff King's message of Mon Aug 06 18:42:22 -0400 2012: +if (strbuf_getwholeline(sb, fd, term)) Shouldn't this be strbuf_getwholeline_fd though? Otherwise, I think this is a good addition. Thanks -Ben -- Ben Walton Systems Programmer - CHASS University of Toronto C

Re: [PATCH] Avoid crippled getpass function on Solaris

2012-08-06 Thread Ben Walton
*git_terminal_prompt(const char *prompt, int echo) r = strbuf_getline(buf, fh, '\n'); if (!echo) { +fseek(fh, SEEK_CUR, 0); putc('\n', fh); fflush(fh); } Acked-by: Ben Walton bwal...@artsci.utoronto.ca That looks good to me. I'm able to clone

[PATCH] Avoid crippled getpass function on Solaris

2012-08-05 Thread Ben Walton
building on Solaris. Signed-off-by: Ben Walton bwal...@artsci.utoronto.ca --- Hi Jeff and Junio, I considered making this minor change a few different ways but settled on this as it seemed (to my eye) to most closely adhere to the way other such things were done in the compatibility code. I'm

Re: [PATCH] Avoid crippled getpass function on Solaris

2012-08-05 Thread Ben Walton
be substituted with something else. Thanks -Ben -- Ben Walton Systems Programmer - CHASS University of Toronto C:416.407.5610 | W:416.978.4302 -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http

Re: Fix git-svn tests for SVN 1.7.5.

2012-07-20 Thread Ben Walton
Hi Michael, I've fixed the git-svn tests for SVN 1.7 and tested with SVN 1.7.5. Thanks. git-svn is not maintained by Junio but by Eric and others on the list. I'm cc-ing Eric and Ben Walton so they can benefit from your work. This is fantastic. It's been on my todo list