Re: [PATCH v2 3/3] test-lib.sh: support -x option for shell-tracing

2014-10-13 Thread Jeff King
On Mon, Oct 13, 2014 at 04:14:59PM -0700, Junio C Hamano wrote: > We came to more or less the same conclusion. With your $*" fixed, > the test "works" as before, with the same definition of "works", > because without your patch the file ends with EOF and with > your original $*" the file ends wit

Re: [PATCH v2 3/3] test-lib.sh: support -x option for shell-tracing

2014-10-13 Thread Junio C Hamano
Jeff King writes: > OK, I lied. I couldn't resist spending 5 more minutes on it. > > If you instrument t1308 on master to look at the contents of .git/config > directly after the setup step, you'll see that the file ends with (tabs > marked as ^I): > > [...] > ^I^Ihorns > ^IEOF > > Which ma

Re: [PATCH v2 3/3] test-lib.sh: support -x option for shell-tracing

2014-10-13 Thread Jeff King
On Mon, Oct 13, 2014 at 06:33:03PM -0400, Jeff King wrote: > > But still it is disturbing to see that there is a blank line > > difference with and without this change in the file created by the > > test (i.e. the client of the code this patch touches). > > This fixes it: > > diff --git a/t/test

Re: [PATCH v2 3/3] test-lib.sh: support -x option for shell-tracing

2014-10-13 Thread Junio C Hamano
Jeff King writes: > This fixes it: > > diff --git a/t/test-lib.sh b/t/test-lib.sh > index 4dab575..059bb25 100644 > --- a/t/test-lib.sh > +++ b/t/test-lib.sh > @@ -528,8 +528,7 @@ maybe_setup_valgrind () { > test_eval_inner_ () { > eval " > test \"$trace\" = t && set -x > -

Re: [PATCH v2 3/3] test-lib.sh: support -x option for shell-tracing

2014-10-13 Thread Jeff King
On Mon, Oct 13, 2014 at 03:22:50PM -0700, Junio C Hamano wrote: > > Rerolled patch is below. Sorry for all the emails. I'll stop looking at > > it now to give you guys a chance to find any remaining mistakes. ;) > > Does 1308 pass with this patch for you (running it without "-x")? Hmph. It does

Re: [PATCH v2 3/3] test-lib.sh: support -x option for shell-tracing

2014-10-13 Thread Junio C Hamano
Junio C Hamano writes: > Does 1308 pass with this patch for you (running it without "-x")? > > The original that expects a hardcoded line number (not relative to > the original or something) is a bad taste, and also the test setup > procedure is broken (see below for a fix of that breakage, which

Re: [PATCH v2 3/3] test-lib.sh: support -x option for shell-tracing

2014-10-13 Thread Junio C Hamano
Jeff King writes: > On Fri, Oct 10, 2014 at 02:21:56AM -0400, Jeff King wrote: > >> diff --git a/t/test-lib.sh b/t/test-lib.sh >> index a60ec75..81ceb23 100644 >> --- a/t/test-lib.sh >> +++ b/t/test-lib.sh >> @@ -237,7 +237,11 @@ do >> shift ;; >> -x) >> test_eval_s

Re: [PATCH v2 3/3] test-lib.sh: support -x option for shell-tracing

2014-10-13 Thread Junio C Hamano
Jeff King writes: >> Hmph. I had originally intended to make this "set -x;" with a semicolon, >> to keep it split from $*. But I forgot to, and much to my surprise, all >> of the tests still passed. Yup, I was wondering why you posted a version without the semicolon, which looked obviously bogus

[PATCH v2 3/3] test-lib.sh: support -x option for shell-tracing

2014-10-09 Thread Jeff King
On Fri, Oct 10, 2014 at 02:21:56AM -0400, Jeff King wrote: > diff --git a/t/test-lib.sh b/t/test-lib.sh > index a60ec75..81ceb23 100644 > --- a/t/test-lib.sh > +++ b/t/test-lib.sh > @@ -237,7 +237,11 @@ do > shift ;; > -x) > test_eval_start_='set -x' > -