All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perl/Makefile: update NO_PERL_MAKEMAKER section
       [not found] <0GfECozN3g0ZvAESKMi76RyOVHEb2OhhwET9GWmEm7pbzYQJub50UlWpZtBa7MGn1UGb-7mzbzE@cipher.nrlssc.navy.mil>
@ 2008-07-22 21:15 ` Brandon Casey
  2008-07-22 23:09   ` Petr Baudis
  2008-07-23 23:29   ` Junio C Hamano
  2008-07-22 21:16 ` [PATCH] t9700/test.pl: backwards compatibility improvements Brandon Casey
                   ` (5 subsequent siblings)
  6 siblings, 2 replies; 23+ messages in thread
From: Brandon Casey @ 2008-07-22 21:15 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Junio C Hamano

The perl modules must be copied to blib/lib so they are available for
testing.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
---
 perl/Makefile |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/perl/Makefile b/perl/Makefile
index 5e079ad..2b0d3d5 100644
--- a/perl/Makefile
+++ b/perl/Makefile
@@ -22,8 +22,11 @@ clean:
 ifdef NO_PERL_MAKEMAKER
 instdir_SQ = $(subst ','\'',$(prefix)/lib)
 $(makfile): ../GIT-CFLAGS Makefile
-	echo all: > $@
-	echo '	:' >> $@
+	echo all: private-Error.pm Git.pm > $@
+	echo '	mkdir -p blib/lib' >> $@
+	echo '	$(RM) blib/lib/Git.pm; cp Git.pm blib/lib/' >> $@
+	echo '	$(RM) blib/lib/Error.pm; \
+	cp private-Error.pm blib/lib/Error.pm' >> $@
 	echo install: >> $@
 	echo '	mkdir -p $(instdir_SQ)' >> $@
 	echo '	$(RM) $(instdir_SQ)/Git.pm; cp Git.pm $(instdir_SQ)' >> $@
-- 
1.6.0.rc0.38.g8b8fb7

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH] t9700/test.pl: backwards compatibility improvements
       [not found] <0GfECozN3g0ZvAESKMi76RyOVHEb2OhhwET9GWmEm7pbzYQJub50UlWpZtBa7MGn1UGb-7mzbzE@cipher.nrlssc.navy.mil>
  2008-07-22 21:15 ` [PATCH] perl/Makefile: update NO_PERL_MAKEMAKER section Brandon Casey
@ 2008-07-22 21:16 ` Brandon Casey
  2008-07-23 23:33   ` Junio C Hamano
  2008-07-22 21:16 ` [PATCH] t4116-apply-reverse.sh: use $TAR rather than tar Brandon Casey
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 23+ messages in thread
From: Brandon Casey @ 2008-07-22 21:16 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Junio C Hamano

Some versions of perl complain when 'STDERR' is used as the third argument
in the 3-argument form of open(). Convert to the 2-argument form which is
described for duping STDERR in my second edition camel book.

The object oriented version of File::Temp is a rather new incarnation it
seems. The File::Temp man page for v5.8.0 says "(NOT YET IMPLEMENTED)" in
the 'Objects' section. These can be converted to use File::Temp::tempfile().

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
---
 t/t9700/test.pl |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/t/t9700/test.pl b/t/t9700/test.pl
index 4d23125..70f9836 100755
--- a/t/t9700/test.pl
+++ b/t/t9700/test.pl
@@ -38,7 +38,7 @@ is($r->get_color("color.test.slot1", "red"), $ansi_green, "get_color");
 # Failure cases for config:
 # Save and restore STDERR; we will probably extract this into a
 # "dies_ok" method and possibly move the STDERR handling to Git.pm.
-open our $tmpstderr, ">&", STDERR or die "cannot save STDERR"; close STDERR;
+open our $tmpstderr, ">&STDERR" or die "cannot save STDERR"; close STDERR;
 eval { $r->config("test.dupstring") };
 ok($@, "config: duplicate entry in scalar context fails");
 eval { $r->config_bool("test.boolother") };
@@ -69,18 +69,18 @@ is($r->ident_person("Name", "email", "123 +0000"), "Name <email>",
 
 # objects and hashes
 ok(our $file1hash = $r->command_oneline('rev-parse', "HEAD:file1"), "(get file hash)");
-our $tmpfile = File::Temp->new;
+our ($tmpfile, $tmpnam) = File::Temp::tempfile();
 is($r->cat_blob($file1hash, $tmpfile), 15, "cat_blob: size");
 our $blobcontents;
 { local $/; seek $tmpfile, 0, 0; $blobcontents = <$tmpfile>; }
 is($blobcontents, "changed file 1\n", "cat_blob: data");
 seek $tmpfile, 0, 0;
-is(Git::hash_object("blob", $tmpfile), $file1hash, "hash_object: roundtrip");
-$tmpfile = File::Temp->new();
+is(Git::hash_object("blob", $tmpnam), $file1hash, "hash_object: roundtrip");
+($tmpfile, $tmpnam) = File::Temp::tempfile();
 print $tmpfile my $test_text = "test blob, to be inserted\n";
-like(our $newhash = $r->hash_and_insert_object($tmpfile), qr/[0-9a-fA-F]{40}/,
+like(our $newhash = $r->hash_and_insert_object($tmpnam), qr/[0-9a-fA-F]{40}/,
      "hash_and_insert_object: returns hash");
-$tmpfile = File::Temp->new;
+$tmpfile = File::Temp::tempfile();
 is($r->cat_blob($newhash, $tmpfile), length $test_text, "cat_blob: roundtrip size");
 { local $/; seek $tmpfile, 0, 0; $blobcontents = <$tmpfile>; }
 is($blobcontents, $test_text, "cat_blob: roundtrip data");
-- 
1.6.0.rc0.38.g8b8fb7

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH] t4116-apply-reverse.sh: use $TAR rather than tar
       [not found] <0GfECozN3g0ZvAESKMi76RyOVHEb2OhhwET9GWmEm7pbzYQJub50UlWpZtBa7MGn1UGb-7mzbzE@cipher.nrlssc.navy.mil>
  2008-07-22 21:15 ` [PATCH] perl/Makefile: update NO_PERL_MAKEMAKER section Brandon Casey
  2008-07-22 21:16 ` [PATCH] t9700/test.pl: backwards compatibility improvements Brandon Casey
@ 2008-07-22 21:16 ` Brandon Casey
  2008-07-25 16:37   ` [PATCH] Set TAR in t/Makefile and in t4116-apply-reverse.sh Stephan Beyer
  2008-07-22 21:16 ` [PATCH] t3200,t7201: replace '!' with test_must_fail Brandon Casey
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 23+ messages in thread
From: Brandon Casey @ 2008-07-22 21:16 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Junio C Hamano

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
---
 t/t4116-apply-reverse.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/t4116-apply-reverse.sh b/t/t4116-apply-reverse.sh
