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

2015-07-18 Thread Ben Walton
ecute the substitution instead. By using inplace replacement, we can subsequently drop the mv command. Signed-off-by: Ben Walton --- t/t5601-clone.sh |2 +- t/t9500-gitweb-standalone-no-errors.sh |3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git

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

2015-07-18 Thread Ben Walton
, use the octal representations of [ and ] instead. Signed-off-by: Ben Walton --- 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 -

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

2015-07-19 Thread Ben Walton
, use the octal representations 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 --- t/t5500-fetch-pack.sh | 2 +- t/t5601-clone.sh | 8 t/test

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

2015-07-19 Thread Ben Walton
essary space. Signed-off-by: Ben Walton --- 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 ss

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
at the end 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

[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 --- tr

[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 --- t/lib-credential.sh | 4 ++-- 1 file changed

[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 --- 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 +++ b/t/lib

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

2014-05-30 Thread Ben Walton
. Signed-off-by: Ben Walton --- 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/compat/bswap.h

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

2014-12-22 Thread Ben Walton
c=0 '$1 {++c} END {print c}' 0 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 --- t/t0090

[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

Re: [PATCH] Avoid broken Solaris tr

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

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

2013-10-28 Thread Ben Walton
rm the files. Replace four identical transforms with a function named broken_c_unquote. Replace the other two identical transforms with a fuction named broken_c_unquote_verbose. Signed-off-by: Ben Walton --- t/t0008-ignores.sh | 30 ++ 1 file changed, 18 insertions(+),

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 wrote: > Jonathan Nieder writes: > >> Johannes Sixt wrote: >> >>> In other tests, we check for prerequisite PERL, i.e., we are prepared >>> tha

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 wrote: > Ben Walton 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-whi

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 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 wrote: >> Jonathan Nieder write

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

2013-10-28 Thread Ben Walton
rm the files. Replace four identical transforms with a function named broken_c_unquote. Replace the other two identical transforms with a fuction named broken_c_unquote_verbose. Signed-off-by: Ben Walton --- t/t0008-ignores.sh | 30 ++ 1 file changed, 18 insertions(+),

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 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

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

2013-10-28 Thread Ben Walton
rm the files. Replace four identical transforms with a function named broken_c_unquote. Replace the other two identical transforms with a fuction named broken_c_unquote_verbose. Signed-off-by: Ben Walton --- ...Forgot to quote PERL_PATH in the previous iteration. t/t0008-ignores.sh | 30

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 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-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

[PATCH] Use unsigned char to squash compiler warnings

2015-03-02 Thread Ben Walton
ar 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 --- ctype.c | 2 +- git-compat-util.h | 2 +- kwset.c | 8 kwset.h | 2 +- 4 files changed, 7 insertions(

[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 --- t/t3600-rm.sh |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t/t3600-rm.sh b/t/t3600-rm.sh index

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

2013-01-15 Thread Ben Walton
on clearer. Signed-off-by: Ben Walton --- 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 --- a/p

[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 --- git-cvsimport.perl |5 - 1

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

2013-01-15 Thread Ben Walton
een run through 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 --- perl/Git.pm | 20 1 file changed, 20 insertions(+) diff --git a/perl/Git.p

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

2013-01-15 Thread Ben Walton
dded. I can do 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 |

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 wrote: > On Tue, Jan 15, 2013 at 5:10 PM, Ben Walton 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 the ep

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

2013-01-16 Thread Ben Walton
On Wed, Jan 16, 2013 at 3:37 PM, Junio C Hamano wrote: > Ben Walton writes: > >> +sub get_tz_offset { >> + # some systmes don't handle or mishandle %z, so be creative. > > Hmph. I wonder if we can use %z if it is handled correctly and fall > back to this

[PATCH] Avoid broken Solaris tr

2013-06-18 Thread Ben Walton
ce the sed 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 --- t/t0008-ignores.sh | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) di

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

2012-09-06 Thread Ben Walton
st to t1303-wacky-config to catch any future issues with this check. Signed-off-by: Ben Walton --- 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 in the function but doing it

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

2012-09-06 Thread Ben Walton
y unlikely, but not impossible, that anyone creating a config file with long key names would be in a situation where someone else couldn't read 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 Univer

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] 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 --- Hi Junio, (Sorry that this patch took so long to submit. I've been busy moving.) I think this should remove the length limitations enforced

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 aga

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

2012-09-30 Thread Ben Walton
ns 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 --- config.c | 59 +-- 1

[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 --- 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 --- a/t/t5400-send

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

2012-10-08 Thread Ben Walton
"git grep" >> to catch them all. > > In other 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 hav

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 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 t9200-git-cvsexp

Re: git config error message

2012-10-27 Thread Ben Walton
On Sat, Oct 27, 2012 at 9:32 AM, Angelo Borsotti 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, especially in terms of h

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 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 > --- a/t/t9200-git-cvsexportcommi

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&#x

[PATCH] Avoid crippled getpass function on Solaris

2012-08-05 Thread Ben Walton
building on Solaris. Signed-off-by: Ben Walton --- 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 entirely open to modi

Re: [PATCH] Avoid crippled getpass function on Solaris

2012-08-05 Thread Ben Walton
licit that the function getpass may 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...@vge

Re: [PATCH] Avoid crippled getpass function on Solaris

2012-08-05 Thread Ben Walton
to go in. Oh, interesting. I'd missed your update of this thread earlier today. It may make sense to do everything via file descriptors directly as you suggested in your comments on that patch. Thanks -Ben -- Ben Walton Systems Programmer - CHASS University of Toronto C:416.407.5610 | W:4

Re: [PATCH] Avoid crippled getpass function on Solaris

2012-08-06 Thread Ben Walton
Excerpts from Jeff King's message of Mon Aug 06 15:39:58 -0400 2012: > On Sun, Aug 05, 2012 at 10:35:06PM -0400, Ben Walton wrote: > > > Excerpts from Junio C Hamano's message of Sun Aug 05 21:59:48 -0400 2012: > > > Wouldn't > > > > &

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 imag

Re: [PATCH] Avoid crippled getpass function on Solaris

2012-08-06 Thread Ben Walton
tion multiple times. 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://vger.kernel.org/majordomo-info.html

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

Re: [PATCH] Avoid crippled getpass function on Solaris

2012-08-06 Thread Ben Walton
t/terminal.c > @@ -59,6 +59,7 @@ char *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); > }

[PATCH] Enable HAVE_DEV_TTY for Solaris

2012-08-06 Thread Ben Walton
Now that git_terminal_prompt can cleanly interact with /dev/tty on Solaris, enable HAVE_DEV_TTY so that this code path is used for credential reading instead of relying on the crippled getpass(). Signed-off-by: Ben Walton --- This is a follow up to Jeff's patch that fixes git_terminal_prom

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 Acked-by: Ben Walton 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 require the migration then it ca

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 wrote: > Ben Walton 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. >>

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

2013-02-09 Thread Ben Walton
on clearer. Signed-off-by: Ben Walton --- 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 --- a/p

[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
ge 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

[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 --- git-cvsimport.perl |5 - 1