{"thread":{"id":"14599","subject":"[PATCH] perl/Makefile: update NO_PERL_MAKEMAKER section","startedAt":"2008-07-22T21:15:41Z","lastAt":"2008-07-25T19:37:33Z","messageCount":23,"participants":["Brandon Casey","Petr Baudis","Junio C Hamano","Miklos Vajna","Stephan Beyer"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"84369","messageId":"XKT02T_QW2tKLHpR7e3VuZjLXv3RP2E0GD54gXKrdIFm8xQsKvAyjg@cipher.nrlssc.navy.mil","threadId":"14599","inReplyTo":"0GfECozN3g0ZvAESKMi76RyOVHEb2OhhwET9GWmEm7pbzYQJub50UlWpZtBa7MGn1UGb-7mzbzE@cipher.nrlssc.navy.mil","subject":"[PATCH] perl/Makefile: update NO_PERL_MAKEMAKER section","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2008-07-22T21:15:41Z","receivedAt":"2008-07-22T21:15:41Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"The perl modules must be copied to blib/lib so they are available for\ntesting.\n\nSigned-off-by: Brandon Casey <casey@nrlssc.navy.mil>\n---\n perl/Makefile |    7 +++++--\n 1 files changed, 5 insertions(+), 2 deletions(-)\n\ndiff --git a/perl/Makefile b/perl/Makefile\nindex 5e079ad..2b0d3d5 100644\n--- a/perl/Makefile\n+++ b/perl/Makefile\n@@ -22,8 +22,11 @@ clean:\n ifdef NO_PERL_MAKEMAKER\n instdir_SQ = $(subst ','\\'',$(prefix)/lib)\n $(makfile): ../GIT-CFLAGS Makefile\n-\techo all: > $@\n-\techo '\t:' >> $@\n+\techo all: private-Error.pm Git.pm > $@\n+\techo '\tmkdir -p blib/lib' >> $@\n+\techo '\t$(RM) blib/lib/Git.pm; cp Git.pm blib/lib/' >> $@\n+\techo '\t$(RM) blib/lib/Error.pm; \\\n+\tcp private-Error.pm blib/lib/Error.pm' >> $@\n \techo install: >> $@\n \techo '\tmkdir -p $(instdir_SQ)' >> $@\n \techo '\t$(RM) $(instdir_SQ)/Git.pm; cp Git.pm $(instdir_SQ)' >> $@\n-- \n1.6.0.rc0.38.g8b8fb7\n"},{"id":"84370","messageId":"k-pcfapbFwwISYvjf34W3d-E7j-DCb9tf-MW1z8rFObaPKgPJEmD7Q@cipher.nrlssc.navy.mil","threadId":"14599","inReplyTo":"0GfECozN3g0ZvAESKMi76RyOVHEb2OhhwET9GWmEm7pbzYQJub50UlWpZtBa7MGn1UGb-7mzbzE@cipher.nrlssc.navy.mil","subject":"[PATCH] t9700/test.pl: backwards compatibility improvements","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2008-07-22T21:16:05Z","receivedAt":"2008-07-22T21:16:05Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Some versions of perl complain when 'STDERR' is used as the third argument\nin the 3-argument form of open(). Convert to the 2-argument form which is\ndescribed for duping STDERR in my second edition camel book.\n\nThe object oriented version of File::Temp is a rather new incarnation it\nseems. The File::Temp man page for v5.8.0 says \"(NOT YET IMPLEMENTED)\" in\nthe 'Objects' section. These can be converted to use File::Temp::tempfile().\n\nSigned-off-by: Brandon Casey <casey@nrlssc.navy.mil>\n---\n t/t9700/test.pl |   12 ++++++------\n 1 files changed, 6 insertions(+), 6 deletions(-)\n\ndiff --git a/t/t9700/test.pl b/t/t9700/test.pl\nindex 4d23125..70f9836 100755\n--- a/t/t9700/test.pl\n+++ b/t/t9700/test.pl\n@@ -38,7 +38,7 @@ is($r->get_color(\"color.test.slot1\", \"red\"), $ansi_green, \"get_color\");\n # Failure cases for config:\n # Save and restore STDERR; we will probably extract this into a\n # \"dies_ok\" method and possibly move the STDERR handling to Git.pm.\n-open our $tmpstderr, \">&\", STDERR or die \"cannot save STDERR\"; close STDERR;\n+open our $tmpstderr, \">&STDERR\" or die \"cannot save STDERR\"; close STDERR;\n eval { $r->config(\"test.dupstring\") };\n ok($@, \"config: duplicate entry in scalar context fails\");\n eval { $r->config_bool(\"test.boolother\") };\n@@ -69,18 +69,18 @@ is($r->ident_person(\"Name\", \"email\", \"123 +0000\"), \"Name <email>\",\n \n # objects and hashes\n ok(our $file1hash = $r->command_oneline('rev-parse', \"HEAD:file1\"), \"(get file hash)\");\n-our $tmpfile = File::Temp->new;\n+our ($tmpfile, $tmpnam) = File::Temp::tempfile();\n is($r->cat_blob($file1hash, $tmpfile), 15, \"cat_blob: size\");\n our $blobcontents;\n { local $/; seek $tmpfile, 0, 0; $blobcontents = <$tmpfile>; }\n is($blobcontents, \"changed file 1\\n\", \"cat_blob: data\");\n seek $tmpfile, 0, 0;\n-is(Git::hash_object(\"blob\", $tmpfile), $file1hash, \"hash_object: roundtrip\");\n-$tmpfile = File::Temp->new();\n+is(Git::hash_object(\"blob\", $tmpnam), $file1hash, \"hash_object: roundtrip\");\n+($tmpfile, $tmpnam) = File::Temp::tempfile();\n print $tmpfile my $test_text = \"test blob, to be inserted\\n\";\n-like(our $newhash = $r->hash_and_insert_object($tmpfile), qr/[0-9a-fA-F]{40}/,\n+like(our $newhash = $r->hash_and_insert_object($tmpnam), qr/[0-9a-fA-F]{40}/,\n      \"hash_and_insert_object: returns hash\");\n-$tmpfile = File::Temp->new;\n+$tmpfile = File::Temp::tempfile();\n is($r->cat_blob($newhash, $tmpfile), length $test_text, \"cat_blob: roundtrip size\");\n { local $/; seek $tmpfile, 0, 0; $blobcontents = <$tmpfile>; }\n is($blobcontents, $test_text, \"cat_blob: roundtrip data\");\n-- \n1.6.0.rc0.38.g8b8fb7\n"},{"id":"84371","messageId":"TE3N1FoSy-vEEv0qsAyvBwBMMq2RuJCWYw7DNLBC7mEh6PxM1LCsOw@cipher.nrlssc.navy.mil","threadId":"14599","inReplyTo":"0GfECozN3g0ZvAESKMi76RyOVHEb2OhhwET9GWmEm7pbzYQJub50UlWpZtBa7MGn1UGb-7mzbzE@cipher.nrlssc.navy.mil","subject":"[PATCH] t4116-apply-reverse.sh: use $TAR rather than tar","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2008-07-22T21:16:25Z","receivedAt":"2008-07-22T21:16:25Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>\n---\n t/t4116-apply-reverse.sh |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t4116-apply-reverse.sh b/t/t4116-apply-reverse.sh\nindex 1459a90..2298ece 100755\n--- a/t/t4116-apply-reverse.sh\n+++ b/t/t4116-apply-reverse.sh\n@@ -48,12 +48,12 @@ test_expect_success 'apply in reverse' '\n \n test_expect_success 'setup separate repository lacking postimage' '\n \n-\tgit tar-tree initial initial | tar xf - &&\n+\tgit tar-tree initial initial | $TAR xf - &&\n \t(\n \t\tcd initial && git init && git add .\n \t) &&\n \n-\tgit tar-tree second second | tar xf - &&\n+\tgit tar-tree second second | $TAR xf - &&\n \t(\n \t\tcd second && git init && git add .\n \t)\n-- \n1.6.0.rc0.38.g8b8fb7\n"},{"id":"84373","messageId":"hQLzs7uznR2DlUhN5OKjUZqeIVMnE5x0w2zVo6ve1hi_9wvQvkrJrQ@cipher.nrlssc.navy.mil","threadId":"14599","inReplyTo":"0GfECozN3g0ZvAESKMi76RyOVHEb2OhhwET9GWmEm7pbzYQJub50UlWpZtBa7MGn1UGb-7mzbzE@cipher.nrlssc.navy.mil","subject":"[PATCH] t3200,t7201: replace '!' with test_must_fail","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2008-07-22T21:16:54Z","receivedAt":"2008-07-22T21:16:54Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>\n---\n t/t3200-branch.sh |    2 +-\n t/t7201-co.sh     |    2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t3200-branch.sh b/t/t3200-branch.sh\nindex 7c583c8..7a83fbf 100755\n--- a/t/t3200-branch.sh\n+++ b/t/t3200-branch.sh\n@@ -200,7 +200,7 @@ test_expect_success \\\n \n test_expect_success \\\n     'branch from non-branch HEAD w/--track causes failure' \\\n-    '!(git branch --track my10 HEAD^)'\n+    'test_must_fail git branch --track my10 HEAD^'\n \n # Keep this test last, as it changes the current branch\n cat >expect <<EOF\ndiff --git a/t/t7201-co.sh b/t/t7201-co.sh\nindex 3111baa..9ad5d63 100755\n--- a/t/t7201-co.sh\n+++ b/t/t7201-co.sh\n@@ -335,6 +335,6 @@ test_expect_success \\\n     git checkout -b delete-me master &&\n     rm .git/refs/heads/delete-me &&\n     test refs/heads/delete-me = \"$(git symbolic-ref HEAD)\" &&\n-    !(git checkout --track -b track)'\n+    test_must_fail git checkout --track -b track'\n \n test_done\n-- \n1.6.0.rc0.38.g8b8fb7\n"},{"id":"84372","messageId":"E23rxnPh0xeYPsUuTseZ3Y6bteX3uHIcbLzTlyVPsX_N5fqcvRp1vA@cipher.nrlssc.navy.mil","threadId":"14599","inReplyTo":"0GfECozN3g0ZvAESKMi76RyOVHEb2OhhwET9GWmEm7pbzYQJub50UlWpZtBa7MGn1UGb-7mzbzE@cipher.nrlssc.navy.mil","subject":"[PATCH] t/: Replace diff [-u|-U0] with test_cmp to allow compilation with old diff","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2008-07-22T21:17:43Z","receivedAt":"2008-07-22T21:17:43Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>\n---\n t/t0002-gitfile.sh               |    2 +-\n t/t1002-read-tree-m-u-2way.sh    |   12 ++++++------\n t/t2201-add-update-typechange.sh |   10 +++++-----\n 3 files changed, 12 insertions(+), 12 deletions(-)\n\ndiff --git a/t/t0002-gitfile.sh b/t/t0002-gitfile.sh\nindex c5dbc72..4db4ac4 100755\n--- a/t/t0002-gitfile.sh\n+++ b/t/t0002-gitfile.sh\n@@ -66,7 +66,7 @@ test_expect_success 'check hash-object' '\n \n test_expect_success 'check cat-file' '\n \tgit cat-file blob $SHA >actual &&\n-\tdiff -u bar actual\n+\ttest_cmp bar actual\n '\n \n test_expect_success 'check update-index' '\ndiff --git a/t/t1002-read-tree-m-u-2way.sh b/t/t1002-read-tree-m-u-2way.sh\nindex e04990e..aa9dd58 100755\n--- a/t/t1002-read-tree-m-u-2way.sh\n+++ b/t/t1002-read-tree-m-u-2way.sh\n@@ -112,7 +112,7 @@ test_expect_success \\\n      git update-index --add frotz &&\n      git read-tree -m -u $treeH $treeM &&\n      git ls-files --stage >6.out &&\n-     diff -U0 M.out 6.out &&\n+     test_cmp M.out 6.out &&\n      check_cache_at frotz clean &&\n      sum bozbar frotz nitfol >actual3.sum &&\n      cmp M.sum actual3.sum &&\n@@ -129,7 +129,7 @@ test_expect_success \\\n      echo frotz frotz >frotz &&\n      git read-tree -m -u $treeH $treeM &&\n      git ls-files --stage >7.out &&\n-     diff -U0 M.out 7.out &&\n+     test_cmp M.out 7.out &&\n      check_cache_at frotz dirty &&\n      sum bozbar frotz nitfol >actual7.sum &&\n      if cmp M.sum actual7.sum; then false; else :; fi &&\n@@ -264,7 +264,7 @@ test_expect_success \\\n      git update-index --add bozbar &&\n      git read-tree -m -u $treeH $treeM &&\n      git ls-files --stage >18.out &&\n-     diff -U0 M.out 18.out &&\n+     test_cmp M.out 18.out &&\n      check_cache_at bozbar clean &&\n      sum bozbar frotz nitfol >actual18.sum &&\n      cmp M.sum actual18.sum'\n@@ -278,7 +278,7 @@ test_expect_success \\\n      echo gnusto gnusto >bozbar &&\n      git read-tree -m -u $treeH $treeM &&\n      git ls-files --stage >19.out &&\n-     diff -U0 M.out 19.out &&\n+     test_cmp M.out 19.out &&\n      check_cache_at bozbar dirty &&\n      sum frotz nitfol >actual19.sum &&\n      grep -v bozbar  M.sum > expected19.sum &&\n@@ -297,7 +297,7 @@ test_expect_success \\\n      git update-index --add bozbar &&\n      git read-tree -m -u $treeH $treeM &&\n      git ls-files --stage >20.out &&\n-     diff -U0 M.out 20.out &&\n+     test_cmp M.out 20.out &&\n      check_cache_at bozbar clean &&\n      sum bozbar frotz nitfol >actual20.sum &&\n      cmp M.sum actual20.sum'\n@@ -338,7 +338,7 @@ test_expect_success \\\n      git update-index --add DF &&\n      git read-tree -m -u $treeDF $treeDFDF &&\n      git ls-files --stage >DFDFcheck.out &&\n-     diff -U0 DFDF.out DFDFcheck.out &&\n+     test_cmp DFDF.out DFDFcheck.out &&\n      check_cache_at DF/DF clean'\n \n test_done\ndiff --git a/t/t2201-add-update-typechange.sh b/t/t2201-add-update-typechange.sh\nindex e15e3eb..d24c7d9 100755\n--- a/t/t2201-add-update-typechange.sh\n+++ b/t/t2201-add-update-typechange.sh\n@@ -106,12 +106,12 @@ test_expect_success modify '\n \n test_expect_success diff-files '\n \tgit diff-files --raw >actual &&\n-\tdiff -u expect-files actual\n+\ttest_cmp expect-files actual\n '\n \n test_expect_success diff-index '\n \tgit diff-index --raw HEAD -- >actual &&\n-\tdiff -u expect-index actual\n+\ttest_cmp expect-index actual\n '\n \n test_expect_success 'add -u' '\n@@ -119,7 +119,7 @@ test_expect_success 'add -u' '\n \tcp -p \".git/index\" \".git/saved-index\" &&\n \tgit add -u &&\n \tgit ls-files -s >actual &&\n-\tdiff -u expect-final actual\n+\ttest_cmp expect-final actual\n '\n \n test_expect_success 'commit -a' '\n@@ -130,11 +130,11 @@ test_expect_success 'commit -a' '\n \tfi &&\n \tgit commit -m \"second\" -a &&\n \tgit ls-files -s >actual &&\n-\tdiff -u expect-final actual &&\n+\ttest_cmp expect-final actual &&\n \trm -f .git/index &&\n \tgit read-tree HEAD &&\n \tgit ls-files -s >actual &&\n-\tdiff -u expect-final actual\n+\ttest_cmp expect-final actual\n '\n \n test_done\n-- \n1.6.0.rc0.38.g8b8fb7\n"},{"id":"84375","messageId":"Koa4iojOlOQ_YENPwWXKt7G8Aa1x6UaBnFFtliKdZmpcrrqOBhY7NQ@cipher.nrlssc.navy.mil","threadId":"14599","inReplyTo":"0GfECozN3g0ZvAESKMi76RyOVHEb2OhhwET9GWmEm7pbzYQJub50UlWpZtBa7MGn1UGb-7mzbzE@cipher.nrlssc.navy.mil","subject":"[PATCH] t7502-commit.sh: rearrange test to make more portable","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2008-07-22T21:21:10Z","receivedAt":"2008-07-22T21:21:10Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"\nSome shells have problems with one-shot variable assignment notation\nand function calls. The sequence is rearranged to avoid the one-shot\nand to allow the test script to be linked together with '&&'.\n\nSigned-off-by: Brandon Casey <casey@nrlssc.navy.mil>\n---\n t/t7502-commit.sh |    8 +++++---\n 1 files changed, 5 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t7502-commit.sh b/t/t7502-commit.sh\nindex c25eff9..ad84c3d 100755\n--- a/t/t7502-commit.sh\n+++ b/t/t7502-commit.sh\n@@ -228,10 +228,12 @@ EOF\n \n test_expect_success 'a SIGTERM should break locks' '\n \techo >>negative &&\n-\t\"$SHELL_PATH\" -c '\\''\n+\t! \"$SHELL_PATH\" -c '\\''\n \t  echo kill -TERM $$ >> .git/FAKE_EDITOR\n-\t  GIT_EDITOR=.git/FAKE_EDITOR exec git commit -a'\\'' && exit 1  # should fail\n-\t! test -f .git/index.lock\n+\t  GIT_EDITOR=.git/FAKE_EDITOR \n+\t  export GIT_EDITOR\n+\t  exec git commit -a'\\'' &&\n+\ttest ! -f .git/index.lock\n '\n \n rm -f .git/MERGE_MSG .git/COMMIT_EDITMSG\n-- \n1.6.0.rc0.38.g8b8fb7\n"},{"id":"84376","messageId":"LYsdPT0j_XgCi1Weyj5TOaloxtMJN0eFb0f6uag-lNlOoVmPI1sKIA@cipher.nrlssc.navy.mil","threadId":"14599","inReplyTo":"0GfECozN3g0ZvAESKMi76RyOVHEb2OhhwET9GWmEm7pbzYQJub50UlWpZtBa7MGn1UGb-7mzbzE@cipher.nrlssc.navy.mil","subject":"[PATCH] t/t4202-log.sh: add newline at end of file","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2008-07-22T21:23:31Z","receivedAt":"2008-07-22T21:23:31Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Some shells hang when parsing the script if the last statement is not\nfollowed by a newline. So add one.\n\nSigned-off-by: Brandon Casey <casey@nrlssc.navy.mil>\n---\n\n\nI expect this is a bug in ksh. The ksh installed on my solaris box went\ninto some infinite loop on this script, continually allocating memory.\nAdding the newline fixed it.\n\n-brandon\n\n\n t/t4202-log.sh |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/t/t4202-log.sh b/t/t4202-log.sh\nindex b536454..4c8af45 100755\n--- a/t/t4202-log.sh\n+++ b/t/t4202-log.sh\n@@ -71,4 +71,5 @@ test_expect_success 'diff-filter=D' '\n \n \n \n-test_done\n\\ No newline at end of file\n+test_done\n+\n-- \n1.6.0.rc0.38.g8b8fb7\n"},{"id":"84394","messageId":"20080722230940.GK32184@machine.or.cz","threadId":"14599","inReplyTo":"XKT02T_QW2tKLHpR7e3VuZjLXv3RP2E0GD54gXKrdIFm8xQsKvAyjg@cipher.nrlssc.navy.mil","subject":"Re: [PATCH] perl/Makefile: update NO_PERL_MAKEMAKER section","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2008-07-22T23:09:40Z","receivedAt":"2008-07-22T23:09:40Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"On Tue, Jul 22, 2008 at 04:15:41PM -0500, Brandon Casey wrote:\n> The perl modules must be copied to blib/lib so they are available for\n> testing.\n> \n> Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>\n\nI don't understand why do you need to do this; perl.mak should do this\non its own during project-wide make all. What Perl version are you using?\nHow does the pm_to_blib target look like?\n\n\tpm_to_blib : $(TO_INST_PM)\n        $(NOECHO) $(ABSPERLRUN) -MExtUtils::Install -e 'pm_to_blib({@ARGV}, '\\''$(INST_LIB)/auto'\\'', '\\''$(PM_FILTER)'\\'')' -- \\\n          Git.pm $(INST_LIBDIR)/Git.pm\n        $(NOECHO) $(TOUCH) pm_to_blib\n\nhere. Is your INST_LIB = blib/lib and INST_LIBDIR = $(INST_LIB)?\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nAs in certain cults it is possible to kill a process if you know\nits true name.  -- Ken Thompson and Dennis M. Ritchie\n"},{"id":"84539","messageId":"Wfi2HQy_6QUSen51P2hTCAckFK4_KQ7sQTXwNj0HTShKkKwLZ0EFig@cipher.nrlssc.navy.mil","threadId":"14599","inReplyTo":"20080722230940.GK32184@machine.or.cz","subject":"Re: [PATCH] perl/Makefile: update NO_PERL_MAKEMAKER section","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2008-07-23T16:22:47Z","receivedAt":"2008-07-23T16:22:47Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Petr Baudis wrote:\n> On Tue, Jul 22, 2008 at 04:15:41PM -0500, Brandon Casey wrote:\n>> The perl modules must be copied to blib/lib so they are available for\n>> testing.\n>>\n>> Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>\n> \n> I don't understand why do you need to do this; perl.mak should do this\n> on its own during project-wide make all.\n\nperl.mak is auto-generated by one of two methods in perl/Makefile. This\npatch modifies the 'NO_PERL_MAKEMAKER' section. Currently 'make all', when\nNO_PERL_MAKEMAKER is set, does nothing, and looks like:\n\n  $ cat perl.mak\n  all:\n\t:\n  install:\n\tmkdir -p ...\n\nWith this patch it looks like:\n\n  $ cat perl.mak\n  all: private-Error.pm Git.pm\n          mkdir -p blib/lib\n          rm -f blib/lib/Git.pm; cp Git.pm blib/lib/\n          rm -f blib/lib/Error.pm;  cp private-Error.pm blib/lib/Error.pm\n  install:\n          mkdir -p ...\n\n-brandon\n"},{"id":"84640","messageId":"7vy73s89hv.fsf@gitster.siamese.dyndns.org","threadId":"14599","inReplyTo":"XKT02T_QW2tKLHpR7e3VuZjLXv3RP2E0GD54gXKrdIFm8xQsKvAyjg@cipher.nrlssc.navy.mil","subject":"Re: [PATCH] perl/Makefile: update NO_PERL_MAKEMAKER section","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-07-23T23:29:48Z","receivedAt":"2008-07-23T23:29:48Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Brandon Casey <casey@nrlssc.navy.mil> writes:\n\n> The perl modules must be copied to blib/lib so they are available for\n> testing.\n\nTrue, but private-Error needs to be handled a bit more carefully, I\nthink.\n\nHow about this on top of your patch?\n\n perl/Makefile |   10 ++++++----\n 1 files changed, 6 insertions(+), 4 deletions(-)\n\ndiff --git a/perl/Makefile b/perl/Makefile\nindex 2b0d3d5..b8547db 100644\n--- a/perl/Makefile\n+++ b/perl/Makefile\n@@ -25,13 +25,15 @@ $(makfile): ../GIT-CFLAGS Makefile\n \techo all: private-Error.pm Git.pm > $@\n \techo '\tmkdir -p blib/lib' >> $@\n \techo '\t$(RM) blib/lib/Git.pm; cp Git.pm blib/lib/' >> $@\n-\techo '\t$(RM) blib/lib/Error.pm; \\\n-\tcp private-Error.pm blib/lib/Error.pm' >> $@\n+\techo '\t$(RM) blib/lib/Error.pm' >> $@\n+\t'$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \\\n+\techo '\tcp private-Error.pm blib/lib/Error.pm' >> $@\n \techo install: >> $@\n \techo '\tmkdir -p $(instdir_SQ)' >> $@\n \techo '\t$(RM) $(instdir_SQ)/Git.pm; cp Git.pm $(instdir_SQ)' >> $@\n-\techo '\t$(RM) $(instdir_SQ)/Error.pm; \\\n-\tcp private-Error.pm $(instdir_SQ)/Error.pm' >> $@\n+\techo '\t$(RM) $(instdir_SQ)/Error.pm' >> $@\n+\t'$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \\\n+\techo '\tcp private-Error.pm $(instdir_SQ)/Error.pm' >> $@\n \techo instlibdir: >> $@\n \techo '\techo $(instdir_SQ)' >> $@\n else\n"},{"id":"84642","messageId":"7vtzeg89cj.fsf@gitster.siamese.dyndns.org","threadId":"14599","inReplyTo":"k-pcfapbFwwISYvjf34W3d-E7j-DCb9tf-MW1z8rFObaPKgPJEmD7Q@cipher.nrlssc.navy.mil","subject":"Re: [PATCH] t9700/test.pl: backwards compatibility improvements","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-07-23T23:33:00Z","receivedAt":"2008-07-23T23:33:00Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"I have applied everything except for this one.  I think it is Ok, but\nlet's hear success or breakage stories from the list first and then remind\nme if the patch seems Ok, please?\n"},{"id":"84648","messageId":"LHJnvFqIyGXzSlPztg__TuZRmqu7aghMJ_WDZo7xhwLqjYt7RfqtMQ@cipher.nrlssc.navy.mil","threadId":"14599","inReplyTo":"7vy73s89hv.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] perl/Makefile: update NO_PERL_MAKEMAKER section","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2008-07-23T23:56:12Z","receivedAt":"2008-07-23T23:56:12Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Junio C Hamano wrote:\n> Brandon Casey <casey@nrlssc.navy.mil> writes:\n> \n>> The perl modules must be copied to blib/lib so they are available for\n>> testing.\n> \n> True, but private-Error needs to be handled a bit more carefully, I\n> think.\n> \n> How about this on top of your patch?\n\nThat works. Error.pm is not available on my system and the statements\nto copy private-Error.pm to Error.pm are correctly placed in perl.mak.\n\nI should have gotten a clue when a file named _private_-Error.pm was\nbeing copied to Error.pm and taken a look at Makefile.PL.\n\nThanks.\n\n-brandon\n"},{"id":"84650","messageId":"ZMwuLf0WB87A3HUdLJj1I-RViZ4TUuk-aPB2r7oI7_X4IwV8JsrfOw@cipher.nrlssc.navy.mil","threadId":"14599","inReplyTo":"7vtzeg89cj.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] t9700/test.pl: backwards compatibility improvements","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2008-07-24T00:08:08Z","receivedAt":"2008-07-24T00:08:08Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Junio C Hamano wrote:\n> I have applied everything except for this one.  I think it is Ok, but\n> let's hear success or breakage stories from the list first and then remind\n> me if the patch seems Ok, please?\n\nwill do.\n"},{"id":"84655","messageId":"20080724001916.GP32057@genesis.frugalware.org","threadId":"14599","inReplyTo":"E23rxnPh0xeYPsUuTseZ3Y6bteX3uHIcbLzTlyVPsX_N5fqcvRp1vA@cipher.nrlssc.navy.mil","subject":"Re: [PATCH] t/: Replace diff [-u|-U0] with test_cmp to allow compilation with old diff","fromName":"Miklos Vajna","fromEmail":"vmiklos@frugalware.org","sentAt":"2008-07-24T00:19:16Z","receivedAt":"2008-07-24T00:19:16Z","isPatch":true,"sender":{"key":"vmiklos@frugalware.org","avatar":"https://gravatar.com/avatar/401c1cbbb3a5d13e650c691a2c71d6fd0b80df1a01bc74d9f1972675dd58f2bd?d=mp&s=160"},"body":"On Tue, Jul 22, 2008 at 04:17:43PM -0500, Brandon Casey <casey@nrlssc.navy.mil> wrote:\n>  t/t0002-gitfile.sh               |    2 +-\n>  t/t1002-read-tree-m-u-2way.sh    |   12 ++++++------\n>  t/t2201-add-update-typechange.sh |   10 +++++-----\n>  3 files changed, 12 insertions(+), 12 deletions(-)\n\nHmm, after applying this patch, I have:\n\n~/git/t$ git grep 'diff -U'\nt1002-read-tree-m-u-2way.sh:     diff -U0 M.out 4.out >4diff.out\nt1002-read-tree-m-u-2way.sh:     diff -U0 M.out 5.out >5diff.out\nt1002-read-tree-m-u-2way.sh:     diff -U0 M.out 14.out >14diff.out\nt1002-read-tree-m-u-2way.sh:     diff -U0 M.out 15.out >15diff.out\n\nAny reason you left this out? ;-)\n"},{"id":"84658","messageId":"neKEpiQ6TDrat4FtxWT_LcPGI8nmQO5Oe7HnTQHhjsnD317-ccG_yw@cipher.nrlssc.navy.mil","threadId":"14599","inReplyTo":"20080724001916.GP32057@genesis.frugalware.org","subject":"Re: [PATCH] t/: Replace diff [-u|-U0] with test_cmp to allow compilation with old diff","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2008-07-24T00:55:16Z","receivedAt":"2008-07-24T00:55:16Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Miklos Vajna wrote:\n> On Tue, Jul 22, 2008 at 04:17:43PM -0500, Brandon Casey <casey@nrlssc.navy.mil> wrote:\n>>  t/t0002-gitfile.sh               |    2 +-\n>>  t/t1002-read-tree-m-u-2way.sh    |   12 ++++++------\n>>  t/t2201-add-update-typechange.sh |   10 +++++-----\n>>  3 files changed, 12 insertions(+), 12 deletions(-)\n> \n> Hmm, after applying this patch, I have:\n> \n> ~/git/t$ git grep 'diff -U'\n> t1002-read-tree-m-u-2way.sh:     diff -U0 M.out 4.out >4diff.out\n> t1002-read-tree-m-u-2way.sh:     diff -U0 M.out 5.out >5diff.out\n> t1002-read-tree-m-u-2way.sh:     diff -U0 M.out 14.out >14diff.out\n> t1002-read-tree-m-u-2way.sh:     diff -U0 M.out 15.out >15diff.out\n> \n> Any reason you left this out? ;-)\n\nI have the patch below in my repo so I can run this test. (copy/pasted\nand white-space corrupted since I haven't figured out how to reply to a\nmessage and import a patch correctly using thunderbird).\n\nAs you can see I just replaced the 'diff -U0' with 'git diff -U0' and then\nstripped off the git bits from the diff in the compare_change() function.\n\nI think there is probably a better way to fix this, so I left it out.\n\nThinking about it now, it would have made sense to hold off on the part of\nthe patch I submitted which applies to t1002-read-tree-m-u-2way.sh until I\nhad a solution for the rest of these 'diff -U0's.\n\n-brandon\n\n\ndiff --git a/t/t1002-read-tree-m-u-2way.sh b/t/t1002-read-tree-m-u-2way.sh\nindex aa9dd58..5e40cec 100755\n--- a/t/t1002-read-tree-m-u-2way.sh\n+++ b/t/t1002-read-tree-m-u-2way.sh\n@@ -14,6 +14,8 @@ _x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'\n _x40=\"$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40\"\n compare_change () {\n        sed >current \\\n+           -e '1{/^diff --git /d;}' \\\n+           -e '2{/^index /d;}' \\\n            -e '/^--- /d; /^+++ /d; /^@@ /d;' \\\n            -e 's/^\\(.[0-7][0-7][0-7][0-7][0-7][0-7]\\) '\"$_x40\"' /\\1 X /' \"$1\"\n        test_cmp expected current\n@@ -75,7 +77,7 @@ test_expect_success \\\n      git update-index --add yomin &&\n      git read-tree -m -u $treeH $treeM &&\n      git ls-files --stage >4.out || return 1\n-     diff -U0 M.out 4.out >4diff.out\n+     git diff -U0 --no-index M.out 4.out >4diff.out\n      compare_change 4diff.out expected &&\n      check_cache_at yomin clean &&\n      sum bozbar frotz nitfol >actual4.sum &&\n@@ -94,7 +96,7 @@ test_expect_success \\\n      echo yomin yomin >yomin &&\n      git read-tree -m -u $treeH $treeM &&\n      git ls-files --stage >5.out || return 1\n-     diff -U0 M.out 5.out >5diff.out\n+     git diff -U0 --no-index M.out 5.out >5diff.out\n      compare_change 5diff.out expected &&\n      check_cache_at yomin dirty &&\n      sum bozbar frotz nitfol >actual5.sum &&\n@@ -206,7 +208,7 @@ test_expect_success \\\n      git update-index --add nitfol &&\n      git read-tree -m -u $treeH $treeM &&\n      git ls-files --stage >14.out || return 1\n-     diff -U0 M.out 14.out >14diff.out\n+     git diff -U0 --no-index M.out 14.out >14diff.out\n      compare_change 14diff.out expected &&\n      sum bozbar frotz >actual14.sum &&\n      grep -v nitfol M.sum > expected14.sum &&\n@@ -227,7 +229,7 @@ test_expect_success \\\n      echo nitfol nitfol nitfol >nitfol &&\n      git read-tree -m -u $treeH $treeM &&\n      git ls-files --stage >15.out || return 1\n-     diff -U0 M.out 15.out >15diff.out\n+     git diff -U0 --no-index M.out 15.out >15diff.out\n      compare_change 15diff.out expected &&\n      check_cache_at nitfol dirty &&\n      sum bozbar frotz >actual15.sum &&\n-- \n1.5.6.2\n"},{"id":"84901","messageId":"1217003860-10609-1-git-send-email-s-beyer@gmx.net","threadId":"14599","inReplyTo":"TE3N1FoSy-vEEv0qsAyvBwBMMq2RuJCWYw7DNLBC7mEh6PxM1LCsOw@cipher.nrlssc.navy.mil","subject":"[PATCH] Set TAR in t/Makefile and in t4116-apply-reverse.sh","fromName":"Stephan Beyer","fromEmail":"s-beyer@gmx.net","sentAt":"2008-07-25T16:37:40Z","receivedAt":"2008-07-25T16:37:40Z","isPatch":true,"sender":{"key":"s-beyer@gmx.net","avatar":"https://avatars.githubusercontent.com/u/143889?v=4"},"body":"Hence, the test passes also when you run \"make\" in t/\nor when you invoke t4116-apply-reverse.sh directly,\nwithout $TAR being set.\n\nSigned-off-by: Stephan Beyer <s-beyer@gmx.net>\n---\n t/Makefile               |    2 +-\n t/t4116-apply-reverse.sh |    1 +\n 2 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/t/Makefile b/t/Makefile\nindex 0d65ced..b720943 100644\n--- a/t/Makefile\n+++ b/t/Makefile\n@@ -5,7 +5,7 @@\n \n #GIT_TEST_OPTS=--verbose --debug\n SHELL_PATH ?= $(SHELL)\n-TAR ?= $(TAR)\n+TAR ?= tar\n RM ?= rm -f\n \n # Shell quote;\ndiff --git a/t/t4116-apply-reverse.sh b/t/t4116-apply-reverse.sh\nindex 2298ece..3ff5d9e 100755\n--- a/t/t4116-apply-reverse.sh\n+++ b/t/t4116-apply-reverse.sh\n@@ -8,6 +8,7 @@ test_description='git apply in reverse\n '\n \n . ./test-lib.sh\n+TAR=${TAR:-tar}\n \n test_expect_success setup '\n \n-- \n1.6.0.rc0.102.ga1791\n"},{"id":"84906","messageId":"20080725170522.GG32057@genesis.frugalware.org","threadId":"14599","inReplyTo":"1217003860-10609-1-git-send-email-s-beyer@gmx.net","subject":"Re: [PATCH] Set TAR in t/Makefile and in t4116-apply-reverse.sh","fromName":"Miklos Vajna","fromEmail":"vmiklos@frugalware.org","sentAt":"2008-07-25T17:05:22Z","receivedAt":"2008-07-25T17:05:22Z","isPatch":true,"sender":{"key":"vmiklos@frugalware.org","avatar":"https://gravatar.com/avatar/401c1cbbb3a5d13e650c691a2c71d6fd0b80df1a01bc74d9f1972675dd58f2bd?d=mp&s=160"},"body":"On Fri, Jul 25, 2008 at 06:37:40PM +0200, Stephan Beyer <s-beyer@gmx.net> wrote:\n> Hence, the test passes also when you run \"make\" in t/\n> or when you invoke t4116-apply-reverse.sh directly,\n> without $TAR being set.\n\nThanks, I just hit this issue today. ;-)\n"},{"id":"84907","messageId":"20080725171219.GE27172@leksak.fem-net","threadId":"14599","inReplyTo":"20080725170522.GG32057@genesis.frugalware.org","subject":"Re: [PATCH] Set TAR in t/Makefile and in t4116-apply-reverse.sh","fromName":"Stephan Beyer","fromEmail":"s-beyer@gmx.net","sentAt":"2008-07-25T17:12:19Z","receivedAt":"2008-07-25T17:12:19Z","isPatch":true,"sender":{"key":"s-beyer@gmx.net","avatar":"https://avatars.githubusercontent.com/u/143889?v=4"},"body":"Hi,\n\nMiklos Vajna wrote:\n> On Fri, Jul 25, 2008 at 06:37:40PM +0200, Stephan Beyer <s-beyer@gmx.net> wrote:\n> > Hence, the test passes also when you run \"make\" in t/\n> > or when you invoke t4116-apply-reverse.sh directly,\n> > without $TAR being set.\n> \n> Thanks, I just hit this issue today. ;-)\n\nPuh, I'm glad that you're not writing\n\"I've hit this issue yesterday and already sent a patch to this list\" :)\n\nRegards,\n  Stephan\n\n-- \nStephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F\n"},{"id":"84915","messageId":"7vvdytsu7n.fsf@gitster.siamese.dyndns.org","threadId":"14599","inReplyTo":"1217003860-10609-1-git-send-email-s-beyer@gmx.net","subject":"Re: [PATCH] Set TAR in t/Makefile and in t4116-apply-reverse.sh","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-07-25T18:18:52Z","receivedAt":"2008-07-25T18:18:52Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Actually, 455a7f3 (More portability., 2005-09-30) introduced $TAR and it\nis also used in t5000.  cb34882 (fix t5000-tar-tree.sh when $TAR isn't\nset, 2005-11-08) did the same fix you are adding, but I think both of\nthese fixes are in a wrong place.\n\nI think we should do this instead.  That's how SHELL_PATH is passed around\nfrom build to all the test scripts already.\n\n---\n Makefile            |    1 +\n t/t5000-tar-tree.sh |    1 -\n 2 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex b003e3e..1d14209 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1212,6 +1212,7 @@ GIT-CFLAGS: .FORCE-GIT-CFLAGS\n \n GIT-BUILD-OPTIONS: .FORCE-GIT-BUILD-OPTIONS\n \t@echo SHELL_PATH=\\''$(SHELL_PATH_SQ)'\\' >$@\n+\t@echo TAR=\\''$(subst ','\\'',$(TAR))'\\' >>$@\n \n ### Detect Tck/Tk interpreter path changes\n ifndef NO_TCLTK\ndiff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh\nindex 9b0baac..5eb119e 100755\n--- a/t/t5000-tar-tree.sh\n+++ b/t/t5000-tar-tree.sh\n@@ -25,7 +25,6 @@ commit id embedding:\n '\n \n . ./test-lib.sh\n-TAR=${TAR:-tar}\n UNZIP=${UNZIP:-unzip}\n \n SUBSTFORMAT=%H%n\n"},{"id":"84917","messageId":"20080725182416.GG27172@leksak.fem-net","threadId":"14599","inReplyTo":"7vvdytsu7n.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Set TAR in t/Makefile and in t4116-apply-reverse.sh","fromName":"Stephan Beyer","fromEmail":"s-beyer@gmx.net","sentAt":"2008-07-25T18:24:16Z","receivedAt":"2008-07-25T18:24:16Z","isPatch":true,"sender":{"key":"s-beyer@gmx.net","avatar":"https://avatars.githubusercontent.com/u/143889?v=4"},"body":"Hi,\n\n> diff --git a/Makefile b/Makefile\n> index b003e3e..1d14209 100644\n> --- a/Makefile\n> +++ b/Makefile\n> @@ -1212,6 +1212,7 @@ GIT-CFLAGS: .FORCE-GIT-CFLAGS\n>  \n>  GIT-BUILD-OPTIONS: .FORCE-GIT-BUILD-OPTIONS\n>  \t@echo SHELL_PATH=\\''$(SHELL_PATH_SQ)'\\' >$@\n> +\t@echo TAR=\\''$(subst ','\\'',$(TAR))'\\' >>$@\n>  \n>  ### Detect Tck/Tk interpreter path changes\n>  ifndef NO_TCLTK\n\nBut then TAR has to be set in test-lib.sh also, to be able to\ninvoke t5000 and t4116 directly, hasn't it?\n\nRegards.\n\n-- \nStephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F\n"},{"id":"84921","messageId":"7vmyk5sska.fsf@gitster.siamese.dyndns.org","threadId":"14599","inReplyTo":"20080725182416.GG27172@leksak.fem-net","subject":"Re: [PATCH] Set TAR in t/Makefile and in t4116-apply-reverse.sh","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-07-25T18:54:29Z","receivedAt":"2008-07-25T18:54:29Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Stephan Beyer <s-beyer@gmx.net> writes:\n\n> Hi,\n>\n>> diff --git a/Makefile b/Makefile\n>> index b003e3e..1d14209 100644\n>> --- a/Makefile\n>> +++ b/Makefile\n>> @@ -1212,6 +1212,7 @@ GIT-CFLAGS: .FORCE-GIT-CFLAGS\n>>  \n>>  GIT-BUILD-OPTIONS: .FORCE-GIT-BUILD-OPTIONS\n>>  \t@echo SHELL_PATH=\\''$(SHELL_PATH_SQ)'\\' >$@\n>> +\t@echo TAR=\\''$(subst ','\\'',$(TAR))'\\' >>$@\n>>  \n>>  ### Detect Tck/Tk interpreter path changes\n>>  ifndef NO_TCLTK\n>\n> But then TAR has to be set in test-lib.sh also, to be able to\n> invoke t5000 and t4116 directly, hasn't it?\n\nDosen't test-lib source GIT-BUILD-OPTIONS?\n"},{"id":"84922","messageId":"20080725185818.GA13539@leksak.fem-net","threadId":"14599","inReplyTo":"7vmyk5sska.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Set TAR in t/Makefile and in t4116-apply-reverse.sh","fromName":"Stephan Beyer","fromEmail":"s-beyer@gmx.net","sentAt":"2008-07-25T18:58:18Z","receivedAt":"2008-07-25T18:58:18Z","isPatch":true,"sender":{"key":"s-beyer@gmx.net","avatar":"https://avatars.githubusercontent.com/u/143889?v=4"},"body":"Junio C Hamano wrote:\n> Stephan Beyer <s-beyer@gmx.net> writes:\n> >> diff --git a/Makefile b/Makefile\n> >> index b003e3e..1d14209 100644\n> >> --- a/Makefile\n> >> +++ b/Makefile\n> >> @@ -1212,6 +1212,7 @@ GIT-CFLAGS: .FORCE-GIT-CFLAGS\n> >>  \n> >>  GIT-BUILD-OPTIONS: .FORCE-GIT-BUILD-OPTIONS\n> >>  \t@echo SHELL_PATH=\\''$(SHELL_PATH_SQ)'\\' >$@\n> >> +\t@echo TAR=\\''$(subst ','\\'',$(TAR))'\\' >>$@\n> >>  \n> >>  ### Detect Tck/Tk interpreter path changes\n> >>  ifndef NO_TCLTK\n> >\n> > But then TAR has to be set in test-lib.sh also, to be able to\n> > invoke t5000 and t4116 directly, hasn't it?\n> \n> Dosen't test-lib source GIT-BUILD-OPTIONS?\n\nIt does.  Great, then.\n\nRegards.\n\n-- \nStephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F\n"},{"id":"84928","messageId":"7v8wvpsqki.fsf@gitster.siamese.dyndns.org","threadId":"14599","inReplyTo":"20080725185818.GA13539@leksak.fem-net","subject":"Re: [PATCH] Set TAR in t/Makefile and in t4116-apply-reverse.sh","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-07-25T19:37:33Z","receivedAt":"2008-07-25T19:37:33Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Stephan Beyer <s-beyer@gmx.net> writes:\n\n> Junio C Hamano wrote:\n>> Stephan Beyer <s-beyer@gmx.net> writes:\n>> >> diff --git a/Makefile b/Makefile\n>> >> index b003e3e..1d14209 100644\n>> >> --- a/Makefile\n>> >> +++ b/Makefile\n>> >> @@ -1212,6 +1212,7 @@ GIT-CFLAGS: .FORCE-GIT-CFLAGS\n>> >>  \n>> >>  GIT-BUILD-OPTIONS: .FORCE-GIT-BUILD-OPTIONS\n>> >>  \t@echo SHELL_PATH=\\''$(SHELL_PATH_SQ)'\\' >$@\n>> >> +\t@echo TAR=\\''$(subst ','\\'',$(TAR))'\\' >>$@\n>> >>  \n>> >>  ### Detect Tck/Tk interpreter path changes\n>> >>  ifndef NO_TCLTK\n>> >\n>> > But then TAR has to be set in test-lib.sh also, to be able to\n>> > invoke t5000 and t4116 directly, hasn't it?\n>> \n>> Dosen't test-lib source GIT-BUILD-OPTIONS?\n>\n> It does.  Great, then.\n\nSorry, but not quite.  The above shell construct is toooootally bogus.\n\nWe need this patch on top.\n\n-- >8 --\n[PATCH] Makefile: fix shell quoting\n\nMakefile records paths to a few programs in GIT-BUILD-OPTIONS file.  These\npaths need to be quoted twice: once to protect specials from the shell\nthat runs the generated GIT-BUILD-OPTIONS file, and again to protect them\n(and the first level of quoting itself) from the shell that runs the\n\"echo\" inside the Makefile.\n\nYou can test this by trying:\n\n    $ ln -s /bin/tar \"$HOME/Tes' program/tar\"\n    $ make TAR=\"$HOME/Tes' program/tar\" test\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n Makefile            |    7 +++++--\n t/t5000-tar-tree.sh |   10 +++++-----\n 2 files changed, 10 insertions(+), 7 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 1d14209..f13184b 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1210,9 +1210,12 @@ GIT-CFLAGS: .FORCE-GIT-CFLAGS\n \t\techo \"$$FLAGS\" >GIT-CFLAGS; \\\n             fi\n \n+# We need to apply sq twice, once to protect from the shell\n+# that runs GIT-BUILD-OPTIONS, and then again to protect it\n+# and the first level quoting from the shell that runs \"echo\".\n GIT-BUILD-OPTIONS: .FORCE-GIT-BUILD-OPTIONS\n-\t@echo SHELL_PATH=\\''$(SHELL_PATH_SQ)'\\' >$@\n-\t@echo TAR=\\''$(subst ','\\'',$(TAR))'\\' >>$@\n+\t@echo SHELL_PATH=\\''$(subst ','\\'',$(SHELL_PATH_SQ))'\\' >$@\n+\t@echo TAR=\\''$(subst ','\\'',$(subst ','\\'',$(TAR)))'\\' >>$@\n \n ### Detect Tck/Tk interpreter path changes\n ifndef NO_TCLTK\ndiff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh\nindex 5eb119e..87902f8 100755\n--- a/t/t5000-tar-tree.sh\n+++ b/t/t5000-tar-tree.sh\n@@ -67,7 +67,7 @@ test_expect_success \\\n test_expect_success \\\n     'validate file modification time' \\\n     'mkdir extract &&\n-     $TAR xf b.tar -C extract a/a &&\n+     \"$TAR\" xf b.tar -C extract a/a &&\n      perl -e '\\''print((stat(\"extract/a/a\"))[9], \"\\n\")'\\'' >b.mtime &&\n      echo \"1117231200\" >expected.mtime &&\n      diff expected.mtime b.mtime'\n@@ -79,7 +79,7 @@ test_expect_success \\\n \n test_expect_success \\\n     'extract tar archive' \\\n-    '(cd b && $TAR xf -) <b.tar'\n+    '(cd b && \"$TAR\" xf -) <b.tar'\n \n test_expect_success \\\n     'validate filenames' \\\n@@ -96,7 +96,7 @@ test_expect_success \\\n \n test_expect_success \\\n     'extract tar archive with prefix' \\\n-    '(cd c && $TAR xf -) <c.tar'\n+    '(cd c && \"$TAR\" xf -) <c.tar'\n \n test_expect_success \\\n     'validate filenames with prefix' \\\n@@ -116,7 +116,7 @@ test_expect_success \\\n \n test_expect_success \\\n     'extract substfiles' \\\n-    '(mkdir f && cd f && $TAR xf -) <f.tar'\n+    '(mkdir f && cd f && \"$TAR\" xf -) <f.tar'\n \n test_expect_success \\\n      'validate substfile contents' \\\n@@ -128,7 +128,7 @@ test_expect_success \\\n \n test_expect_success \\\n     'extract substfiles from archive with prefix' \\\n-    '(mkdir g && cd g && $TAR xf -) <g.tar'\n+    '(mkdir g && cd g && \"$TAR\" xf -) <g.tar'\n \n test_expect_success \\\n      'validate substfile contents from archive with prefix' \\\n-- \n1.6.0.rc0.51.g51a9e\n"}]}