index 1459a90..2298ece 100755
--- a/t/t4116-apply-reverse.sh
+++ b/t/t4116-apply-reverse.sh
@@ -48,12 +48,12 @@ test_expect_success 'apply in reverse' '
 
 test_expect_success 'setup separate repository lacking postimage' '
 
-	git tar-tree initial initial | tar xf - &&
+	git tar-tree initial initial | $TAR xf - &&
 	(
 		cd initial && git init && git add .
 	) &&
 
-	git tar-tree second second | tar xf - &&
+	git tar-tree second second | $TAR xf - &&
 	(
 		cd second && git init && git add .
 	)
-- 
1.6.0.rc0.38.g8b8fb7

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH] t3200,t7201: replace '!' with test_must_fail
       [not found] <0GfECozN3g0ZvAESKMi76RyOVHEb2OhhwET9GWmEm7pbzYQJub50UlWpZtBa7MGn1UGb-7mzbzE@cipher.nrlssc.navy.mil>
                   ` (2 preceding siblings ...)
  2008-07-22 21:16 ` [PATCH] t4116-apply-reverse.sh: use $TAR rather than tar Brandon Casey
@ 2008-07-22 21:16 ` Brandon Casey
  2008-07-22 21:17 ` [PATCH] t/: Replace diff [-u|-U0] with test_cmp to allow compilation with old diff Brandon Casey
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 23+ messages in thread
From: Brandon Casey @ 2008-07-22 21:16 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Junio C Hamano

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
---
 t/t3200-branch.sh |    2 +-
 t/t7201-co.sh     |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh
index 7c583c8..7a83fbf 100755
--- a/t/t3200-branch.sh
+++ b/t/t3200-branch.sh
@@ -200,7 +200,7 @@ test_expect_success \
 
 test_expect_success \
     'branch from non-branch HEAD w/--track causes failure' \
-    '!(git branch --track my10 HEAD^)'
+    'test_must_fail git branch --track my10 HEAD^'
 
 # Keep this test last, as it changes the current branch
 cat >expect <<EOF
diff --git a/t/t7201-co.sh b/t/t7201-co.sh
index 3111baa..9ad5d63 100755
--- a/t/t7201-co.sh
+++ b/t/t7201-co.sh
@@ -335,6 +335,6 @@ test_expect_success \
     git checkout -b delete-me master &&
     rm .git/refs/heads/delete-me &&
     test refs/heads/delete-me = "$(git symbolic-ref HEAD)" &&
-    !(git checkout --track -b track)'
+    test_must_fail git checkout --track -b track'
 
 test_done
-- 
1.6.0.rc0.38.g8b8fb7

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH] t/: Replace diff [-u|-U0] with test_cmp to allow compilation with old diff
       [not found] <0GfECozN3g0ZvAESKMi76RyOVHEb2OhhwET9GWmEm7pbzYQJub50UlWpZtBa7MGn1UGb-7mzbzE@cipher.nrlssc.navy.mil>
                   ` (3 preceding siblings ...)
  2008-07-22 21:16 ` [PATCH] t3200,t7201: replace '!' with test_must_fail Brandon Casey
@ 2008-07-22 21:17 ` Brandon Casey
  2008-07-24  0:19   ` Miklos Vajna
  2008-07-22 21:21 ` [PATCH] t7502-commit.sh: rearrange test to make more portable Brandon Casey
  2008-07-22 21:23 ` [PATCH] t/t4202-log.sh: add newline at end of file Brandon Casey
  6 siblings, 1 reply; 23+ messages in thread
From: Brandon Casey @ 2008-07-22 21:17 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Junio C Hamano

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
---
 t/t0002-gitfile.sh               |    2 +-
 t/t1002-read-tree-m-u-2way.sh    |   12 ++++++------
 t/t2201-add-update-typechange.sh |   10 +++++-----
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/t/t0002-gitfile.sh b/t/t0002-gitfile.sh
index c5dbc72..4db4ac4 100755
--- a/t/t0002-gitfile.sh
+++ b/t/t0002-gitfile.sh
@@ -66,7 +66,7 @@ test_expect_success 'check hash-object' '
 
 test_expect_success 'check cat-file' '
 	git cat-file blob $SHA >actual &&
-	diff -u bar actual
+	test_cmp bar actual
 '
 
 test_expect_success 'check update-index' '
diff --git a/t/t1002-read-tree-m-u-2way.sh b/t/t1002-read-tree-m-u-2way.sh
index e04990e..aa9dd58 100755
--- a/t/t1002-read-tree-m-u-2way.sh
+++ b/t/t1002-read-tree-m-u-2way.sh
@@ -112,7 +112,7 @@ test_expect_success \
      git update-index --add frotz &&
      git read-tree -m -u $treeH $treeM &&
      git ls-files --stage >6.out &&
-     diff -U0 M.out 6.out &&
+     test_cmp M.out 6.out &&
      check_cache_at frotz clean &&
      sum bozbar frotz nitfol >actual3.sum &&
      cmp M.sum actual3.sum &&
@@ -129,7 +129,7 @@ test_expect_success \
      echo frotz frotz >frotz &&
      git read-tree -m -u $treeH $treeM &&
      git ls-files --stage >7.out &&
-     diff -U0 M.out 7.out &&
+     test_cmp M.out 7.out &&
      check_cache_at frotz dirty &&
      sum bozbar frotz nitfol >actual7.sum &&
      if cmp M.sum actual7.sum; then false; else :; fi &&
