diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-04-10 00:29:33 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-04-10 00:29:33 -0700 |
commit | 179c94b24ae87e28328f9b311489417b66bd62c9 (patch) | |
tree | 3458de6031a61992cf96700826c29096867cae43 /t | |
parent | 1d2375ddfee18bd3effd2c1f98527cc2f8b1df0a (diff) | |
parent | abea85d1e9ee0bd77e41e934534aa5d5cdd0593a (diff) | |
download | git-179c94b24ae87e28328f9b311489417b66bd62c9.tar.gz |
Merge branch 'maint-1.5.4' into maint
* maint-1.5.4:
core-tutorial.txt: Fix showing the current behaviour.
git-archive: ignore prefix when checking file attribute
Fix documentation syntax of optional arguments in short options.
Diffstat (limited to 't')
-rwxr-xr-x | t/t5000-tar-tree.sh | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh index dca2067b2d..fa62b6aa21 100755 --- a/t/t5000-tar-tree.sh +++ b/t/t5000-tar-tree.sh @@ -109,9 +109,10 @@ test_expect_success \ 'diff -r a c/prefix/a' test_expect_success \ - 'create an archive with a substfiles' \ + 'create archives with substfiles' \ 'echo "substfile?" export-subst >a/.gitattributes && git archive HEAD >f.tar && + git archive --prefix=prefix/ HEAD >g.tar && rm a/.gitattributes' test_expect_success \ @@ -127,6 +128,18 @@ test_expect_success \ ' test_expect_success \ + 'extract substfiles from archive with prefix' \ + '(mkdir g && cd g && $TAR xf -) <g.tar' + +test_expect_success \ + 'validate substfile contents from archive with prefix' \ + 'git log --max-count=1 "--pretty=format:A${SUBSTFORMAT}O" HEAD \ + >g/prefix/a/substfile1.expected && + diff g/prefix/a/substfile1.expected g/prefix/a/substfile1 && + diff a/substfile2 g/prefix/a/substfile2 +' + +test_expect_success \ 'git archive --format=zip' \ 'git archive --format=zip HEAD >d.zip' |