{"thread":{"id":"12230","subject":"[PATCH 0/3] solaris test results","startedAt":"2008-02-20T23:59:44Z","lastAt":"2008-02-24T19:40:45Z","messageCount":28,"participants":["Jeff King","Junio C Hamano","Johannes Sixt"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"69431","messageId":"20080220235944.GA6278@coredump.intra.peff.net","threadId":"12230","inReplyTo":null,"subject":"[PATCH 0/3] solaris test results","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-02-20T23:59:44Z","receivedAt":"2008-02-20T23:59:44Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"I have now run every test script <= t9001 using the current 'master' on\nthe SunOS 5.8 box available to me. It _mostly_ passed. Following are\nthree patches:\n\n  1/3: git_config_*: don't assume we are parsing a config file\n\n       This is an actual minor bug which was covered by most platforms'\n       ability to print (null) for NULL. I posted this earlier, but with\n       a typo.\n\n  2/3: t3404: use configured shell instead of /bin/sh\n\n       This is a problem purely in the test script, not git itself.\n\n  3/3: diff: fix java funcname pattern for solaris\n\n       This is a Solaris-specific bug in git.\n\nWith these fixes, everything passes for me with a few exceptions:\n\n  - Sun's diff doesn't understand \"-u\". I was able to use GNU diff.\n    Since comparing actual and expected output is so common, we could\n    potentially abstract this with a \"test_cmp()\" function and use\n    something platform specific. It's probably not worth the trouble, as\n    it impacts only the test suite, and only on systems with a totally\n    broken diff.\n\n  - t4020 fails without gnu grep, as it requires \"grep -a\"\n\n  - t4024 fails unless /usr/xpg4/bin is in your path, as the regular\n    version of 'expr' is unhappy with us (I didn't investigate too\n    closely)\n\n  - t4118, t4200, t8001, and t8002 fail unless you have GNU sed. The\n    xpg4 sed barfs if there's no newline at the end of input (and this\n    is specifically part of these tests)\n\n  - I couldn't personally run t5502, t5505, t5512, t5520, or t9001, all\n    of which require the Git.pm module; the version of perl on this\n    machine is old (5.005_02) and complained about the 'our' keyword\n\n  - t7505 uses a hook which hard-codes /bin/sh but uses syntax that\n    the Solaris /bin/sh doesn't like. Maybe hooks should get their\n    $SHELL value replaced?\n\n  - t3900 mostly passes, but fails to correctly convert between EUCJP\n    and ISO-2022-JP (in either direction). I didn't investigate very\n    far.\n\n  - git-filter-branch invokes \"sh\" for the commit filter, which invokes\n    the broken Solaris /bin/sh. This isn't wrong, exactly, but it might\n    make more sense to invoke $SHELL.\n\nNow I must go gouge out my eyes, so that I may never see the output of\nSolaris /bin/sh ever again.\n\n-Peff\n"},{"id":"69432","messageId":"20080221000032.GA6429@coredump.intra.peff.net","threadId":"12230","inReplyTo":"20080220235944.GA6278@coredump.intra.peff.net","subject":"[PATCH 1/3] git_config_*: don't assume we are parsing a config file","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-02-21T00:00:32Z","receivedAt":"2008-02-21T00:00:32Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"These functions get called by other code, including parsing\nconfig options from the command line. In that case,\nconfig_file_name is NULL, leading to an ugly message or even\na segfault on some implementations of printf.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n config.c |   11 +++++++++--\n 1 files changed, 9 insertions(+), 2 deletions(-)\n\ndiff --git a/config.c b/config.c\nindex 8064cae..cba2bcf 100644\n--- a/config.c\n+++ b/config.c\n@@ -280,11 +280,18 @@ int git_parse_ulong(const char *value, unsigned long *ret)\n \treturn 0;\n }\n \n+static void die_bad_config(const char *name)\n+{\n+\tif (config_file_name)\n+\t\tdie(\"bad config value for '%s' in %s\", name, config_file_name);\n+\tdie(\"bad config value for '%s'\", name);\n+}\n+\n int git_config_int(const char *name, const char *value)\n {\n \tlong ret;\n \tif (!git_parse_long(value, &ret))\n-\t\tdie(\"bad config value for '%s' in %s\", name, config_file_name);\n+\t\tdie_bad_config(name);\n \treturn ret;\n }\n \n@@ -292,7 +299,7 @@ unsigned long git_config_ulong(const char *name, const char *value)\n {\n \tunsigned long ret;\n \tif (!git_parse_ulong(value, &ret))\n-\t\tdie(\"bad config value for '%s' in %s\", name, config_file_name);\n+\t\tdie_bad_config(name);\n \treturn ret;\n }\n \n-- \n1.5.4.2.247.g107bd\n"},{"id":"69433","messageId":"20080221000044.GB6429@coredump.intra.peff.net","threadId":"12230","inReplyTo":"20080220235944.GA6278@coredump.intra.peff.net","subject":"[PATCH 2/3] t3404: use configured shell instead of /bin/sh","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-02-21T00:00:44Z","receivedAt":"2008-02-21T00:00:44Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"The fake-editor shell script invoked /bin/sh; normally this\nis fine, unless the /bin/sh doesn't meet our compatibility\nrequirements, as is the case with Solaris. Specifically, the\n$() syntax used by fake-editor is not understood.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n t/t3404-rebase-interactive.sh |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh\nindex e5ed745..62e65d7 100755\n--- a/t/t3404-rebase-interactive.sh\n+++ b/t/t3404-rebase-interactive.sh\n@@ -61,8 +61,8 @@ test_expect_success 'setup' '\n \tgit tag I\n '\n \n-cat > fake-editor.sh <<\\EOF\n-#!/bin/sh\n+echo \"#!$SHELL\" >fake-editor\n+cat >> fake-editor.sh <<\\EOF\n case \"$1\" in\n */COMMIT_EDITMSG)\n \ttest -z \"$FAKE_COMMIT_MESSAGE\" || echo \"$FAKE_COMMIT_MESSAGE\" > \"$1\"\n-- \n1.5.4.2.247.g107bd\n"},{"id":"69434","messageId":"20080221000115.GC6429@coredump.intra.peff.net","threadId":"12230","inReplyTo":"20080220235944.GA6278@coredump.intra.peff.net","subject":"[PATCH 3/3] diff: fix java funcname pattern for solaris","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-02-21T00:01:16Z","receivedAt":"2008-02-21T00:01:16Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"The Solaris regex library doesn't like having the '$' anchor\ninside capture parentheses. It rejects the match, causing\nt4018 to fail.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n diff.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/diff.c b/diff.c\nindex 58fe775..0f18ee9 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -1199,7 +1199,7 @@ static struct builtin_funcname_pattern {\n \t\t\t\"new\\\\|return\\\\|switch\\\\|throw\\\\|while\\\\)\\n\"\n \t\t\t\"^[ \t]*\\\\(\\\\([ \t]*\"\n \t\t\t\"[A-Za-z_][A-Za-z_0-9]*\\\\)\\\\{2,\\\\}\"\n-\t\t\t\"[ \t]*([^;]*$\\\\)\" },\n+\t\t\t\"[ \t]*([^;]*\\\\)$\" },\n \t{ \"tex\", \"^\\\\(\\\\\\\\\\\\(sub\\\\)*section{.*\\\\)$\" },\n };\n \n-- \n1.5.4.2.247.g107bd\n"},{"id":"69437","messageId":"7vk5kz171q.fsf@gitster.siamese.dyndns.org","threadId":"12230","inReplyTo":"20080220235944.GA6278@coredump.intra.peff.net","subject":"Re: [PATCH 0/3] solaris test results","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-02-21T00:34:25Z","receivedAt":"2008-02-21T00:34:25Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n>   - Sun's diff doesn't understand \"-u\". I was able to use GNU diff.\n>     Since comparing actual and expected output is so common, we could\n>     potentially abstract this with a \"test_cmp()\" function and use\n>     something platform specific. It's probably not worth the trouble, as\n>     it impacts only the test suite, and only on systems with a totally\n>     broken diff.\n\nIt is unfair to call diff without -u \"totally broken\".  It is\nnot even in POSIX yet IIRC.\n\n>   - t7505 uses a hook which hard-codes /bin/sh but uses syntax that\n>     the Solaris /bin/sh doesn't like. Maybe hooks should get their\n>     $SHELL value replaced?\n\nYou've already did that in your [PATCH 2/3], haven't you?  So\nwhy not?\n"},{"id":"69438","messageId":"20080221004146.GA6682@coredump.intra.peff.net","threadId":"12230","inReplyTo":"7vk5kz171q.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH 0/3] solaris test results","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-02-21T00:41:46Z","receivedAt":"2008-02-21T00:41:46Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Feb 20, 2008 at 04:34:25PM -0800, Junio C Hamano wrote:\n\n> >   - Sun's diff doesn't understand \"-u\". I was able to use GNU diff.\n> >     Since comparing actual and expected output is so common, we could\n> >     potentially abstract this with a \"test_cmp()\" function and use\n> >     something platform specific. It's probably not worth the trouble, as\n> >     it impacts only the test suite, and only on systems with a totally\n> >     broken diff.\n> \n> It is unfair to call diff without -u \"totally broken\".  It is\n> not even in POSIX yet IIRC.\n\nFair enough (and you are right that it is not even POSIX). Is it\nsomething we want to work around? We \"diff -u\" quite a bit in the test\nsuite.\n\n> >   - t7505 uses a hook which hard-codes /bin/sh but uses syntax that\n> >     the Solaris /bin/sh doesn't like. Maybe hooks should get their\n> >     $SHELL value replaced?\n> \n> You've already did that in your [PATCH 2/3], haven't you?  So\n> why not?\n\nBecause I didn't look very closely, and I assumed it was one of the\nregular hooks. But yes, it is defined in the script and could get the\nsame treatment.\n\n-Peff\n"},{"id":"69547","messageId":"7vr6f5pnmz.fsf@gitster.siamese.dyndns.org","threadId":"12230","inReplyTo":"20080221004146.GA6682@coredump.intra.peff.net","subject":"Re: [PATCH 0/3] solaris test results","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-02-22T05:26:44Z","receivedAt":"2008-02-22T05:26:44Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> On Wed, Feb 20, 2008 at 04:34:25PM -0800, Junio C Hamano wrote:\n>\n>> >   - Sun's diff doesn't understand \"-u\". I was able to use GNU diff.\n>> >     Since comparing actual and expected output is so common, we could\n>> >     potentially abstract this with a \"test_cmp()\" function and use\n>> >     something platform specific. It's probably not worth the trouble, as\n>> >     it impacts only the test suite, and only on systems with a totally\n>> >     broken diff.\n>> \n>> It is unfair to call diff without -u \"totally broken\".  It is\n>> not even in POSIX yet IIRC.\n>\n> Fair enough (and you are right that it is not even POSIX). Is it\n> something we want to work around? We \"diff -u\" quite a bit in the test\n> suite.\n\nHere is a possible solution.\n\nThis is a fairly mechanical substitution (grepping for \"git diff -u\"\nand \"diff -u\", and replacing them with test_compare_expect.\n\nSome tests get the order of comparison wrong (should always be\n\"diff expect current\" to make the error stand out in -v output),\nbut I did not update them.  That would be for later rounds,\nperhaps, if we decide to do this.\n\n-- >8 --\nSubject: [PATCH] tests: test_compare_expect helper function\n\nWe tend to use \"diff -u\" for comparing expected output from\nactual, but diff on some platforms lack \"-u\" (it is not in POSIX\nyet).\n\nThis mechanically replaces \"diff -u expected actual\" with\ntest_compare_expect helper function.\n\nTest scripts can be run with --no-diff-u option, to use \"git\ndiff -u --no-index\" for comparison instead.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n t/t0003-attributes.sh              |    2 +-\n t/t0022-crlf-rename.sh             |    2 +-\n t/t1300-repo-config.sh             |    2 +-\n t/t2200-add-update.sh              |    2 +-\n t/t3001-ls-files-others-exclude.sh |    2 +-\n t/t3030-merge-recursive.sh         |   42 ++++++++++++++++++------------------\n t/t3050-subprojects-fetch.sh       |    4 +-\n t/t3060-ls-files-with-tree.sh      |    2 +-\n t/t3201-branch-contains.sh         |    6 ++--\n t/t3404-rebase-interactive.sh      |    4 +-\n t/t3405-rebase-malformed.sh        |    4 +-\n t/t3406-rebase-message.sh          |    2 +-\n t/t3701-add-interactive.sh         |    4 +-\n t/t3902-quoted.sh                  |   16 ++++++------\n t/t3903-stash.sh                   |    2 +-\n t/t4023-diff-rename-typechange.sh  |    6 ++--\n t/t4024-diff-optimize-common.sh    |    2 +-\n t/t4025-hunk-header.sh             |    2 +-\n t/t4201-shortlog.sh                |    2 +-\n t/t5505-remote.sh                  |    6 ++--\n t/t5510-fetch.sh                   |    2 +-\n t/t5512-ls-remote.sh               |    8 +++---\n t/t5515-fetch-merge-logic.sh       |    2 +-\n t/t6004-rev-list-path-optim.sh     |    2 +-\n t/t6009-rev-list-parent.sh         |    2 +-\n t/t6027-merge-binary.sh            |    4 +-\n t/t7010-setup.sh                   |   18 +++++++-------\n t/t7501-commit.sh                  |   14 ++++++------\n t/t7502-commit.sh                  |   14 ++++++------\n t/t7502-status.sh                  |    2 +-\n t/t7600-merge.sh                   |    2 +-\n t/t8003-blame.sh                   |    4 +-\n t/t9001-send-email.sh              |    2 +-\n t/t9116-git-svn-log.sh             |   24 ++++++++++----------\n t/t9200-git-cvsexportcommit.sh     |   14 ++++++------\n t/t9300-fast-import.sh             |    2 +-\n t/test-lib.sh                      |   27 +++++++++++++++++++++++\n 37 files changed, 142 insertions(+), 115 deletions(-)\n\ndiff --git a/t/t0003-attributes.sh b/t/t0003-attributes.sh\nindex 47f08a4..8d85acb 100755\n--- a/t/t0003-attributes.sh\n+++ b/t/t0003-attributes.sh\n@@ -11,7 +11,7 @@ attr_check () {\n \n \tgit check-attr test -- \"$path\" >actual &&\n \techo \"$path: test: $2\" >expect &&\n-\tdiff -u expect actual\n+\ttest_compare_expect expect actual\n \n }\n \ndiff --git a/t/t0022-crlf-rename.sh b/t/t0022-crlf-rename.sh\nindex 430a1d1..651ce2f 100755\n--- a/t/t0022-crlf-rename.sh\n+++ b/t/t0022-crlf-rename.sh\n@@ -26,7 +26,7 @@ test_expect_success 'diff -M' '\n \tgit diff-tree -M -r --name-status HEAD^ HEAD |\n \tsed -e \"s/R[0-9]*/RNUM/\" >actual &&\n \techo \"RNUM\tsample\telpmas\" >expect &&\n-\tdiff -u expect actual\n+\ttest_compare_expect expect actual\n \n '\n \ndiff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh\nindex 4928a57..e0e95ce 100755\n--- a/t/t1300-repo-config.sh\n+++ b/t/t1300-repo-config.sh\n@@ -465,7 +465,7 @@ weird\n EOF\n \n test_expect_success \"section was removed properly\" \\\n-\t\"git diff -u expect .git/config\"\n+\t\"test_compare_expect expect .git/config\"\n \n rm .git/config\n \ndiff --git a/t/t2200-add-update.sh b/t/t2200-add-update.sh\nindex 24f892f..75abda1 100755\n--- a/t/t2200-add-update.sh\n+++ b/t/t2200-add-update.sh\n@@ -62,7 +62,7 @@ test_expect_success 'cache tree has not been corrupted' '\n \tsed -e \"s/ 0\t/\t/\" >expect &&\n \tgit ls-tree -r $(git write-tree) |\n \tsed -e \"s/ blob / /\" >current &&\n-\tdiff -u expect current\n+\ttest_compare_expect expect current\n \n '\n \ndiff --git a/t/t3001-ls-files-others-exclude.sh b/t/t3001-ls-files-others-exclude.sh\nindex b4297ba..0b9d2ea 100755\n--- a/t/t3001-ls-files-others-exclude.sh\n+++ b/t/t3001-ls-files-others-exclude.sh\n@@ -97,7 +97,7 @@ cat > expect << EOF\n EOF\n \n test_expect_success 'git-status honours core.excludesfile' \\\n-\t'diff -u expect output'\n+\t'test_compare_expect expect output'\n \n test_expect_success 'trailing slash in exclude allows directory match(1)' '\n \ndiff --git a/t/t3030-merge-recursive.sh b/t/t3030-merge-recursive.sh\nindex 607f57f..edfdbfd 100755\n--- a/t/t3030-merge-recursive.sh\n+++ b/t/t3030-merge-recursive.sh\n@@ -43,7 +43,7 @@ test_expect_success 'setup 1' '\n \t\techo \"100644 $o0 0\tc\"\n \t\techo \"100644 $o1 0\td/e\"\n \t) >expected &&\n-\tgit diff -u expected actual\n+\ttest_compare_expect expected actual\n '\n \n test_expect_success 'setup 2' '\n@@ -61,7 +61,7 @@ test_expect_success 'setup 2' '\n \t\techo \"100644 $o0 0\tc\"\n \t\techo \"100644 $o0 0\td/e\"\n \t) >expected &&\n-\tgit diff -u expected actual &&\n+\ttest_compare_expect expected actual &&\n \n \techo goodbye >>a &&\n \to2=$(git hash-object a) &&\n@@ -82,7 +82,7 @@ test_expect_success 'setup 2' '\n \t\techo \"100644 $o0 0\tc\"\n \t\techo \"100644 $o0 0\td/e\"\n \t) >expected &&\n-\tgit diff -u expected actual\n+\ttest_compare_expect expected actual\n '\n \n test_expect_success 'setup 3' '\n@@ -100,7 +100,7 @@ test_expect_success 'setup 3' '\n \t\techo \"100644 $o0 0\tc\"\n \t\techo \"100644 $o0 0\td/e\"\n \t) >expected &&\n-\tgit diff -u expected actual &&\n+\ttest_compare_expect expected actual &&\n \n \trm -f b && mkdir b && echo df-1 >b/c && git add b/c &&\n \to3=$(git hash-object b/c) &&\n@@ -119,7 +119,7 @@ test_expect_success 'setup 3' '\n \t\techo \"100644 $o0 0\tc\"\n \t\techo \"100644 $o0 0\td/e\"\n \t) >expected &&\n-\tgit diff -u expected actual\n+\ttest_compare_expect expected actual\n '\n \n test_expect_success 'setup 4' '\n@@ -137,7 +137,7 @@ test_expect_success 'setup 4' '\n \t\techo \"100644 $o0 0\tc\"\n \t\techo \"100644 $o0 0\td/e\"\n \t) >expected &&\n-\tgit diff -u expected actual &&\n+\ttest_compare_expect expected actual &&\n \n \trm -f a && mkdir a && echo df-2 >a/c && git add a/c &&\n \to4=$(git hash-object a/c) &&\n@@ -156,7 +156,7 @@ test_expect_success 'setup 4' '\n \t\techo \"100644 $o0 0\tc\"\n \t\techo \"100644 $o0 0\td/e\"\n \t) >expected &&\n-\tgit diff -u expected actual\n+\ttest_compare_expect expected actual\n '\n \n test_expect_success 'setup 5' '\n@@ -174,7 +174,7 @@ test_expect_success 'setup 5' '\n \t\techo \"100644 $o0 0\tc\"\n \t\techo \"100644 $o0 0\td/e\"\n \t) >expected &&\n-\tgit diff -u expected actual &&\n+\ttest_compare_expect expected actual &&\n \n \trm -f b &&\n \techo remove-conflict >a &&\n@@ -195,7 +195,7 @@ test_expect_success 'setup 5' '\n \t\techo \"100644 $o0 0\tc\"\n \t\techo \"100644 $o0 0\td/e\"\n \t) >expected &&\n-\tgit diff -u expected actual\n+\ttest_compare_expect expected actual\n \n '\n \n@@ -214,7 +214,7 @@ test_expect_success 'setup 6' '\n \t\techo \"100644 $o0 0\tc\"\n \t\techo \"100644 $o0 0\td/e\"\n \t) >expected &&\n-\tgit diff -u expected actual &&\n+\ttest_compare_expect expected actual &&\n \n \trm -fr d && echo df-3 >d && git add d &&\n \to6=$(git hash-object d) &&\n@@ -233,7 +233,7 @@ test_expect_success 'setup 6' '\n \t\techo \"100644 $o0 0\tc\"\n \t\techo \"100644 $o6 0\td\"\n \t) >expected &&\n-\tgit diff -u expected actual\n+\ttest_compare_expect expected actual\n '\n \n test_expect_success 'merge-recursive simple' '\n@@ -265,7 +265,7 @@ test_expect_success 'merge-recursive result' '\n \t\techo \"100644 $o0 0\tc\"\n \t\techo \"100644 $o1 0\td/e\"\n \t) >expected &&\n-\tgit diff -u expected actual\n+\ttest_compare_expect expected actual\n \n '\n \n@@ -297,7 +297,7 @@ test_expect_success 'merge-recursive remove conflict' '\n \t\techo \"100644 $o0 0\tc\"\n \t\techo \"100644 $o1 0\td/e\"\n \t) >expected &&\n-\tgit diff -u expected actual\n+\ttest_compare_expect expected actual\n \n '\n \n@@ -318,7 +318,7 @@ test_expect_success 'merge-recursive result' '\n \t\techo \"100644 $o0 0\tc\"\n \t\techo \"100644 $o1 0\td/e\"\n \t) >expected &&\n-\tgit diff -u expected actual\n+\ttest_compare_expect expected actual\n \n '\n \n@@ -352,7 +352,7 @@ test_expect_success 'merge-recursive d/f conflict result' '\n \t\techo \"100644 $o0 0\tc\"\n \t\techo \"100644 $o1 0\td/e\"\n \t) >expected &&\n-\tgit diff -u expected actual\n+\ttest_compare_expect expected actual\n \n '\n \n@@ -386,7 +386,7 @@ test_expect_success 'merge-recursive d/f conflict result the other way' '\n \t\techo \"100644 $o0 0\tc\"\n \t\techo \"100644 $o1 0\td/e\"\n \t) >expected &&\n-\tgit diff -u expected actual\n+\ttest_compare_expect expected actual\n \n '\n \n@@ -420,7 +420,7 @@ test_expect_success 'merge-recursive d/f conflict result' '\n \t\techo \"100644 $o0 1\td/e\"\n \t\techo \"100644 $o1 2\td/e\"\n \t) >expected &&\n-\tgit diff -u expected actual\n+\ttest_compare_expect expected actual\n \n '\n \n@@ -454,7 +454,7 @@ test_expect_success 'merge-recursive d/f conflict result' '\n \t\techo \"100644 $o0 1\td/e\"\n \t\techo \"100644 $o1 3\td/e\"\n \t) >expected &&\n-\tgit diff -u expected actual\n+\ttest_compare_expect expected actual\n \n '\n \n@@ -480,7 +480,7 @@ test_expect_success 'reset and bind merge' '\n \t\techo \"100644 $o0 0\tc\"\n \t\techo \"100644 $o1 0\td/e\"\n \t) >expected &&\n-\tgit diff -u expected actual &&\n+\ttest_compare_expect expected actual &&\n \n \tgit read-tree --prefix=a1/ master &&\n \tgit ls-files -s >actual &&\n@@ -498,7 +498,7 @@ test_expect_success 'reset and bind merge' '\n \t\techo \"100644 $o0 0\tc\"\n \t\techo \"100644 $o1 0\td/e\"\n \t) >expected &&\n-\tgit diff -u expected actual\n+\ttest_compare_expect expected actual\n \n \tgit read-tree --prefix=z/ master &&\n \tgit ls-files -s >actual &&\n@@ -520,7 +520,7 @@ test_expect_success 'reset and bind merge' '\n \t\techo \"100644 $o0 0\tz/c\"\n \t\techo \"100644 $o1 0\tz/d/e\"\n \t) >expected &&\n-\tgit diff -u expected actual\n+\ttest_compare_expect expected actual\n \n '\n \ndiff --git a/t/t3050-subprojects-fetch.sh b/t/t3050-subprojects-fetch.sh\nindex 34f26a8..15fbdf3 100755\n--- a/t/t3050-subprojects-fetch.sh\n+++ b/t/t3050-subprojects-fetch.sh\n@@ -26,7 +26,7 @@ test_expect_success clone '\n \t\tcd cloned &&\n \t\t(git rev-parse HEAD; git ls-files -s) >../actual\n \t) &&\n-\tdiff -u expected actual\n+\ttest_compare_expect expected actual\n '\n \n test_expect_success advance '\n@@ -46,7 +46,7 @@ test_expect_success fetch '\n \t\tgit pull &&\n \t\t(git rev-parse HEAD; git ls-files -s) >../actual\n \t) &&\n-\tdiff -u expected actual\n+\ttest_compare_expect expected actual\n '\n \n test_done\ndiff --git a/t/t3060-ls-files-with-tree.sh b/t/t3060-ls-files-with-tree.sh\nindex 68eb266..ece38d0 100755\n--- a/t/t3060-ls-files-with-tree.sh\n+++ b/t/t3060-ls-files-with-tree.sh\n@@ -66,6 +66,6 @@ test_expect_success 'git -ls-files --with-tree should succeed from subdir' '\n cd ..\n test_expect_success \\\n     'git -ls-files --with-tree should add entries from named tree.' \\\n-    'diff -u expected output'\n+    'test_compare_expect expected output'\n \n test_done\ndiff --git a/t/t3201-branch-contains.sh b/t/t3201-branch-contains.sh\nindex 9ef593f..a711f54 100755\n--- a/t/t3201-branch-contains.sh\n+++ b/t/t3201-branch-contains.sh\n@@ -31,7 +31,7 @@ test_expect_success 'branch --contains=master' '\n \t{\n \t\techo \"  master\" && echo \"* side\"\n \t} >expect &&\n-\tdiff -u expect actual\n+\ttest_compare_expect expect actual\n \n '\n \n@@ -41,7 +41,7 @@ test_expect_success 'branch --contains master' '\n \t{\n \t\techo \"  master\" && echo \"* side\"\n \t} >expect &&\n-\tdiff -u expect actual\n+\ttest_compare_expect expect actual\n \n '\n \n@@ -51,7 +51,7 @@ test_expect_success 'branch --contains=side' '\n \t{\n \t\techo \"* side\"\n \t} >expect &&\n-\tdiff -u expect actual\n+\ttest_compare_expect expect actual\n \n '\n \ndiff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh\nindex 62e65d7..76927f8 100755\n--- a/t/t3404-rebase-interactive.sh\n+++ b/t/t3404-rebase-interactive.sh\n@@ -146,8 +146,8 @@ EOF\n test_expect_success 'stop on conflicting pick' '\n \tgit tag new-branch1 &&\n \t! git rebase -i master &&\n-\tdiff -u expect .git/.dotest-merge/patch &&\n-\tdiff -u expect2 file1 &&\n+\ttest_compare_expect expect .git/.dotest-merge/patch &&\n+\ttest_compare_expect expect2 file1 &&\n \ttest 4 = $(grep -v \"^#\" < .git/.dotest-merge/done | wc -l) &&\n \ttest 0 = $(grep -ve \"^#\" -e \"^$\" < .git/.dotest-merge/git-rebase-todo |\n \t\twc -l)\ndiff --git a/t/t3405-rebase-malformed.sh b/t/t3405-rebase-malformed.sh\nindex e4e2e64..8bb412e 100755\n--- a/t/t3405-rebase-malformed.sh\n+++ b/t/t3405-rebase-malformed.sh\n@@ -41,8 +41,8 @@ test_expect_success rebase '\n \tgit rebase master side &&\n \tgit cat-file commit HEAD | sed -e \"1,/^\\$/d\" >F1 &&\n \n-\tdiff -u F0 F1 &&\n-\tdiff -u F F0\n+\ttest_compare_expect F0 F1 &&\n+\ttest_compare_expect F F0\n '\n \n test_done\ndiff --git a/t/t3406-rebase-message.sh b/t/t3406-rebase-message.sh\nindex 332b2b2..9753939 100755\n--- a/t/t3406-rebase-message.sh\n+++ b/t/t3406-rebase-message.sh\n@@ -37,7 +37,7 @@ test_expect_success 'rebase -m' '\n \tgit rebase -m master >report &&\n \tsed -n -e \"/^Already applied: /p\" \\\n \t\t-e \"/^Committed: /p\" report >actual &&\n-\tdiff -u expect actual\n+\ttest_compare_expect expect actual\n \n '\n \ndiff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh\nindex c8dc1ac..1bb2aae 100755\n--- a/t/t3701-add-interactive.sh\n+++ b/t/t3701-add-interactive.sh\n@@ -24,7 +24,7 @@ EOF\n test_expect_success 'diff works (initial)' '\n \t(echo d; echo 1) | git add -i >output &&\n \tsed -ne \"/new file/,/content/p\" <output >diff &&\n-\tdiff -u expected diff\n+\ttest_compare_expect expected diff\n '\n test_expect_success 'revert works (initial)' '\n \tgit add file &&\n@@ -57,7 +57,7 @@ EOF\n test_expect_success 'diff works (commit)' '\n \t(echo d; echo 1) | git add -i >output &&\n \tsed -ne \"/^index/,/content/p\" <output >diff &&\n-\tdiff -u expected diff\n+\ttest_compare_expect expected diff\n '\n test_expect_success 'revert works (commit)' '\n \tgit add file &&\ndiff --git a/t/t3902-quoted.sh b/t/t3902-quoted.sh\nindex 73da45f..02eb9ff 100755\n--- a/t/t3902-quoted.sh\n+++ b/t/t3902-quoted.sh\n@@ -78,28 +78,28 @@ EOF\n \n test_expect_success 'check fully quoted output from ls-files' '\n \n-\tgit ls-files >current && diff -u expect.quoted current\n+\tgit ls-files >current && test_compare_expect expect.quoted current\n \n '\n \n test_expect_success 'check fully quoted output from diff-files' '\n \n \tgit diff --name-only >current &&\n-\tdiff -u expect.quoted current\n+\ttest_compare_expect expect.quoted current\n \n '\n \n test_expect_success 'check fully quoted output from diff-index' '\n \n \tgit diff --name-only HEAD >current &&\n-\tdiff -u expect.quoted current\n+\ttest_compare_expect expect.quoted current\n \n '\n \n test_expect_success 'check fully quoted output from diff-tree' '\n \n \tgit diff --name-only HEAD^ HEAD >current &&\n-\tdiff -u expect.quoted current\n+\ttest_compare_expect expect.quoted current\n \n '\n \n@@ -111,28 +111,28 @@ test_expect_success 'setting core.quotepath' '\n \n test_expect_success 'check fully quoted output from ls-files' '\n \n-\tgit ls-files >current && diff -u expect.raw current\n+\tgit ls-files >current && test_compare_expect expect.raw current\n \n '\n \n test_expect_success 'check fully quoted output from diff-files' '\n \n \tgit diff --name-only >current &&\n-\tdiff -u expect.raw current\n+\ttest_compare_expect expect.raw current\n \n '\n \n test_expect_success 'check fully quoted output from diff-index' '\n \n \tgit diff --name-only HEAD >current &&\n-\tdiff -u expect.raw current\n+\ttest_compare_expect expect.raw current\n \n '\n \n test_expect_success 'check fully quoted output from diff-tree' '\n \n \tgit diff --name-only HEAD^ HEAD >current &&\n-\tdiff -u expect.raw current\n+\ttest_compare_expect expect.raw current\n \n '\n \ndiff --git a/t/t3903-stash.sh b/t/t3903-stash.sh\nindex 9a9a250..4f5e579 100755\n--- a/t/t3903-stash.sh\n+++ b/t/t3903-stash.sh\n@@ -34,7 +34,7 @@ EOF\n test_expect_success 'parents of stash' '\n \ttest $(git rev-parse stash^) = $(git rev-parse HEAD) &&\n \tgit diff stash^2..stash > output &&\n-\tdiff -u output expect\n+\ttest_compare_expect output expect\n '\n \n test_expect_success 'apply needs clean working directory' '\ndiff --git a/t/t4023-diff-rename-typechange.sh b/t/t4023-diff-rename-typechange.sh\nindex 255604e..177e78a 100755\n--- a/t/t4023-diff-rename-typechange.sh\n+++ b/t/t4023-diff-rename-typechange.sh\n@@ -57,7 +57,7 @@ test_expect_success 'cross renames to be detected for regular files' '\n \t\techo \"R100\tfoo\tbar\"\n \t\techo \"R100\tbar\tfoo\"\n \t} | sort >expect &&\n-\tdiff -u expect actual\n+\ttest_compare_expect expect actual\n \n '\n \n@@ -68,7 +68,7 @@ test_expect_success 'cross renames to be detected for typechange' '\n \t\techo \"R100\tfoo\tbar\"\n \t\techo \"R100\tbar\tfoo\"\n \t} | sort >expect &&\n-\tdiff -u expect actual\n+\ttest_compare_expect expect actual\n \n '\n \n@@ -79,7 +79,7 @@ test_expect_success 'moves and renames' '\n \t\techo \"R100\tfoo\tbar\"\n \t\techo \"T100\tfoo\"\n \t} | sort >expect &&\n-\tdiff -u expect actual\n+\ttest_compare_expect expect actual\n \n '\n \ndiff --git a/t/t4024-diff-optimize-common.sh b/t/t4024-diff-optimize-common.sh\nindex 3c66102..318ce54 100755\n--- a/t/t4024-diff-optimize-common.sh\n+++ b/t/t4024-diff-optimize-common.sh\n@@ -150,7 +150,7 @@ test_expect_success 'diff -U0' '\n \tdo\n \t\tgit diff -U0 file-?$n\n \tdone | zc >actual &&\n-\tdiff -u expect actual\n+\ttest_compare_expect expect actual\n \n '\n \ndiff --git a/t/t4025-hunk-header.sh b/t/t4025-hunk-header.sh\nindex 9ba06b7..542bf30 100755\n--- a/t/t4025-hunk-header.sh\n+++ b/t/t4025-hunk-header.sh\n@@ -37,7 +37,7 @@ test_expect_success 'hunk header truncation with an overly long line' '\n \t\techo \" A $N$N$N$N$N$N$N$N$N2\"\n \t\techo \" L  $N$N$N$N$N$N$N$N$N1\"\n \t) >expected &&\n-\tdiff -u actual expected\n+\ttest_compare_expect actual expected\n \n '\n \ndiff --git a/t/t4201-shortlog.sh b/t/t4201-shortlog.sh\nindex 6d12efb..f9859bc 100755\n--- a/t/t4201-shortlog.sh\n+++ b/t/t4201-shortlog.sh\n@@ -45,6 +45,6 @@ A U Thor (5):\n \n EOF\n \n-test_expect_success 'shortlog wrapping' 'diff -u expect out'\n+test_expect_success 'shortlog wrapping' 'test_compare_expect expect out'\n \n test_done\ndiff --git a/t/t5505-remote.sh b/t/t5505-remote.sh\nindex 636aec2..cf20ec4 100755\n--- a/t/t5505-remote.sh\n+++ b/t/t5505-remote.sh\n@@ -25,7 +25,7 @@ setup_repository () {\n tokens_match () {\n \techo \"$1\" | tr ' ' '\\012' | sort | sed -e '/^$/d' >expect &&\n \techo \"$2\" | tr ' ' '\\012' | sort | sed -e '/^$/d' >actual &&\n-\tdiff -u expect actual\n+\ttest_compare_expect expect actual\n }\n \n check_remote_track () {\n@@ -74,7 +74,7 @@ test_expect_success 'add another remote' '\n \tsed -e \"/^refs\\/remotes\\/origin\\//d\" \\\n \t    -e \"/^refs\\/remotes\\/second\\//d\" >actual &&\n \t>expect &&\n-\tdiff -u expect actual\n+\ttest_compare_expect expect actual\n )\n '\n \n@@ -93,7 +93,7 @@ test_expect_success 'remove remote' '\n \tgit for-each-ref \"--format=%(refname)\" refs/remotes |\n \tsed -e \"/^refs\\/remotes\\/origin\\//d\" >actual &&\n \t>expect &&\n-\tdiff -u expect actual\n+\ttest_compare_expect expect actual\n )\n '\n \ndiff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh\nindex 9b948c1..17add89 100755\n--- a/t/t5510-fetch.sh\n+++ b/t/t5510-fetch.sh\n@@ -249,7 +249,7 @@ test_expect_success 'bundle should record HEAD correctly' '\n \tdo\n \t\techo \"$(git rev-parse --verify $h) $h\"\n \tdone >expect &&\n-\tdiff -u expect actual\n+\ttest_compare_expect expect actual\n \n '\n \ndiff --git a/t/t5512-ls-remote.sh b/t/t5512-ls-remote.sh\nindex 6ec5f7c..60def72 100755\n--- a/t/t5512-ls-remote.sh\n+++ b/t/t5512-ls-remote.sh\n@@ -24,28 +24,28 @@ test_expect_success setup '\n test_expect_success 'ls-remote --tags .git' '\n \n \tgit ls-remote --tags .git >actual &&\n-\tdiff -u expected.tag actual\n+\ttest_compare_expect expected.tag actual\n \n '\n \n test_expect_success 'ls-remote .git' '\n \n \tgit ls-remote .git >actual &&\n-\tdiff -u expected.all actual\n+\ttest_compare_expect expected.all actual\n \n '\n \n test_expect_success 'ls-remote --tags self' '\n \n \tgit ls-remote --tags self >actual &&\n-\tdiff -u expected.tag actual\n+\ttest_compare_expect expected.tag actual\n \n '\n \n test_expect_success 'ls-remote self' '\n \n \tgit ls-remote self >actual &&\n-\tdiff -u expected.all actual\n+\ttest_compare_expect expected.all actual\n \n '\n \ndiff --git a/t/t5515-fetch-merge-logic.sh b/t/t5515-fetch-merge-logic.sh\nindex 31c1081..85ff226 100755\n--- a/t/t5515-fetch-merge-logic.sh\n+++ b/t/t5515-fetch-merge-logic.sh\n@@ -148,7 +148,7 @@ do\n \t\t} >\"$actual\" &&\n \t\tif test -f \"$expect\"\n \t\tthen\n-\t\t\tgit diff -u \"$expect\" \"$actual\" &&\n+\t\t\ttest_compare_expect \"$expect\" \"$actual\" &&\n \t\t\trm -f \"$actual\"\n \t\telse\n \t\t\t# this is to help developing new tests.\ndiff --git a/t/t6004-rev-list-path-optim.sh b/t/t6004-rev-list-path-optim.sh\nindex 80d7198..0624cc4 100755\n--- a/t/t6004-rev-list-path-optim.sh\n+++ b/t/t6004-rev-list-path-optim.sh\n@@ -45,7 +45,7 @@ test_expect_success 'further setup' '\n test_expect_success 'path optimization 2' '\n \t( echo \"$side\"; echo \"$initial\" ) >expected &&\n \tgit rev-list HEAD -- a >actual &&\n-\tdiff -u expected actual\n+\ttest_compare_expect expected actual\n '\n \n test_done\ndiff --git a/t/t6009-rev-list-parent.sh b/t/t6009-rev-list-parent.sh\nindex be3d238..763934a 100755\n--- a/t/t6009-rev-list-parent.sh\n+++ b/t/t6009-rev-list-parent.sh\n@@ -31,7 +31,7 @@ test_expect_failure 'one is ancestor of others and should not be shown' '\n \n \tgit rev-list one --not four >result &&\n \t>expect &&\n-\tdiff -u expect result\n+\ttest_compare_expect expect result\n \n '\n \ndiff --git a/t/t6027-merge-binary.sh b/t/t6027-merge-binary.sh\nindex a7358f7..0731022 100755\n--- a/t/t6027-merge-binary.sh\n+++ b/t/t6027-merge-binary.sh\n@@ -45,7 +45,7 @@ test_expect_success resolve '\n \t\tfalse\n \telse\n \t\tgit ls-files -s >current\n-\t\tdiff -u current expect\n+\t\ttest_compare_expect current expect\n \tfi\n '\n \n@@ -60,7 +60,7 @@ test_expect_success recursive '\n \t\tfalse\n \telse\n \t\tgit ls-files -s >current\n-\t\tdiff -u current expect\n+\t\ttest_compare_expect current expect\n \tfi\n '\n \ndiff --git a/t/t7010-setup.sh b/t/t7010-setup.sh\nindex e809e0e..8351841 100755\n--- a/t/t7010-setup.sh\n+++ b/t/t7010-setup.sh\n@@ -18,7 +18,7 @@ test_expect_success 'git add (absolute)' '\n \tgit add \"$D/a/b/c/d\" &&\n \tgit ls-files >current &&\n \techo a/b/c/d >expect &&\n-\tdiff -u expect current\n+\ttest_compare_expect expect current\n \n '\n \n@@ -32,7 +32,7 @@ test_expect_success 'git add (funny relative)' '\n \t) &&\n \tgit ls-files >current &&\n \techo a/e/f >expect &&\n-\tdiff -u expect current\n+\ttest_compare_expect expect current\n \n '\n \n@@ -43,7 +43,7 @@ test_expect_success 'git rm (absolute)' '\n \tgit rm -f --cached \"$D/a/b/c/d\" &&\n \tgit ls-files >current &&\n \techo a/e/f >expect &&\n-\tdiff -u expect current\n+\ttest_compare_expect expect current\n \n '\n \n@@ -57,7 +57,7 @@ test_expect_success 'git rm (funny relative)' '\n \t) &&\n \tgit ls-files >current &&\n \techo a/b/c/d >expect &&\n-\tdiff -u expect current\n+\ttest_compare_expect expect current\n \n '\n \n@@ -67,7 +67,7 @@ test_expect_success 'git ls-files (absolute)' '\n \tgit add a &&\n \tgit ls-files \"$D/a/e/../b\" >current &&\n \techo a/b/c/d >expect &&\n-\tdiff -u expect current\n+\ttest_compare_expect expect current\n \n '\n \n@@ -80,7 +80,7 @@ test_expect_success 'git ls-files (relative #1)' '\n \t\tgit ls-files \"../b/c\"\n \t)  >current &&\n \techo c/d >expect &&\n-\tdiff -u expect current\n+\ttest_compare_expect expect current\n \n '\n \n@@ -93,7 +93,7 @@ test_expect_success 'git ls-files (relative #2)' '\n \t\tgit ls-files --full-name \"../e/f\"\n \t)  >current &&\n \techo a/e/f >expect &&\n-\tdiff -u expect current\n+\ttest_compare_expect expect current\n \n '\n \n@@ -126,13 +126,13 @@ test_expect_success 'log using absolute path names' '\n \n \tgit log a/b/c/d >f1.txt &&\n \tgit log \"$(pwd)/a/b/c/d\" >f2.txt &&\n-\tdiff -u f1.txt f2.txt\n+\ttest_compare_expect f1.txt f2.txt\n '\n \n test_expect_success 'blame using absolute path names' '\n \tgit blame a/b/c/d >f1.txt &&\n \tgit blame \"$(pwd)/a/b/c/d\" >f2.txt &&\n-\tdiff -u f1.txt f2.txt\n+\ttest_compare_expect f1.txt f2.txt\n '\n \n test_expect_success 'setup deeper work tree' '\ndiff --git a/t/t7501-commit.sh b/t/t7501-commit.sh\nindex 361886c..f2d89c0 100755\n--- a/t/t7501-commit.sh\n+++ b/t/t7501-commit.sh\n@@ -203,7 +203,7 @@ test_expect_success 'sign off (1)' '\n \t\tgit var GIT_COMMITTER_IDENT |\n \t\tsed -e \"s/>.*/>/\" -e \"s/^/Signed-off-by: /\"\n \t) >expected &&\n-\tdiff -u expected actual\n+\ttest_compare_expect expected actual\n \n '\n \n@@ -223,7 +223,7 @@ $existing\" &&\n \t\tgit var GIT_COMMITTER_IDENT |\n \t\tsed -e \"s/>.*/>/\" -e \"s/^/Signed-off-by: /\"\n \t) >expected &&\n-\tdiff -u expected actual\n+\ttest_compare_expect expected actual\n \n '\n \n@@ -240,7 +240,7 @@ test_expect_success 'multiple -m' '\n \t\techo\n \t\techo three\n \t) >expected &&\n-\tdiff -u expected actual\n+\ttest_compare_expect expected actual\n \n '\n \n@@ -301,12 +301,12 @@ test_expect_success 'same tree (merge and amend merge)' '\n \tgit merge -s ours side -m \"empty ok\" &&\n \tgit diff HEAD^ HEAD >actual &&\n \t: >expected &&\n-\tdiff -u expected actual &&\n+\ttest_compare_expect expected actual &&\n \n \tgit commit --amend -m \"empty really ok\" &&\n \tgit diff HEAD^ HEAD >actual &&\n \t: >expected &&\n-\tdiff -u expected actual\n+\ttest_compare_expect expected actual\n \n '\n \n@@ -323,7 +323,7 @@ test_expect_success 'amend using the message from another commit' '\n \tgit commit --allow-empty --amend -C \"$old\" &&\n \tgit show --pretty=\"format:%ad %s\" \"$old\" >expected &&\n \tgit show --pretty=\"format:%ad %s\" HEAD >actual &&\n-\tdiff -u expected actual\n+\ttest_compare_expect expected actual\n \n '\n \n@@ -341,7 +341,7 @@ test_expect_success 'amend using the message from a commit named with tag' '\n \tgit commit --allow-empty --amend -C tagged-old &&\n \tgit show --pretty=\"format:%ad %s\" \"$old\" >expected &&\n \tgit show --pretty=\"format:%ad %s\" HEAD >actual &&\n-\tdiff -u expected actual\n+\ttest_compare_expect expected actual\n \n '\n \ndiff --git a/t/t7502-commit.sh b/t/t7502-commit.sh\nindex b780fdd..f9616bf 100755\n--- a/t/t7502-commit.sh\n+++ b/t/t7502-commit.sh\n@@ -85,7 +85,7 @@ test_expect_success 'verbose' '\n \tgit add negative &&\n \tgit status -v | sed -ne \"/^diff --git /p\" >actual &&\n \techo \"diff --git a/negative b/negative\" >expect &&\n-\tdiff -u expect actual\n+\ttest_compare_expect expect actual\n \n '\n \n@@ -95,7 +95,7 @@ test_expect_success 'cleanup commit messages (verbatim,-t)' '\n \t{ echo;echo \"# text\";echo; } >expect &&\n \tgit commit --cleanup=verbatim -t expect -a &&\n \tgit cat-file -p HEAD |sed -e \"1,/^\\$/d\" |head -n 3 >actual &&\n-\tdiff -u expect actual\n+\ttest_compare_expect expect actual\n \n '\n \n@@ -104,7 +104,7 @@ test_expect_success 'cleanup commit messages (verbatim,-F)' '\n \techo >>negative &&\n \tgit commit --cleanup=verbatim -F expect -a &&\n \tgit cat-file -p HEAD |sed -e \"1,/^\\$/d\">actual &&\n-\tdiff -u expect actual\n+\ttest_compare_expect expect actual\n \n '\n \n@@ -113,7 +113,7 @@ test_expect_success 'cleanup commit messages (verbatim,-m)' '\n \techo >>negative &&\n \tgit commit --cleanup=verbatim -m \"$(cat expect)\" -a &&\n \tgit cat-file -p HEAD |sed -e \"1,/^\\$/d\">actual &&\n-\tdiff -u expect actual\n+\ttest_compare_expect expect actual\n \n '\n \n@@ -124,7 +124,7 @@ test_expect_success 'cleanup commit messages (whitespace,-F)' '\n \techo \"# text\" >expect &&\n \tgit commit --cleanup=whitespace -F text -a &&\n \tgit cat-file -p HEAD |sed -e \"1,/^\\$/d\">actual &&\n-\tdiff -u expect actual\n+\ttest_compare_expect expect actual\n \n '\n \n@@ -135,7 +135,7 @@ test_expect_success 'cleanup commit messages (strip,-F)' '\n \techo sample >expect &&\n \tgit commit --cleanup=strip -F text -a &&\n \tgit cat-file -p HEAD |sed -e \"1,/^\\$/d\">actual &&\n-\tdiff -u expect actual\n+\ttest_compare_expect expect actual\n \n '\n \n@@ -150,7 +150,7 @@ test_expect_success 'cleanup commit messages (strip,-F,-e)' '\n \t{ echo;echo sample;echo; } >text &&\n \tgit commit -e -F text -a &&\n \thead -n 4 .git/COMMIT_EDITMSG >actual &&\n-\tdiff -u expect actual\n+\ttest_compare_expect expect actual\n \n '\n \ndiff --git a/t/t7502-status.sh b/t/t7502-status.sh\nindex e006074..9b9c7a7 100755\n--- a/t/t7502-status.sh\n+++ b/t/t7502-status.sh\n@@ -146,7 +146,7 @@ cat <<EOF >expect\n EOF\n test_expect_success 'status of partial commit excluding new file in index' '\n \tgit status dir1/modified >output &&\n-\tdiff -u expect output\n+\ttest_compare_expect expect output\n '\n \n test_done\ndiff --git a/t/t7600-merge.sh b/t/t7600-merge.sh\nindex 50c51c8..15efd65 100755\n--- a/t/t7600-merge.sh\n+++ b/t/t7600-merge.sh\n@@ -108,7 +108,7 @@ create_merge_msgs() {\n }\n \n verify_diff() {\n-\tif ! diff -u \"$1\" \"$2\"\n+\tif ! test_compare_expect \"$1\" \"$2\"\n \tthen\n \t\techo \"$3\"\n \t\tfalse\ndiff --git a/t/t8003-blame.sh b/t/t8003-blame.sh\nindex db51b3a..153f3e2 100755\n--- a/t/t8003-blame.sh\n+++ b/t/t8003-blame.sh\n@@ -112,7 +112,7 @@ test_expect_success 'blame wholesale copy' '\n \t\techo mouse-Second\n \t\techo mouse-Third\n \t} >expected &&\n-\tdiff -u expected current\n+\ttest_compare_expect expected current\n \n '\n \n@@ -125,7 +125,7 @@ test_expect_success 'blame wholesale copy and more' '\n \t\techo cow-Fifth\n \t\techo mouse-Third\n \t} >expected &&\n-\tdiff -u expected current\n+\ttest_compare_expect expected current\n \n '\n \ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex 2efaed4..7342780 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -75,7 +75,7 @@ test_expect_success 'Show all headers' '\n \t\t-e \"s/^\\(Message-Id:\\).*/\\1 MESSAGE-ID-STRING/\" \\\n \t\t-e \"s/^\\(X-Mailer:\\).*/\\1 X-MAILER-STRING/\" \\\n \t\t>actual-show-all-headers &&\n-\tdiff -u expected-show-all-headers actual-show-all-headers\n+\ttest_compare_expect expected-show-all-headers actual-show-all-headers\n '\n \n z8=zzzzzzzz\ndiff --git a/t/t9116-git-svn-log.sh b/t/t9116-git-svn-log.sh\nindex 902ed41..80f3b39 100755\n--- a/t/t9116-git-svn-log.sh\n+++ b/t/t9116-git-svn-log.sh\n@@ -55,74 +55,74 @@ printf 'r1 \\nr2 \\nr4 \\n' > expected-range-r1-r2-r4\n \n test_expect_success 'test ascending revision range' \"\n \tgit reset --hard trunk &&\n-\tgit svn log -r 1:4 | grep '^r[0-9]' | cut -d'|' -f1 | diff -u expected-range-r1-r2-r4 -\n+\tgit svn log -r 1:4 | grep '^r[0-9]' | cut -d'|' -f1 | test_compare_expect expected-range-r1-r2-r4 -\n \t\"\n \n printf 'r4 \\nr2 \\nr1 \\n' > expected-range-r4-r2-r1\n \n test_expect_success 'test descending revision range' \"\n \tgit reset --hard trunk &&\n-\tgit svn log -r 4:1 | grep '^r[0-9]' | cut -d'|' -f1 | diff -u expected-range-r4-r2-r1 -\n+\tgit svn log -r 4:1 | grep '^r[0-9]' | cut -d'|' -f1 | test_compare_expect expected-range-r4-r2-r1 -\n \t\"\n \n printf 'r1 \\nr2 \\n' > expected-range-r1-r2\n \n test_expect_success 'test ascending revision range with unreachable revision' \"\n \tgit reset --hard trunk &&\n-\tgit svn log -r 1:3 | grep '^r[0-9]' | cut -d'|' -f1 | diff -u expected-range-r1-r2 -\n+\tgit svn log -r 1:3 | grep '^r[0-9]' | cut -d'|' -f1 | test_compare_expect expected-range-r1-r2 -\n \t\"\n \n printf 'r2 \\nr1 \\n' > expected-range-r2-r1\n \n test_expect_success 'test descending revision range with unreachable revision' \"\n \tgit reset --hard trunk &&\n-\tgit svn log -r 3:1 | grep '^r[0-9]' | cut -d'|' -f1 | diff -u expected-range-r2-r1 -\n+\tgit svn log -r 3:1 | grep '^r[0-9]' | cut -d'|' -f1 | test_compare_expect expected-range-r2-r1 -\n \t\"\n \n printf 'r2 \\n' > expected-range-r2\n \n test_expect_success 'test ascending revision range with unreachable upper boundary revision and 1 commit' \"\n \tgit reset --hard trunk &&\n-\tgit svn log -r 2:3 | grep '^r[0-9]' | cut -d'|' -f1 | diff -u expected-range-r2 -\n+\tgit svn log -r 2:3 | grep '^r[0-9]' | cut -d'|' -f1 | test_compare_expect expected-range-r2 -\n \t\"\n \n test_expect_success 'test descending revision range with unreachable upper boundary revision and 1 commit' \"\n \tgit reset --hard trunk &&\n-\tgit svn log -r 3:2 | grep '^r[0-9]' | cut -d'|' -f1 | diff -u expected-range-r2 -\n+\tgit svn log -r 3:2 | grep '^r[0-9]' | cut -d'|' -f1 | test_compare_expect expected-range-r2 -\n \t\"\n \n printf 'r4 \\n' > expected-range-r4\n \n test_expect_success 'test ascending revision range with unreachable lower boundary revision and 1 commit' \"\n \tgit reset --hard trunk &&\n-\tgit svn log -r 3:4 | grep '^r[0-9]' | cut -d'|' -f1 | diff -u expected-range-r4 -\n+\tgit svn log -r 3:4 | grep '^r[0-9]' | cut -d'|' -f1 | test_compare_expect expected-range-r4 -\n \t\"\n \n test_expect_success 'test descending revision range with unreachable lower boundary revision and 1 commit' \"\n \tgit reset --hard trunk &&\n-\tgit svn log -r 4:3 | grep '^r[0-9]' | cut -d'|' -f1 | diff -u expected-range-r4 -\n+\tgit svn log -r 4:3 | grep '^r[0-9]' | cut -d'|' -f1 | test_compare_expect expected-range-r4 -\n \t\"\n \n printf -- '------------------------------------------------------------------------\\n' > expected-separator\n \n test_expect_success 'test ascending revision range with unreachable boundary revisions and no commits' \"\n \tgit reset --hard trunk &&\n-\tgit svn log -r 5:6 | diff -u expected-separator -\n+\tgit svn log -r 5:6 | test_compare_expect expected-separator -\n \t\"\n \n test_expect_success 'test descending revision range with unreachable boundary revisions and no commits' \"\n \tgit reset --hard trunk &&\n-\tgit svn log -r 6:5 | diff -u expected-separator -\n+\tgit svn log -r 6:5 | test_compare_expect expected-separator -\n \t\"\n \n test_expect_success 'test ascending revision range with unreachable boundary revisions and 1 commit' \"\n \tgit reset --hard trunk &&\n-\tgit svn log -r 3:5 | grep '^r[0-9]' | cut -d'|' -f1 | diff -u expected-range-r4 -\n+\tgit svn log -r 3:5 | grep '^r[0-9]' | cut -d'|' -f1 | test_compare_expect expected-range-r4 -\n \t\"\n \n test_expect_success 'test descending revision range with unreachable boundary revisions and 1 commit' \"\n \tgit reset --hard trunk &&\n-\tgit svn log -r 5:3 | grep '^r[0-9]' | cut -d'|' -f1 | diff -u expected-range-r4 -\n+\tgit svn log -r 5:3 | grep '^r[0-9]' | cut -d'|' -f1 | test_compare_expect expected-range-r4 -\n \t\"\n \n test_done\ndiff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh\nindex 58c59ed..2677799 100755\n--- a/t/t9200-git-cvsexportcommit.sh\n+++ b/t/t9200-git-cvsexportcommit.sh\n@@ -37,7 +37,7 @@ check_entries () {\n \telse\n \t\tprintf '%s\\n' \"$2\" | tr '|' '\\012' >expected\n \tfi\n-\tdiff -u expected actual\n+\ttest_compare_expect expected actual\n }\n \n test_expect_success \\\n@@ -257,8 +257,8 @@ test_expect_success '-w option should work with relative GIT_DIR' '\n       (cd \"$GIT_DIR\" &&\n       GIT_DIR=. git cvsexportcommit -w \"$CVSWORK\" -c $id &&\n       check_entries \"$CVSWORK/W\" \"file1.txt/1.1/|file2.txt/1.1/\" &&\n-      diff -u \"$CVSWORK/W/file1.txt\" ../W/file1.txt &&\n-      diff -u \"$CVSWORK/W/file2.txt\" ../W/file2.txt\n+      test_compare_expect \"$CVSWORK/W/file1.txt\" ../W/file1.txt &&\n+      test_compare_expect \"$CVSWORK/W/file2.txt\" ../W/file2.txt\n       )\n '\n \n@@ -279,9 +279,9 @@ test_expect_success 'check files before directories' '\n \tgit cvsexportcommit -w \"$CVSWORK\" -c $id &&\n \tcheck_entries \"$CVSWORK/E\" \"DS/1.1/|newfile5.txt/1.1/\" &&\n \tcheck_entries \"$CVSWORK\" \"DS/1.1/|release-notes/1.2/\" &&\n-\tdiff -u \"$CVSWORK/DS\" DS &&\n-\tdiff -u \"$CVSWORK/E/DS\" E/DS &&\n-\tdiff -u \"$CVSWORK/release-notes\" release-notes\n+\ttest_compare_expect \"$CVSWORK/DS\" DS &&\n+\ttest_compare_expect \"$CVSWORK/E/DS\" E/DS &&\n+\ttest_compare_expect \"$CVSWORK/release-notes\" release-notes\n \n '\n \n@@ -293,7 +293,7 @@ test_expect_success 'commit a file with leading spaces in the name' '\n \tid=$(git rev-parse HEAD) &&\n \tgit cvsexportcommit -w \"$CVSWORK\" -c $id &&\n \tcheck_entries \"$CVSWORK\" \" space/1.1/|DS/1.1/|release-notes/1.2/\" &&\n-\tdiff -u \"$CVSWORK/ space\" \" space\"\n+\ttest_compare_expect \"$CVSWORK/ space\" \" space\"\n \n '\n \ndiff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh\nindex cceedbb..5b5ef19 100755\n--- a/t/t9300-fast-import.sh\n+++ b/t/t9300-fast-import.sh\n@@ -117,7 +117,7 @@ test_expect_success \\\n \t\t--import-marks=marks.out \\\n \t\t--export-marks=marks.new \\\n \t\t</dev/null &&\n-\tgit diff -u expect marks.new'\n+\ttest_compare_expect expect marks.new'\n \n test_tick\n cat >input <<INPUT_END\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 83889c4..73cc867 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -52,6 +52,9 @@ case $(echo $GIT_TRACE |tr \"[A-Z]\" \"[a-z]\") in\n \t\t;;\n esac\n \n+test_use_diff_u=t\n+test_compare_stdin_file_=\n+\n # Each test should start with something like this, after copyright notices:\n #\n # test_description='Description of this test...\n@@ -79,6 +82,8 @@ do\n \t\tverbose=t; shift ;;\n \t-q|--q|--qu|--qui|--quie|--quiet)\n \t\tquiet=t; shift ;;\n+\t--no-diff-u)\n+\t\ttest_use_diff_u=; shift ;;\n \t--no-color)\n \t    color=; shift ;;\n \t--no-python)\n@@ -270,6 +275,24 @@ test_expect_code () {\n \techo >&3 \"\"\n }\n \n+# Compare expected output and actual one.  The latter can be\n+# '-' to compare the expected with the standard input\n+test_compare_expect () {\n+\tcase \"$test_use_diff_u\" in\n+\tt)\n+\t\tdiff -u \"$1\" \"$2\" ;;\n+\t*)\n+\t\tcase \"$test_compare_stdin_file_\" in\n+\t\t'')\n+\t\t\ttest_compare_stdin_file_=/tmp/gittest.$$\n+\t\tesac\n+\t\tcat \"$1\" >\"$test_compare_stdin_file_.1\"\n+\t\tcat \"$2\" >\"$test_compare_stdin_file_.2\"\n+\t\tgit diff -u --no-index \\\n+\t\t\"$test_compare_stdin_file_.1\" \"$test_compare_stdin_file_.2\" ;;\n+\tesac\n+}\n+\n # Most tests can use the created repository, but some may need to create more.\n # Usage: test_create_repo <directory>\n test_create_repo () {\n@@ -288,6 +311,10 @@ test_create_repo () {\n test_done () {\n \ttrap - exit\n \n+\tif test -n \"$test_compare_stdin_file_\"\n+\tthen\n+\t\trm -f \"$test_compare_stdin_file_.[12]\"\n+\tfi\n \tif test \"$test_fixed\" != 0\n \tthen\n \t\tsay_color pass \"fixed $test_fixed known breakage(s)\"\n-- \n1.5.4.2.261.g851a5\n"},{"id":"69548","messageId":"7vmyptpniw.fsf@gitster.siamese.dyndns.org","threadId":"12230","inReplyTo":"7vr6f5pnmz.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH 0/3] solaris test results","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-02-22T05:29:11Z","receivedAt":"2008-02-22T05:29:11Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Jeff King <peff@peff.net> writes:\n>\n>> On Wed, Feb 20, 2008 at 04:34:25PM -0800, Junio C Hamano wrote:\n>> ...\n>>> It is unfair to call diff without -u \"totally broken\".  It is\n>>> not even in POSIX yet IIRC.\n>>\n>> Fair enough (and you are right that it is not even POSIX). Is it\n>> something we want to work around? We \"diff -u\" quite a bit in the test\n>> suite.\n>\n> Here is a possible solution.\n\nI have another one that converts \"cmp\" and \"cmp -s\" to the same\ntest_compare_expect, but I do not think it is worth posting\nhere.\n\nI'll either apply both or discard both.  Haven't decided.\n"},{"id":"69549","messageId":"20080222054229.GA32294@coredump.intra.peff.net","threadId":"12230","inReplyTo":"7vr6f5pnmz.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH 0/3] solaris test results","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-02-22T05:42:29Z","receivedAt":"2008-02-22T05:42:29Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Feb 21, 2008 at 09:26:44PM -0800, Junio C Hamano wrote:\n\n> Here is a possible solution.\n> \n> This is a fairly mechanical substitution (grepping for \"git diff -u\"\n> and \"diff -u\", and replacing them with test_compare_expect.\n\nI think this approach is reasonable (though as I suggested in my\noriginal message, I probably would have selected something a little\neasier to type, like test_cmp).\n\n> Test scripts can be run with --no-diff-u option, to use \"git\n> diff -u --no-index\" for comparison instead.\n\nI thought you were against using \"git diff\" in the test suite for this\npurpose.  Using \"diff -u\" produces nice output in case of failure, but\neven \"cmp\" can do the job of returning an exit code. Perhaps it makes\nsense as a more robust fallback.\n\nPerhaps the command line option should be --compare=cmp, which lets the\ncaller choose an appropriate fallback for their system (and which means\nthat you can use --compare=\"git diff\" to make debugging more pleasant,\nbut confirm with --compare=\"cmp\" before claiming breakage on the list).\n\nBut honestly, I do not care that much about this. I don't even usually\nuse Solaris; I happened to have access to a box, so I followed up on\nWhit's bug report. It is probably not worth spending a lot of time\nover-engineering a solution. I have no idea how common it is to run the\ntest suite on boxes without GNU diff.\n\n-Peff\n"},{"id":"69703","messageId":"200802232113.40100.johannes.sixt@telecom.at","threadId":"12230","inReplyTo":"20080221000044.GB6429@coredump.intra.peff.net","subject":"Re: [PATCH 2/3] t3404: use configured shell instead of /bin/sh","fromName":"Johannes Sixt","fromEmail":"johannes.sixt@telecom.at","sentAt":"2008-02-23T20:13:39Z","receivedAt":"2008-02-23T20:13:39Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"On Thursday 21 February 2008 01:00, Jeff King wrote:\n> The fake-editor shell script invoked /bin/sh; normally this\n> is fine, unless the /bin/sh doesn't meet our compatibility\n> requirements, as is the case with Solaris. Specifically, the\n> $() syntax used by fake-editor is not understood.\n>\n> Signed-off-by: Jeff King <peff@peff.net>\n...\n> -cat > fake-editor.sh <<\\EOF\n> -#!/bin/sh\n> +echo \"#!$SHELL\" >fake-editor\n\nDid you mean fake-editor.sh here?\n\n> +cat >> fake-editor.sh <<\\EOF\n>  case \"$1\" in\n>  */COMMIT_EDITMSG)\n>  \ttest -z \"$FAKE_COMMIT_MESSAGE\" || echo \"$FAKE_COMMIT_MESSAGE\" > \"$1\"\n\n-- Hannes\n"},{"id":"69704","messageId":"7vablr2zd1.fsf@gitster.siamese.dyndns.org","threadId":"12230","inReplyTo":"200802232113.40100.johannes.sixt@telecom.at","subject":"Re: [PATCH 2/3] t3404: use configured shell instead of /bin/sh","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-02-23T20:26:34Z","receivedAt":"2008-02-23T20:26:34Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Good eyes ;-)\n"},{"id":"69705","messageId":"7v63wf2yzt.fsf@gitster.siamese.dyndns.org","threadId":"12230","inReplyTo":"200802232113.40100.johannes.sixt@telecom.at","subject":"Re: [PATCH 2/3] t3404: use configured shell instead of /bin/sh","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-02-23T20:34:30Z","receivedAt":"2008-02-23T20:34:30Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"SHELL can be just \"bash\" or \"dash\" or whatever.  Makefile sets\nand exports SHELL_PATH so use it when telling which shell to use\nto fake-editor.sh\n\n t/t3404-rebase-interactive.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh\nindex 62e65d7..049aa37 100755\n--- a/t/t3404-rebase-interactive.sh\n+++ b/t/t3404-rebase-interactive.sh\n@@ -61,7 +61,7 @@ test_expect_success 'setup' '\n \tgit tag I\n '\n \n-echo \"#!$SHELL\" >fake-editor\n+echo \"#!$SHELL_PATH\" >fake-editor.sh\n cat >> fake-editor.sh <<\\EOF\n case \"$1\" in\n */COMMIT_EDITMSG)\n"},{"id":"69706","messageId":"20080223204005.GA12502@coredump.intra.peff.net","threadId":"12230","inReplyTo":"200802232113.40100.johannes.sixt@telecom.at","subject":"Re: [PATCH 2/3] t3404: use configured shell instead of /bin/sh","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-02-23T20:40:06Z","receivedAt":"2008-02-23T20:40:06Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Feb 23, 2008 at 09:13:39PM +0100, Johannes Sixt wrote:\n\n> > -cat > fake-editor.sh <<\\EOF\n> > -#!/bin/sh\n> > +echo \"#!$SHELL\" >fake-editor\n> \n> Did you mean fake-editor.sh here?\n\nGah, yes. Not sure how I was even able to run the test with that error.\n\nJunio, your $SHELL_PATH fix looks sensible, too.\n\n-Peff\n"},{"id":"69707","messageId":"7v1w732y97.fsf@gitster.siamese.dyndns.org","threadId":"12230","inReplyTo":"20080223204005.GA12502@coredump.intra.peff.net","subject":"Re: [PATCH 2/3] t3404: use configured shell instead of /bin/sh","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-02-23T20:50:28Z","receivedAt":"2008-02-23T20:50:28Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> On Sat, Feb 23, 2008 at 09:13:39PM +0100, Johannes Sixt wrote:\n>\n>> > -cat > fake-editor.sh <<\\EOF\n>> > -#!/bin/sh\n>> > +echo \"#!$SHELL\" >fake-editor\n>> \n>> Did you mean fake-editor.sh here?\n>\n> Gah, yes. Not sure how I was even able to run the test with that error.\n\nSimple.  fake-editor.sh does not begin with #! anymore and exec\ncauses /bin/sh to run, and your system happens to have a sane\nshell there.  If you used $SHELL not $SHELL_PATH and wrote to\nfake-editor.sh, you would have noticed that using $SHELL there\nwas wrong as it would have said \"#!bash\" for you ;-)\n"},{"id":"69709","messageId":"200802232209.41428.johannes.sixt@telecom.at","threadId":"12230","inReplyTo":"7v63wf2yzt.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH 2/3] t3404: use configured shell instead of /bin/sh","fromName":"Johannes Sixt","fromEmail":"johannes.sixt@telecom.at","sentAt":"2008-02-23T21:09:41Z","receivedAt":"2008-02-23T21:09:41Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"On Saturday 23 February 2008 21:34, Junio C Hamano wrote:\n> -echo \"#!$SHELL\" >fake-editor\n> +echo \"#!$SHELL_PATH\" >fake-editor.sh\n\nHm, when we run the test outside make, like\n\n   $ sh t3404-rebase-interactive.sh\n\nthen the fake-editor.sh script begins with this line:\n\n   #!\n\nIsn't this a trap similar to what Jeff wanted to avoid?\n\n-- Hannes\n"},{"id":"69710","messageId":"20080223211219.GA13178@coredump.intra.peff.net","threadId":"12230","inReplyTo":"7v1w732y97.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH 2/3] t3404: use configured shell instead of /bin/sh","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-02-23T21:12:19Z","receivedAt":"2008-02-23T21:12:19Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Feb 23, 2008 at 12:50:28PM -0800, Junio C Hamano wrote:\n\n> > Gah, yes. Not sure how I was even able to run the test with that error.\n> \n> Simple.  fake-editor.sh does not begin with #! anymore and exec\n> causes /bin/sh to run, and your system happens to have a sane\n\nI thought I tested it on the Solaris box with the broken shell, but\nperhaps not.\n\n> shell there.  If you used $SHELL not $SHELL_PATH and wrote to\n> fake-editor.sh, you would have noticed that using $SHELL there\n> was wrong as it would have said \"#!bash\" for you ;-)\n\nActually, my $SHELL is \"/usr/local/bin/bash\" on the box in question.\n\n-Peff\n"},{"id":"69711","messageId":"20080223211536.GA13280@coredump.intra.peff.net","threadId":"12230","inReplyTo":"200802232209.41428.johannes.sixt@telecom.at","subject":"Re: [PATCH 2/3] t3404: use configured shell instead of /bin/sh","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-02-23T21:15:36Z","receivedAt":"2008-02-23T21:15:36Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Feb 23, 2008 at 10:09:41PM +0100, Johannes Sixt wrote:\n\n> On Saturday 23 February 2008 21:34, Junio C Hamano wrote:\n> > -echo \"#!$SHELL\" >fake-editor\n> > +echo \"#!$SHELL_PATH\" >fake-editor.sh\n> \n> Hm, when we run the test outside make, like\n> \n>    $ sh t3404-rebase-interactive.sh\n> \n> then the fake-editor.sh script begins with this line:\n> \n>    #!\n> \n> Isn't this a trap similar to what Jeff wanted to avoid?\n\nWell, the trap I wanted to avoid is that \"/bin/sh\" specifically is\nbroken. But yes, I think losing the ability to run the tests from the\ncommandline is bad.\n\nIdeally we figured out a sane shell for our shell scripts in the main\nbuild process, and we want to always use that here.  I think \"git\nrev-parse --sane-shell-path\" is probably overkill. Maybe test-lib.sh can\nsource a file of build-time options? The \"diff -u\" vs \"cmp\" thing could\ngo there, as well.\n\n-Peff\n"},{"id":"69717","messageId":"7vmypr1gmh.fsf@gitster.siamese.dyndns.org","threadId":"12230","inReplyTo":"20080223211536.GA13280@coredump.intra.peff.net","subject":"Re: [PATCH 2/3] t3404: use configured shell instead of /bin/sh","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-02-23T21:56:38Z","receivedAt":"2008-02-23T21:56:38Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> Well, the trap I wanted to avoid is that \"/bin/sh\" specifically is\n> broken. But yes, I think losing the ability to run the tests from the\n> commandline is bad.\n\nWe never had it.  \"make t3404-rebase-interactive\" is the way to\ndo so.\n"},{"id":"69722","messageId":"20080223222837.GA13628@coredump.intra.peff.net","threadId":"12230","inReplyTo":"20080223211219.GA13178@coredump.intra.peff.net","subject":"Re: [PATCH 2/3] t3404: use configured shell instead of /bin/sh","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-02-23T22:28:37Z","receivedAt":"2008-02-23T22:28:37Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Feb 23, 2008 at 04:12:19PM -0500, Jeff King wrote:\n\n> > shell there.  If you used $SHELL not $SHELL_PATH and wrote to\n> > fake-editor.sh, you would have noticed that using $SHELL there\n> > was wrong as it would have said \"#!bash\" for you ;-)\n> \n> Actually, my $SHELL is \"/usr/local/bin/bash\" on the box in question.\n\nHmm. Actually, we just set SHELL_PATH to SHELL in the Makefile. So I\nreally don't see the point of SHELL_PATH at all, unless there are some\nsetups where it is already set outside of git.\n\n-Peff\n"},{"id":"69724","messageId":"7v4pbz1etm.fsf@gitster.siamese.dyndns.org","threadId":"12230","inReplyTo":"20080223222837.GA13628@coredump.intra.peff.net","subject":"Re: [PATCH 2/3] t3404: use configured shell instead of /bin/sh","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-02-23T22:35:33Z","receivedAt":"2008-02-23T22:35:33Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> On Sat, Feb 23, 2008 at 04:12:19PM -0500, Jeff King wrote:\n>\n>> > shell there.  If you used $SHELL not $SHELL_PATH and wrote to\n>> > fake-editor.sh, you would have noticed that using $SHELL there\n>> > was wrong as it would have said \"#!bash\" for you ;-)\n>> \n>> Actually, my $SHELL is \"/usr/local/bin/bash\" on the box in question.\n>\n> Hmm. Actually, we just set SHELL_PATH to SHELL in the Makefile. So I\n> really don't see the point of SHELL_PATH at all, unless there are some\n> setups where it is already set outside of git.\n\nWell, on one of my machines, I seem to be getting SHELL=bash\n(not /bin/bash).\n\nHonestly, I do not think it matters getting the value from\nMakefile for this particular case, but I'd rather get people\ninto habits to run \"make tXXXX-name\", not \"sh ./tXXXX-name.sh\",\nunless they know what they are doing.\n"},{"id":"69726","messageId":"20080223223933.GA13683@coredump.intra.peff.net","threadId":"12230","inReplyTo":"7vmypr1gmh.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH 2/3] t3404: use configured shell instead of /bin/sh","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-02-23T22:39:33Z","receivedAt":"2008-02-23T22:39:33Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Feb 23, 2008 at 01:56:38PM -0800, Junio C Hamano wrote:\n\n> > Well, the trap I wanted to avoid is that \"/bin/sh\" specifically is\n> > broken. But yes, I think losing the ability to run the tests from the\n> > commandline is bad.\n> \n> We never had it.  \"make t3404-rebase-interactive\" is the way to\n> do so.\n\nWell, that is a surprise to me, since I have been using it for almost\ntwo years with no problems. And I know I am not alone because others\nhave posted snippets on the list invoking a test via \"sh -x\", including\nboth Dscho and you.\n\nIs there a good reason not to do so?\n\n-Peff\n"},{"id":"69727","messageId":"20080223224405.GB13683@coredump.intra.peff.net","threadId":"12230","inReplyTo":"7v4pbz1etm.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH 2/3] t3404: use configured shell instead of /bin/sh","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-02-23T22:44:05Z","receivedAt":"2008-02-23T22:44:05Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Feb 23, 2008 at 02:35:33PM -0800, Junio C Hamano wrote:\n\n> > Hmm. Actually, we just set SHELL_PATH to SHELL in the Makefile. So I\n> > really don't see the point of SHELL_PATH at all, unless there are some\n> > setups where it is already set outside of git.\n> \n> Well, on one of my machines, I seem to be getting SHELL=bash\n> (not /bin/bash).\n\nMy point is that nothing ever turns that into /bin/bash, unless there is\nsomething totally outside of git setting up SHELL_PATH (which is not set\nup on any of my systems). I would think to handle the case you're\ntalking about, you would want to change\n\n  SHELL_PATH ?= $(SHELL)\n\nto something like\n\n  SHELL_PATH ?= $(shell which $(SHELL))\n\n> Honestly, I do not think it matters getting the value from\n> Makefile for this particular case, but I'd rather get people\n> into habits to run \"make tXXXX-name\", not \"sh ./tXXXX-name.sh\",\n> unless they know what they are doing.\n\nWhy?\n\n-Peff\n"},{"id":"69729","messageId":"7vve4fz3y1.fsf@gitster.siamese.dyndns.org","threadId":"12230","inReplyTo":"20080223223933.GA13683@coredump.intra.peff.net","subject":"Re: [PATCH 2/3] t3404: use configured shell instead of /bin/sh","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-02-23T22:46:30Z","receivedAt":"2008-02-23T22:46:30Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> On Sat, Feb 23, 2008 at 01:56:38PM -0800, Junio C Hamano wrote:\n>\n>> > Well, the trap I wanted to avoid is that \"/bin/sh\" specifically is\n>> > broken. But yes, I think losing the ability to run the tests from the\n>> > commandline is bad.\n>> \n>> We never had it.  \"make t3404-rebase-interactive\" is the way to\n>> do so.\n>\n> Well, that is a surprise to me, since I have been using it for almost\n> two years with no problems. And I know I am not alone because others\n> have posted snippets on the list invoking a test via \"sh -x\", including\n> both Dscho and you.\n>\n> Is there a good reason not to do so?\n\nI think our messages are crossing, but (1) currently we do not\nexport much from t/Makefile and the only people who can get\naffected are on platforms that do need custom configuration, and\nthe difference being subtle and rare makes it more surprising\nand harder to diagnose when the difference does matter, (2) I'd\nlike to place some stuff in t/Makefile in such a way that no\ntests that runs a server that listens to a network port is not\nrun by default, among other things, which means the difference\nbetween \"sh tXXXX-name.sh\" and \"make tXXXX-name\" will get\nbigger not smaller.\n"},{"id":"69730","messageId":"20080223224938.GA14231@coredump.intra.peff.net","threadId":"12230","inReplyTo":"7vve4fz3y1.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH 2/3] t3404: use configured shell instead of /bin/sh","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-02-23T22:49:38Z","receivedAt":"2008-02-23T22:49:38Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Feb 23, 2008 at 02:46:30PM -0800, Junio C Hamano wrote:\n\n> I think our messages are crossing, but (1) currently we do not\n> export much from t/Makefile and the only people who can get\n> affected are on platforms that do need custom configuration, and\n> the difference being subtle and rare makes it more surprising\n> and harder to diagnose when the difference does matter, (2) I'd\n> like to place some stuff in t/Makefile in such a way that no\n> tests that runs a server that listens to a network port is not\n> run by default, among other things, which means the difference\n> between \"sh tXXXX-name.sh\" and \"make tXXXX-name\" will get\n> bigger not smaller.\n\nOK, thanks for explaining (point 2 was what I was looking for).\nPersonally, I think we are better off putting such configuration into a\nfile that gets sourced by test-lib.sh, but I don't overly care. I _do_\nfind \"sh -x tXXXX-name.sh\" useful from time to time, but mainly only\nwhile debugging the test scripts themselves.\n\n-Peff\n"},{"id":"69732","messageId":"7vir0fz3ip.fsf@gitster.siamese.dyndns.org","threadId":"12230","inReplyTo":"20080223224938.GA14231@coredump.intra.peff.net","subject":"Re: [PATCH 2/3] t3404: use configured shell instead of /bin/sh","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-02-23T22:55:42Z","receivedAt":"2008-02-23T22:55:42Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> Personally, I think we are better off putting such configuration into a\n> file that gets sourced by test-lib.sh, but I don't overly care. I _do_\n> find \"sh -x tXXXX-name.sh\" useful from time to time, but mainly only\n> while debugging the test scripts themselves.\n\nI do too.\n\nI think the basic goal should be to come up with a way to make\nsure that \"cd t/ && make\" and \"cd t/ && sh -x tXXXX-name.sh\"\nwould get an environment as close as possible to what happens\nwhen you run \"make test\" at the toplevel.\n"},{"id":"69736","messageId":"20080223231253.GA14320@coredump.intra.peff.net","threadId":"12230","inReplyTo":"7vir0fz3ip.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH 2/3] t3404: use configured shell instead of /bin/sh","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-02-23T23:12:53Z","receivedAt":"2008-02-23T23:12:53Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Feb 23, 2008 at 02:55:42PM -0800, Junio C Hamano wrote:\n\n> I think the basic goal should be to come up with a way to make\n> sure that \"cd t/ && make\" and \"cd t/ && sh -x tXXXX-name.sh\"\n> would get an environment as close as possible to what happens\n> when you run \"make test\" at the toplevel.\n\nI was thinking of something like this:\n\n---\ndiff --git a/Makefile b/Makefile\nindex d33a556..9046b43 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -808,7 +808,7 @@ export TAR INSTALL DESTDIR SHELL_PATH\n \n ### Build rules\n \n-all:: $(ALL_PROGRAMS) $(BUILT_INS) $(OTHER_PROGRAMS)\n+all:: $(ALL_PROGRAMS) $(BUILT_INS) $(OTHER_PROGRAMS) GIT-BUILD-OPTIONS\n ifneq (,$X)\n \t$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), $(RM) '$p';)\n endif\n@@ -1010,6 +1010,9 @@ GIT-CFLAGS: .FORCE-GIT-CFLAGS\n \t\techo \"$$FLAGS\" >GIT-CFLAGS; \\\n             fi\n \n+GIT-BUILD-OPTIONS: .FORCE-GIT-BUILD-OPTIONS\n+\t@echo SHELL_PATH='$(SHELL_PATH_SQ)' >$@\n+\n ### Detect Tck/Tk interpreter path changes\n ifndef NO_TCLTK\n TRACK_VARS = $(subst ','\\'',-DTCLTK_PATH='$(TCLTK_PATH_SQ)')\n@@ -1169,6 +1172,7 @@ endif\n \n .PHONY: all install clean strip\n .PHONY: .FORCE-GIT-VERSION-FILE TAGS tags cscope .FORCE-GIT-CFLAGS\n+.PHONY: .FORCE-GIT-BUILD-OPTIONS\n \n ### Check documentation\n #\ndiff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh\nindex 62e65d7..049aa37 100755\n--- a/t/t3404-rebase-interactive.sh\n+++ b/t/t3404-rebase-interactive.sh\n@@ -61,7 +61,7 @@ test_expect_success 'setup' '\n \tgit tag I\n '\n \n-echo \"#!$SHELL\" >fake-editor\n+echo \"#!$SHELL_PATH\" >fake-editor.sh\n cat >> fake-editor.sh <<\\EOF\n case \"$1\" in\n */COMMIT_EDITMSG)\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 83889c4..3c4e21f 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -342,6 +342,8 @@ if ! test -x ../test-chmtime; then\n \texit 1\n fi\n \n+. ../GIT-BUILD-OPTIONS\n+\n # Test repository\n test=trash\n rm -fr \"$test\"\n"},{"id":"69753","messageId":"7vfxvjxlsv.fsf@gitster.siamese.dyndns.org","threadId":"12230","inReplyTo":"20080223231253.GA14320@coredump.intra.peff.net","subject":"Re: [PATCH 2/3] t3404: use configured shell instead of /bin/sh","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-02-24T00:03:44Z","receivedAt":"2008-02-24T00:03:44Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> On Sat, Feb 23, 2008 at 02:55:42PM -0800, Junio C Hamano wrote:\n>\n>> I think the basic goal should be to come up with a way to make\n>> sure that \"cd t/ && make\" and \"cd t/ && sh -x tXXXX-name.sh\"\n>> would get an environment as close as possible to what happens\n>> when you run \"make test\" at the toplevel.\n>\n> I was thinking of something like this:\n> ...\n> diff --git a/t/test-lib.sh b/t/test-lib.sh\n> index 83889c4..3c4e21f 100644\n> --- a/t/test-lib.sh\n> +++ b/t/test-lib.sh\n> @@ -342,6 +342,8 @@ if ! test -x ../test-chmtime; then\n>  \texit 1\n>  fi\n>  \n> +. ../GIT-BUILD-OPTIONS\n\nSounds sane to me.\n"},{"id":"69813","messageId":"20080224194045.GA27606@coredump.intra.peff.net","threadId":"12230","inReplyTo":"7vfxvjxlsv.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH 2/3] t3404: use configured shell instead of /bin/sh","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-02-24T19:40:45Z","receivedAt":"2008-02-24T19:40:45Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Feb 23, 2008 at 04:03:44PM -0800, Junio C Hamano wrote:\n\n> Sounds sane to me.\n\nOK, here it is cleaned up a little (adding some missing quotation marks\nand the proper gitignore) and with a commit message.\n\nPossibly t/Makefile should also be getting this information to actually\nrun the test scripts. That would require either:\n  - making the GIT-BUILD-OPTIONS both make and shell parseable, meaning\n    changing SHELL_PATH='$(SHELL_PATH_SQ)' into SHELL_PATH=$(SHELL_PATH)\n    and hoping nobody uses metacharacters\n  - writing two separate files, one for shell and one for make\n  - working some Makefile magic to set variables from the shell; this is\n    not possible in ordinary make, but I suspect there are some GNU-isms\n    we could use\n\n-- >8 --\nuse build-time SHELL_PATH in test scripts\n\nThe top-level Makefile now creates a GIT-BUILD-OPTIONS file\nwhich stores any options selected by the make process that\nmay be of use to further parts of the build process.\nSpecifically, we store the SHELL_PATH so that it can be used\nby tests to construct shell scripts on the fly.\n\nThe format of the GIT-BUILD-OPTIONS file is Bourne shell,\nand it is sourced by test-lib.sh; all tests can rely on just\nhaving $SHELL_PATH correctly set in the environment.\n\nThe GIT-BUILD-OPTIONS file is written every time the\ntoplevel 'make' is invoked. Since the only users right now\nare the test scripts, there's no drawback to updating its\ntimestamp. If something build-related depends on this, we\ncan do a trick similar to the one used by GIT-CFLAGS.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n .gitignore                    |    1 +\n Makefile                      |    6 +++++-\n t/t3404-rebase-interactive.sh |    2 +-\n t/test-lib.sh                 |    2 ++\n 4 files changed, 9 insertions(+), 2 deletions(-)\n\ndiff --git a/.gitignore b/.gitignore\nindex 165b256..4ff2fec 100644\n--- a/.gitignore\n+++ b/.gitignore\n@@ -1,3 +1,4 @@\n+GIT-BUILD-OPTIONS\n GIT-CFLAGS\n GIT-GUI-VARS\n GIT-VERSION-FILE\ndiff --git a/Makefile b/Makefile\nindex d33a556..ba1aaf8 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -808,7 +808,7 @@ export TAR INSTALL DESTDIR SHELL_PATH\n \n ### Build rules\n \n-all:: $(ALL_PROGRAMS) $(BUILT_INS) $(OTHER_PROGRAMS)\n+all:: $(ALL_PROGRAMS) $(BUILT_INS) $(OTHER_PROGRAMS) GIT-BUILD-OPTIONS\n ifneq (,$X)\n \t$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), $(RM) '$p';)\n endif\n@@ -1010,6 +1010,9 @@ GIT-CFLAGS: .FORCE-GIT-CFLAGS\n \t\techo \"$$FLAGS\" >GIT-CFLAGS; \\\n             fi\n \n+GIT-BUILD-OPTIONS: .FORCE-GIT-BUILD-OPTIONS\n+\t@echo SHELL_PATH='$(SHELL_PATH_SQ)' >$@\n+\n ### Detect Tck/Tk interpreter path changes\n ifndef NO_TCLTK\n TRACK_VARS = $(subst ','\\'',-DTCLTK_PATH='$(TCLTK_PATH_SQ)')\n@@ -1169,6 +1172,7 @@ endif\n \n .PHONY: all install clean strip\n .PHONY: .FORCE-GIT-VERSION-FILE TAGS tags cscope .FORCE-GIT-CFLAGS\n+.PHONY: .FORCE-GIT-BUILD-OPTIONS\n \n ### Check documentation\n #\ndiff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh\nindex 62e65d7..049aa37 100755\n--- a/t/t3404-rebase-interactive.sh\n+++ b/t/t3404-rebase-interactive.sh\n@@ -61,7 +61,7 @@ test_expect_success 'setup' '\n \tgit tag I\n '\n \n-echo \"#!$SHELL\" >fake-editor\n+echo \"#!$SHELL_PATH\" >fake-editor.sh\n cat >> fake-editor.sh <<\\EOF\n case \"$1\" in\n */COMMIT_EDITMSG)\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 83889c4..3c4e21f 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -342,6 +342,8 @@ if ! test -x ../test-chmtime; then\n \texit 1\n fi\n \n+. ../GIT-BUILD-OPTIONS\n+\n # Test repository\n test=trash\n rm -fr \"$test\"\n-- \n1.5.4.2.276.g0ede\n"}]}