@@ -264,7 +264,7 @@ test_expect_success \
      git update-index --add bozbar &&
      git read-tree -m -u $treeH $treeM &&
      git ls-files --stage >18.out &&
-     diff -U0 M.out 18.out &&
+     test_cmp M.out 18.out &&
      check_cache_at bozbar clean &&
      sum bozbar frotz nitfol >actual18.sum &&
      cmp M.sum actual18.sum'
@@ -278,7 +278,7 @@ test_expect_success \
      echo gnusto gnusto >bozbar &&
      git read-tree -m -u $treeH $treeM &&
      git ls-files --stage >19.out &&
-     diff -U0 M.out 19.out &&
+     test_cmp M.out 19.out &&
      check_cache_at bozbar dirty &&
      sum frotz nitfol >actual19.sum &&
      grep -v bozbar  M.sum > expected19.sum &&
@@ -297,7 +297,7 @@ test_expect_success \
      git update-index --add bozbar &&
      git read-tree -m -u $treeH $treeM &&
      git ls-files --stage >20.out &&
-     diff -U0 M.out 20.out &&
+     test_cmp M.out 20.out &&
      check_cache_at bozbar clean &&
      sum bozbar frotz nitfol >actual20.sum &&
      cmp M.sum actual20.sum'
@@ -338,7 +338,7 @@ test_expect_success \
      git update-index --add DF &&
      git read-tree -m -u $treeDF $treeDFDF &&
      git ls-files --stage >DFDFcheck.out &&
-     diff -U0 DFDF.out DFDFcheck.out &&
+     test_cmp DFDF.out DFDFcheck.out &&
      check_cache_at DF/DF clean'
 
 test_done
diff --git a/t/t2201-add-update-typechange.sh b/t/t2201-add-update-typechange.sh
index e15e3eb..d24c7d9 100755
--- a/t/t2201-add-update-typechange.sh
+++ b/t/t2201-add-update-typechange.sh
@@ -106,12 +106,12 @@ test_expect_success modify '
 
 test_expect_success diff-files '
 	git diff-files --raw >actual &&
-	diff -u expect-files actual
+	test_cmp expect-files actual
 '
 
 test_expect_success diff-index '
 	git diff-index --raw HEAD -- >actual &&
-	diff -u expect-index actual
+	test_cmp expect-index actual
 '
 
 test_expect_success 'add -u' '
@@ -119,7 +119,7 @@ test_expect_success 'add -u' '
 	cp -p ".git/index" ".git/saved-index" &&
 	git add -u &&
 	git ls-files -s >actual &&
-	diff -u expect-final actual
+	test_cmp expect-final actual
 '
 
 test_expect_success 'commit -a' '
@@ -130,11 +130,11 @@ test_expect_success 'commit -a' '
 	fi &&
 	git commit -m "second" -a &&
 	git ls-files -s >actual &&
-	diff -u expect-final actual &&
+	test_cmp expect-final actual &&
 	rm -f .git/index &&
 	git read-tree HEAD &&
 	git ls-files -s >actual &&
-	diff -u expect-final actual
+	test_cmp expect-final actual
 '
 
 test_done
-- 
1.6.0.rc0.38.g8b8fb7

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH] t7502-commit.sh: rearrange test to make more portable
       [not found] <0GfECozN3g0ZvAESKMi76RyOVHEb2OhhwET9GWmEm7pbzYQJub50UlWpZtBa7MGn1UGb-7mzbzE@cipher.nrlssc.navy.mil>
                   ` (4 preceding siblings ...)
  2008-07-22 21:17 ` [PATCH] t/: Replace diff [-u|-U0] with test_cmp to allow compilation with old diff Brandon Casey
@ 2008-07-22 21:21 ` Brandon Casey
  2008-07-22 21:23 ` [PATCH] t/t4202-log.sh: add newline at end of file Brandon Casey
  6 siblings, 0 replies; 23+ messages in thread
From: Brandon Casey @ 2008-07-22 21:21 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Junio C Hamano


Some shells have problems with one-shot variable assignment notation
and function calls. The sequence is rearranged to avoid the one-shot
and to allow the test script to be linked together with '&&'.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
---
 t/t7502-commit.sh |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/t/t7502-commit.sh b/t/t7502-commit.sh
index c25eff9..ad84c3d 100755
--- a/t/t7502-commit.sh
+++ b/t/t7502-commit.sh
@@ -228,10 +228,12 @@ EOF
 
 test_expect_success 'a SIGTERM should break locks' '
 	echo >>negative &&
-	"$SHELL_PATH" -c '\''
+	! "$SHELL_PATH" -c '\''
 	  echo kill -TERM $$ >> .git/FAKE_EDITOR
-	  GIT_EDITOR=.git/FAKE_EDITOR exec git commit -a'\'' && exit 1  # should fail
-	! test -f .git/index.lock
+	  GIT_EDITOR=.git/FAKE_EDITOR 
+	  export GIT_EDITOR
+	  exec git commit -a'\'' &&
+	test ! -f .git/index.lock
 '
 
 rm -f .git/MERGE_MSG .git/COMMIT_EDITMSG
-- 
1.6.0.rc0.38.g8b8fb7

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH] t/t4202-log.sh: add newline at end of file
       [not found] <0GfECozN3g0ZvAESKMi76RyOVHEb2OhhwET9GWmEm7pbzYQJub50UlWpZtBa7MGn1UGb-7mzbzE@cipher.nrlssc.navy.mil>
                   ` (5 preceding siblings ...)
  2008-07-22 21:21 ` [PATCH] t7502-commit.sh: rearrange test to make more portable Brandon Casey
@ 2008-07-22 21:23 ` Brandon Casey
  6 siblings, 0 replies; 23+ messages in thread
From: Brandon Casey @ 2008-07-22 21:23 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Junio C Hamano

Some shells hang when parsing the script if the last statement is not
followed by a newline. So add one.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
---


I expect this is a bug in ksh. The ksh installed on my solaris box went
into some infinite loop on this script, continually allocating memory.
Adding the newline fixed it.

-brandon


 t/t4202-log.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/t/t4202-log.sh b/t/t4202-log.sh
index b536454..4c8af45 100755
--- a/t/t4202-log.sh
+++ b/t/t4202-log.sh
@@ -71,4 +71,5 @@ test_expect_success 'diff-filter=D' '
 
 
 
-test_done
\ No newline at end of file
+test_done
+
-- 
1.6.0.rc0.38.g8b8fb7

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [PATCH] perl/Makefile: update NO_PERL_MAKEMAKER section
  2008-07-22 21:15 ` [PATCH] perl/Makefile: update NO_PERL_MAKEMAKER section Brandon Casey
