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

2014-10-13 Thread Junio C Hamano
Jeff King p...@peff.net 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

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

2014-10-13 Thread Junio C Hamano
Jeff King p...@peff.net 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)

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

2014-10-13 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com 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

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 not. I

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

2014-10-13 Thread Junio C Hamano
Jeff King p...@peff.net 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 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-lib.sh

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

2014-10-13 Thread Junio C Hamano
Jeff King p...@peff.net 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

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 HTEOFLF and with your original $*LFHT the file ends with

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

2014-10-10 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' -