Re: [PATCH] archive: fix archive generation for empty trees
- From
René Scharfe <rene.scharfe@lsrfire.ath.cx>
- Date
- Mar 8, 2012, 17:46 UTC
- Message-ID
- <4F58F063.4060600@lsrfire.ath.cx>
- In-Reply-To
- <1331165362-78065-1-git-send-email-brodie@sf.io>
Am 08.03.2012 01:09, schrieb Brodie Rao:
Show 19 quoted lines
> diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh > index 527c9e7..404786f 100755 > --- a/t/t5000-tar-tree.sh > +++ b/t/t5000-tar-tree.sh > @@ -360,4 +360,20 @@ test_expect_success GZIP 'remote tar.gz can be disabled' ' > >remote.tar.gz > ' > > +test_expect_success \ > + 'git archive with an empty tree and a prefix' \ > + 'git rm -r .&& > + git commit -m empty&& > + git archive --format=tar --prefix=empty/ HEAD> e1.tar&& > + "$TAR" tf e1.tar' > + > +test_expect_success \ > + 'git archive with an empty tree and no prefix' \ > + 'git archive --format=tar HEAD> e2.tar&& > + test_must_fail "$TAR" tf e2.tar'
This test fails for me, i.e. tar does not complain about the empty archive (GNU tar 1.25). Perhaps use git archive -v to generate a list of entries?
Show 8 quoted lines
> + > +test_expect_success \ > + 'git archive on specific paths with an empty tree' \ > + 'test_must_fail git archive --format=tar --prefix=empty/ HEAD foo' > + > test_done > -- 1.7.9.2 >