@ 2008-07-22 23:09   ` Petr Baudis
  2008-07-23 16:22     ` Brandon Casey
  2008-07-23 23:29   ` Junio C Hamano
  1 sibling, 1 reply; 23+ messages in thread
From: Petr Baudis @ 2008-07-22 23:09 UTC (permalink / raw)
  To: Brandon Casey; +Cc: Git Mailing List, Junio C Hamano

On Tue, Jul 22, 2008 at 04:15:41PM -0500, Brandon Casey wrote:
> The perl modules must be copied to blib/lib so they are available for
> testing.
> 
> Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>

I don't understand why do you need to do this; perl.mak should do this
on its own during project-wide make all. What Perl version are you using?
How does the pm_to_blib target look like?

	pm_to_blib : $(TO_INST_PM)
        $(NOECHO) $(ABSPERLRUN) -MExtUtils::Install -e 'pm_to_blib({@ARGV}, '\''$(INST_LIB)/auto'\'', '\''$(PM_FILTER)'\'')' -- \
          Git.pm $(INST_LIBDIR)/Git.pm
        $(NOECHO) $(TOUCH) pm_to_blib

here. Is your INST_LIB = blib/lib and INST_LIBDIR = $(INST_LIB)?

-- 
				Petr "Pasky" Baudis
As in certain cults it is possible to kill a process if you know
its true name.  -- Ken Thompson and Dennis M. Ritchie

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] perl/Makefile: update NO_PERL_MAKEMAKER section
  2008-07-22 23:09   ` Petr Baudis
@ 2008-07-23 16:22     ` Brandon Casey
  0 siblings, 0 replies; 23+ messages in thread
From: Brandon Casey @ 2008-07-23 16:22 UTC (permalink / raw)
  To: Petr Baudis; +Cc: Git Mailing List, Junio C Hamano

Petr Baudis wrote:
> On Tue, Jul 22, 2008 at 04:15:41PM -0500, Brandon Casey wrote:
>> The perl modules must be copied to blib/lib so they are available for
>> testing.
>>
>> Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
> 
> I don't understand why do you need to do this; perl.mak should do this
> on its own during project-wide make all.

perl.mak is auto-generated by one of two methods in perl/Makefile. This
patch modifies the 'NO_PERL_MAKEMAKER' section. Currently 'make all', when
NO_PERL_MAKEMAKER is set, does nothing, and looks like:

  $ cat perl.mak
  all:
	:
  install:
	mkdir -p ...

With this patch it looks like:

  $ cat perl.mak
  all: private-Error.pm Git.pm
          mkdir -p blib/lib
          rm -f blib/lib/Git.pm; cp Git.pm blib/lib/
          rm -f blib/lib/Error.pm;  cp private-Error.pm blib/lib/Error.pm
  install:
          mkdir -p ...

-brandon

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] perl/Makefile: update NO_PERL_MAKEMAKER section
  2008-07-22 21:15 ` [PATCH] perl/Makefile: update NO_PERL_MAKEMAKER section Brandon Casey
  2008-07-22 23:09   ` Petr Baudis
@ 2008-07-23 23:29   ` Junio C Hamano
  2008-07-23 23:56     ` Brandon Casey
  1 sibling, 1 reply; 23+ messages in thread
From: Junio C Hamano @ 2008-07-23 23:29 UTC (permalink / raw)
  To: Brandon Casey; +Cc: Git Mailing List

Brandon Casey <casey@nrlssc.navy.mil> writes:

> The perl modules must be copied to blib/lib so they are available for
> testing.

True, but private-Error needs to be handled a bit more carefully, I
think.

How about this on top of your patch?

 perl/Makefile |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/perl/Makefile b/perl/Makefile
index 2b0d3d5..b8547db 100644
--- a/perl/Makefile
+++ b/perl/Makefile
@@ -25,13 +25,15 @@ $(makfile): ../GIT-CFLAGS Makefile
 	echo all: private-Error.pm Git.pm > $@
 	echo '	mkdir -p blib/lib' >> $@
 	echo '	$(RM) blib/lib/Git.pm; cp Git.pm blib/lib/' >> $@
-	echo '	$(RM) blib/lib/Error.pm; \
-	cp private-Error.pm blib/lib/Error.pm' >> $@
+	echo '	$(RM) blib/lib/Error.pm' >> $@
+	'$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
+	echo '	cp private-Error.pm blib/lib/Error.pm' >> $@
 	echo install: >> $@
 	echo '	mkdir -p $(instdir_SQ)' >> $@
 	echo '	$(RM) $(instdir_SQ)/Git.pm; cp Git.pm $(instdir_SQ)' >> $@
-	echo '	$(RM) $(instdir_SQ)/Error.pm; \
-	cp private-Error.pm $(instdir_SQ)/Error.pm' >> $@
+	echo '	$(RM) $(instdir_SQ)/Error.pm' >> $@
+	'$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
+	echo '	cp private-Error.pm $(instdir_SQ)/Error.pm' >> $@
 	echo instlibdir: >> $@
 	echo '	echo $(instdir_SQ)' >> $@
 else

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [PATCH] t9700/test.pl: backwards compatibility improvements
  2008-07-22 21:16 ` [PATCH] t9700/test.pl: backwards compatibility improvements Brandon Casey
@ 2008-07-23 23:33   ` Junio C Hamano
  2008-07-24  0:08     ` Brandon Casey
  0 siblings, 1 reply; 23+ messages in thread
From: Junio C Hamano @ 2008-07-23 23:33 UTC (permalink / raw)
  To: Brandon Casey; +Cc: Git Mailing List

I have applied everything except for this one.  I think it is Ok, but
let's hear success or breakage stories from the list first and then remind
me if the patch seems Ok, please?

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] perl/Makefile: update NO_PERL_MAKEMAKER section
  2008-07-23 23:29   ` Junio C Hamano
@ 2008-07-23 23:56     ` Brandon Casey
  0 siblings, 0 replies; 23+ messages in thread
From: Brandon Casey @ 2008-07-23 23:56 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Git Mailing List

Junio C Hamano wrote:
> Brandon Casey <casey@nrlssc.navy.mil> writes:
> 
>> The perl modules must be copied to blib/lib so they are available for
>> testing.
> 
> True, but private-Error needs to be handled a bit more carefully, I
> think.
> 
> How about this on top of your patch?

That works. Error.pm is not available on my system and the statements
to copy private-Error.pm to Error.pm are correctly placed in perl.mak.

I should have gotten a clue when a file named _private_-Error.pm was
being copied to Error.pm and taken a look at Makefile.PL.

Thanks.

-brandon

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] t9700/test.pl: backwards compatibility improvements
  2008-07-23 23:33   ` Junio C Hamano
@ 2008-07-24  0:08     ` Brandon Casey
  0 siblings, 0 replies; 23+ messages in thread
From: Brandon Casey @ 2008-07-24  0:08 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Git Mailing List

Junio C Hamano wrote:
> I have applied everything except for this one.  I think it is Ok, but
> let's hear success or breakage stories from the list first and then remind
> me if the patch seems Ok, please?

will do.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] t/: Replace diff [-u|-U0] with test_cmp to allow compilation with old diff
  2008-07-22 21:17 ` [PATCH] t/: Replace diff [-u|-U0] with test_cmp to allow compilation with old diff Brandon Casey
@ 2008-07-24  0:19   ` Miklos Vajna
  2008-07-24  0:55     ` Brandon Casey
  0 siblings, 1 reply; 23+ messages in thread
From: Miklos Vajna @ 2008-07-24  0:19 UTC (permalink / raw)
  To: Brandon Casey; +Cc: Git Mailing List, Junio C Hamano

[-- Attachment #1: Type: text/plain, Size: 666 bytes --]

On Tue, Jul 22, 2008 at 04:17:43PM -0500, Brandon Casey <casey@nrlssc.navy.mil> wrote:
>  t/t0002-gitfile.sh               |    2 +-
>  t/t1002-read-tree-m-u-2way.sh    |   12 ++++++------
>  t/t2201-add-update-typechange.sh |   10 +++++-----
>  3 files changed, 12 insertions(+), 12 deletions(-)

Hmm, after applying this patch, I have:

~/git/t$ git grep 'diff -U'
t1002-read-tree-m-u-2way.sh:     diff -U0 M.out 4.out >4diff.out
t1002-read-tree-m-u-2way.sh:     diff -U0 M.out 5.out >5diff.out
t1002-read-tree-m-u-2way.sh:     diff -U0 M.out 14.out >14diff.out
t1002-read-tree-m-u-2way.sh:     diff -U0 M.out 15.out >15diff.out

Any reason you left this out? ;-)

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] t/: Replace diff [-u|-U0] with test_cmp to allow compilation with old diff
  2008-07-24  0:19   ` Miklos Vajna
@ 2008-07-24  0:55     ` Brandon Casey
  0 siblings, 0 replies; 23+ messages in thread
From: Brandon Casey @ 2008-07-24  0:55 UTC (permalink / raw)
  To: Miklos Vajna; +Cc: Git Mailing List, Junio C Hamano

Miklos Vajna wrote:
> On Tue, Jul 22, 2008 at 04:17:43PM -0500, Brandon Casey <casey@nrlssc.navy.mil> wrote:
>>  t/t0002-gitfile.sh               |    2 +-
>>  t/t1002-read-tree-m-u-2way.sh    |   12 ++++++------
>>  t/t2201-add-update-typechange.sh |   10 +++++-----
>>  3 files changed, 12 insertions(+), 12 deletions(-)
> 
> Hmm, after applying this patch, I have:
> 
> ~/git/t$ git grep 'diff -U'
> t1002-read-tree-m-u-2way.sh:     diff -U0 M.out 4.out >4diff.out
> t1002-read-tree-m-u-2way.sh:     diff -U0 M.out 5.out >5diff.out
> t1002-read-tree-m-u-2way.sh:     diff -U0 M.out 14.out >14diff.out
> t1002-read-tree-m-u-2way.sh:     diff -U0 M.out 15.out >15diff.out
> 
> Any reason you left this out? ;-)

I have the patch below in my repo so I can run this test. (copy/pasted
and white-space corrupted since I haven't figured out how to reply to a
message and import a patch correctly using thunderbird).

As you can see I just replaced the 'diff -U0' with 'git diff -U0' and then
stripped off the git bits from the diff in the compare_change() function.

I think there is probably a better way to fix this, so I left it out.

Thinking about it now, it would have made sense to hold off on the part of
the patch I submitted which applies to t1002-read-tree-m-u-2way.sh until I
had a solution for the rest of these 'diff -U0's.

-brandon


diff --git a/t/t1002-read-tree-m-u-2way.sh b/t/t1002-read-tree-m-u-2way.sh
index aa9dd58..5e40cec 100755
--- a/t/t1002-read-tree-m-u-2way.sh
+++ b/t/t1002-read-tree-m-u-2way.sh
@@ -14,6 +14,8 @@ _x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
 _x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
 compare_change () {
        sed >current \
+           -e '1{/^diff --git /d;}' \
+           -e '2{/^index /d;}' \
            -e '/^--- /d; /^+++ /d; /^@@ /d;' \
            -e 's/^\(.[0-7][0-7][0-7][0-7][0-7][0-7]\) '"$_x40"' /\1 X /' "$1"
        test_cmp expected current
@@ -75,7 +77,7 @@ test_expect_success \
      git update-index --add yomin &&
      git read-tree -m -u $treeH $treeM &&
      git ls-files --stage >4.out || return 1
-     diff -U0 M.out 4.out >4diff.out
+     git diff -U0 --no-index M.out 4.out >4diff.out
      compare_change 4diff.out expected &&
      check_cache_at yomin clean &&
      sum bozbar frotz nitfol >actual4.sum &&
@@ -94,7 +96,7 @@ test_expect_success \
      echo yomin yomin >yomin &&
      git read-tree -m -u $treeH $treeM &&
      git ls-files --stage >5.out || return 1
-     diff -U0 M.out 5.out >5diff.out
+     git diff -U0 --no-index M.out 5.out >5diff.out
      compare_change 5diff.out expected &&
      check_cache_at yomin dirty &&
      sum bozbar frotz nitfol >actual5.sum &&
@@ -206,7 +208,7 @@ test_expect_success \
      git update-index --add nitfol &&
      git read-tree -m -u $treeH $treeM &&
      git ls-files --stage >14.out || return 1
-     diff -U0 M.out 14.out >14diff.out
+     git diff -U0 --no-index M.out 14.out >14diff.out
      compare_change 14diff.out expected &&
      sum bozbar frotz >actual14.sum &&
      grep -v nitfol M.sum > expected14.sum &&
@@ -227,7 +229,7 @@ test_expect_success \
      echo nitfol nitfol nitfol >nitfol &&
      git read-tree -m -u $treeH $treeM &&
      git ls-files --stage >15.out || return 1
-     diff -U0 M.out 15.out >15diff.out
+     git diff -U0 --no-index M.out 15.out >15diff.out
      compare_change 15diff.out expected &&
      check_cache_at nitfol dirty &&
      sum bozbar frotz >actual15.sum &&
-- 
1.5.6.2

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH] Set TAR in t/Makefile and in t4116-apply-reverse.sh
  2008-07-22 21:16 ` [PATCH] t4116-apply-reverse.sh: use $TAR rather than tar Brandon Casey
@ 2008-07-25 16:37   ` Stephan Beyer
  2008-07-25 17:05     ` Miklos Vajna
  2008-07-25 18:18     ` Junio C Hamano
  0 siblings, 2 replies; 23+ messages in thread
From: Stephan Beyer @ 2008-07-25 16:37 UTC (permalink / raw)
  To: Brandon Casey; +Cc: git, Junio C Hamano, Stephan Beyer

Hence, the test passes also when you run "make" in t/
or when you invoke t4116-apply-reverse.sh directly,
without $TAR being set.

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
---
 t/Makefile               |    2 +-
 t/t4116-apply-reverse.sh |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/t/Makefile b/t/Makefile
index 0d65ced..b720943 100644
--- a/t/Makefile
+++ b/t/Makefile
@@ -5,7 +5,7 @@
 
 #GIT_TEST_OPTS=--verbose --debug
 SHELL_PATH ?= $(SHELL)
-TAR ?= $(TAR)
+TAR ?= tar
 RM ?= rm -f
 
 # Shell quote;
diff --git a/t/t4116-apply-reverse.sh b/t/t4116-apply-reverse.sh
index 2298ece..3ff5d9e 100755
--- a/t/t4116-apply-reverse.sh
+++ b/t/t4116-apply-reverse.sh
@@ -8,6 +8,7 @@ test_description='git apply in reverse
 '
 
 . ./test-lib.sh
+TAR=${TAR:-tar}
 
 test_expect_success setup '
 
-- 
1.6.0.rc0.102.ga1791

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [PATCH] Set TAR in t/Makefile and in t4116-apply-reverse.sh
  2008-07-25 16:37   ` [PATCH] Set TAR in t/Makefile and in t4116-apply-reverse.sh Stephan Beyer
@ 2008-07-25 17:05     ` Miklos Vajna
  2008-07-25 17:12       ` Stephan Beyer
  2008-07-25 18:18     ` Junio C Hamano
  1 sibling, 1 reply; 23+ messages in thread
From: Miklos Vajna @ 2008-07-25 17:05 UTC (permalink / raw)
  To: Stephan Beyer; +Cc: Brandon Casey, git, Junio C Hamano

[-- Attachment #1: Type: text/plain, Size: 259 bytes --]

On Fri, Jul 25, 2008 at 06:37:40PM +0200, Stephan Beyer <s-beyer@gmx.net> wrote:
> Hence, the test passes also when you run "make" in t/
> or when you invoke t4116-apply-reverse.sh directly,
> without $TAR being set.

Thanks, I just hit this issue today. ;-)

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] Set TAR in t/Makefile and in t4116-apply-reverse.sh
  2008-07-25 17:05     ` Miklos Vajna
@ 2008-07-25 17:12       ` Stephan Beyer
  0 siblings, 0 replies; 23+ messages in thread
From: Stephan Beyer @ 2008-07-25 17:12 UTC (permalink / raw)
  To: Miklos Vajna; +Cc: Brandon Casey, git, Junio C Hamano

[-- Attachment #1: Type: text/plain, Size: 507 bytes --]

Hi,

Miklos Vajna wrote:
> On Fri, Jul 25, 2008 at 06:37:40PM +0200, Stephan Beyer <s-beyer@gmx.net> wrote:
> > Hence, the test passes also when you run "make" in t/
> > or when you invoke t4116-apply-reverse.sh directly,
> > without $TAR being set.
> 
> Thanks, I just hit this issue today. ;-)

Puh, I'm glad that you're not writing
"I've hit this issue yesterday and already sent a patch to this list" :)

Regards,
  Stephan

-- 
Stephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] Set TAR in t/Makefile and in t4116-apply-reverse.sh
  2008-07-25 16:37   ` [PATCH] Set TAR in t/Makefile and in t4116-apply-reverse.sh Stephan Beyer
  2008-07-25 17:05     ` Miklos Vajna
@ 2008-07-25 18:18     ` Junio C Hamano
  2008-07-25 18:24       ` Stephan Beyer
  1 sibling, 1 reply; 23+ messages in thread
From: Junio C Hamano @ 2008-07-25 18:18 UTC (permalink / raw)
  To: Stephan Beyer; +Cc: Brandon Casey, git

Actually, 455a7f3 (More portability., 2005-09-30) introduced $TAR and it
is also used in t5000.  cb34882 (fix t5000-tar-tree.sh when $TAR isn't
set, 2005-11-08) did the same fix you are adding, but I think both of
these fixes are in a wrong place.

I think we should do this instead.  That's how SHELL_PATH is passed around
from build to all the test scripts already.

---
 Makefile            |    1 +
 t/t5000-tar-tree.sh |    1 -
 2 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index b003e3e..1d14209 100644
--- a/Makefile
+++ b/Makefile
@@ -1212,6 +1212,7 @@ GIT-CFLAGS: .FORCE-GIT-CFLAGS
 
 GIT-BUILD-OPTIONS: .FORCE-GIT-BUILD-OPTIONS
 	@echo SHELL_PATH=\''$(SHELL_PATH_SQ)'\' >$@
+	@echo TAR=\''$(subst ','\'',$(TAR))'\' >>$@
 
 ### Detect Tck/Tk interpreter path changes
 ifndef NO_TCLTK
diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh
index 9b0baac..5eb119e 100755
--- a/t/t5000-tar-tree.sh
+++ b/t/t5000-tar-tree.sh
@@ -25,7 +25,6 @@ commit id embedding:
 '
 
 . ./test-lib.sh
-TAR=${TAR:-tar}
 UNZIP=${UNZIP:-unzip}
 
 SUBSTFORMAT=%H%n

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [PATCH] Set TAR in t/Makefile and in t4116-apply-reverse.sh
  2008-07-25 18:18     ` Junio C Hamano
@ 2008-07-25 18:24       ` Stephan Beyer
  2008-07-25 18:54         ` Junio C Hamano
  0 siblings, 1 reply; 23+ messages in thread
From: Stephan Beyer @ 2008-07-25 18:24 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Brandon Casey, git

Hi,

> diff --git a/Makefile b/Makefile
> index b003e3e..1d14209 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1212,6 +1212,7 @@ GIT-CFLAGS: .FORCE-GIT-CFLAGS
>  
>  GIT-BUILD-OPTIONS: .FORCE-GIT-BUILD-OPTIONS
>  	@echo SHELL_PATH=\''$(SHELL_PATH_SQ)'\' >$@
> +	@echo TAR=\''$(subst ','\'',$(TAR))'\' >>$@
>  
>  ### Detect Tck/Tk interpreter path changes
>  ifndef NO_TCLTK

But then TAR has to be set in test-lib.sh also, to be able to
invoke t5000 and t4116 directly, hasn't it?

Regards.

-- 
Stephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] Set TAR in t/Makefile and in t4116-apply-reverse.sh
  2008-07-25 18:24       ` Stephan Beyer
@ 2008-07-25 18:54         ` Junio C Hamano
  2008-07-25 18:58           ` Stephan Beyer
  0 siblings, 1 reply; 23+ messages in thread
From: Junio C Hamano @ 2008-07-25 18:54 UTC (permalink / raw)
  To: Stephan Beyer; +Cc: Brandon Casey, git

Stephan Beyer <s-beyer@gmx.net> writes:

> Hi,
>
>> diff --git a/Makefile b/Makefile
>> index b003e3e..1d14209 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -1212,6 +1212,7 @@ GIT-CFLAGS: .FORCE-GIT-CFLAGS
>>  
>>  GIT-BUILD-OPTIONS: .FORCE-GIT-BUILD-OPTIONS
>>  	@echo SHELL_PATH=\''$(SHELL_PATH_SQ)'\' >$@
>> +	@echo TAR=\''$(subst ','\'',$(TAR))'\' >>$@
>>  
>>  ### Detect Tck/Tk interpreter path changes
>>  ifndef NO_TCLTK
>
> But then TAR has to be set in test-lib.sh also, to be able to
> invoke t5000 and t4116 directly, hasn't it?

Dosen't test-lib source GIT-BUILD-OPTIONS?

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] Set TAR in t/Makefile and in t4116-apply-reverse.sh
  2008-07-25 18:54         ` Junio C Hamano
@ 2008-07-25 18:58           ` Stephan Beyer
  2008-07-25 19:37             ` Junio C Hamano
  0 siblings, 1 reply; 23+ messages in thread
From: Stephan Beyer @ 2008-07-25 18:58 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Brandon Casey, git

Junio C Hamano wrote:
> Stephan Beyer <s-beyer@gmx.net> writes:
> >> diff --git a/Makefile b/Makefile
> >> index b003e3e..1d14209 100644
> >> --- a/Makefile
> >> +++ b/Makefile
> >> @@ -1212,6 +1212,7 @@ GIT-CFLAGS: .FORCE-GIT-CFLAGS
> >>  
> >>  GIT-BUILD-OPTIONS: .FORCE-GIT-BUILD-OPTIONS
> >>  	@echo SHELL_PATH=\''$(SHELL_PATH_SQ)'\' >$@
> >> +	@echo TAR=\''$(subst ','\'',$(TAR))'\' >>$@
> >>  
> >>  ### Detect Tck/Tk interpreter path changes
> >>  ifndef NO_TCLTK
> >
> > But then TAR has to be set in test-lib.sh also, to be able to
> > invoke t5000 and t4116 directly, hasn't it?
> 
> Dosen't test-lib source GIT-BUILD-OPTIONS?

It does.  Great, then.

Regards.

-- 
Stephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] Set TAR in t/Makefile and in t4116-apply-reverse.sh
  2008-07-25 18:58           ` Stephan Beyer
@ 2008-07-25 19:37             ` Junio C Hamano
  0 siblings, 0 replies; 23+ messages in thread
From: Junio C Hamano @ 2008-07-25 19:37 UTC (permalink / raw)
  To: Stephan Beyer; +Cc: Brandon Casey, git

Stephan Beyer <s-beyer@gmx.net> writes:

> Junio C Hamano wrote:
>> Stephan Beyer <s-beyer@gmx.net> writes:
>> >> diff --git a/Makefile b/Makefile
>> >> index b003e3e..1d14209 100644
>> >> --- a/Makefile
>> >> +++ b/Makefile
>> >> @@ -1212,6 +1212,7 @@ GIT-CFLAGS: .FORCE-GIT-CFLAGS
>> >>  
>> >>  GIT-BUILD-OPTIONS: .FORCE-GIT-BUILD-OPTIONS
>> >>  	@echo SHELL_PATH=\''$(SHELL_PATH_SQ)'\' >$@
>> >> +	@echo TAR=\''$(subst ','\'',$(TAR))'\' >>$@
>> >>  
>> >>  ### Detect Tck/Tk interpreter path changes
>> >>  ifndef NO_TCLTK
>> >
>> > But then TAR has to be set in test-lib.sh also, to be able to
>> > invoke t5000 and t4116 directly, hasn't it?
>> 
>> Dosen't test-lib source GIT-BUILD-OPTIONS?
>
> It does.  Great, then.

Sorry, but not quite.  The above shell construct is toooootally bogus.

We need this patch on top.

-- >8 --
[PATCH] Makefile: fix shell quoting

Makefile records paths to a few programs in GIT-BUILD-OPTIONS file.  These
paths need to be quoted twice: once to protect specials from the shell
that runs the generated GIT-BUILD-OPTIONS file, and again to protect them
(and the first level of quoting itself) from the shell that runs the
"echo" inside the Makefile.

You can test this by trying:

    $ ln -s /bin/tar "$HOME/Tes' program/tar"
    $ make TAR="$HOME/Tes' program/tar" test

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 Makefile            |    7 +++++--
 t/t5000-tar-tree.sh |   10 +++++-----
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/Makefile b/Makefile
index 1d14209..f13184b 100644
--- a/Makefile
+++ b/Makefile
@@ -1210,9 +1210,12 @@ GIT-CFLAGS: .FORCE-GIT-CFLAGS
 		echo "$$FLAGS" >GIT-CFLAGS; \
             fi
 
+# We need to apply sq twice, once to protect from the shell
+# that runs GIT-BUILD-OPTIONS, and then again to protect it
+# and the first level quoting from the shell that runs "echo".
 GIT-BUILD-OPTIONS: .FORCE-GIT-BUILD-OPTIONS
-	@echo SHELL_PATH=\''$(SHELL_PATH_SQ)'\' >$@
-	@echo TAR=\''$(subst ','\'',$(TAR))'\' >>$@
+	@echo SHELL_PATH=\''$(subst ','\'',$(SHELL_PATH_SQ))'\' >$@
+	@echo TAR=\''$(subst ','\'',$(subst ','\'',$(TAR)))'\' >>$@
 
 ### Detect Tck/Tk interpreter path changes
 ifndef NO_TCLTK
diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh
index 5eb119e..87902f8 100755
--- a/t/t5000-tar-tree.sh
+++ b/t/t5000-tar-tree.sh
@@ -67,7 +67,7 @@ test_expect_success \
 test_expect_success \
     'validate file modification time' \
     'mkdir extract &&
-     $TAR xf b.tar -C extract a/a &&
+     "$TAR" xf b.tar -C extract a/a &&
      perl -e '\''print((stat("extract/a/a"))[9], "\n")'\'' >b.mtime &&
      echo "1117231200" >expected.mtime &&
      diff expected.mtime b.mtime'
@@ -79,7 +79,7 @@ test_expect_success \
 
 test_expect_success \
     'extract tar archive' \
-    '(cd b && $TAR xf -) <b.tar'
+    '(cd b && "$TAR" xf -) <b.tar'
 
 test_expect_success \
     'validate filenames' \
@@ -96,7 +96,7 @@ test_expect_success \
 
 test_expect_success \
     'extract tar archive with prefix' \
-    '(cd c && $TAR xf -) <c.tar'
+    '(cd c && "$TAR" xf -) <c.tar'
 
 test_expect_success \
     'validate filenames with prefix' \
@@ -116,7 +116,7 @@ test_expect_success \
 
 test_expect_success \
     'extract substfiles' \
-    '(mkdir f && cd f && $TAR xf -) <f.tar'
+    '(mkdir f && cd f && "$TAR" xf -) <f.tar'
 
 test_expect_success \
      'validate substfile contents' \
@@ -128,7 +128,7 @@ test_expect_success \
 
 test_expect_success \
     'extract substfiles from archive with prefix' \
-    '(mkdir g && cd g && $TAR xf -) <g.tar'
+    '(mkdir g && cd g && "$TAR" xf -) <g.tar'
 
 test_expect_success \
      'validate substfile contents from archive with prefix' \
-- 
1.6.0.rc0.51.g51a9e

^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2008-07-25 19:38 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <0GfECozN3g0ZvAESKMi76RyOVHEb2OhhwET9GWmEm7pbzYQJub50UlWpZtBa7MGn1UGb-7mzbzE@cipher.nrlssc.navy.mil>
2008-07-22 21:15 ` [PATCH] perl/Makefile: update NO_PERL_MAKEMAKER section Brandon Casey
2008-07-22 23:09   ` Petr Baudis
2008-07-23 16:22     ` Brandon Casey
2008-07-23 23:29   ` Junio C Hamano
2008-07-23 23:56     ` Brandon Casey
2008-07-22 21:16 ` [PATCH] t9700/test.pl: backwards compatibility improvements Brandon Casey
2008-07-23 23:33   ` Junio C Hamano
2008-07-24  0:08     ` Brandon Casey
2008-07-22 21:16 ` [PATCH] t4116-apply-reverse.sh: use $TAR rather than tar Brandon Casey
2008-07-25 16:37   ` [PATCH] Set TAR in t/Makefile and in t4116-apply-reverse.sh Stephan Beyer
2008-07-25 17:05     ` Miklos Vajna
2008-07-25 17:12       ` Stephan Beyer
2008-07-25 18:18     ` Junio C Hamano
2008-07-25 18:24       ` Stephan Beyer
2008-07-25 18:54         ` Junio C Hamano
2008-07-25 18:58           ` Stephan Beyer
2008-07-25 19:37             ` Junio C Hamano
2008-07-22 21:16 ` [PATCH] t3200,t7201: replace '!' with test_must_fail Brandon Casey
2008-07-22 21:17 ` [PATCH] t/: Replace diff [-u|-U0] with test_cmp to allow compilation with old diff Brandon Casey
2008-07-24  0:19   ` Miklos Vajna
2008-07-24  0:55     ` Brandon Casey
2008-07-22 21:21 ` [PATCH] t7502-commit.sh: rearrange test to make more portable Brandon Casey
2008-07-22 21:23 ` [PATCH] t/t4202-log.sh: add newline at end of file Brandon Casey

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.