summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-04-10 07:29:33 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-04-10 07:29:33 (GMT)
commit179c94b24ae87e28328f9b311489417b66bd62c9 (patch)
tree3458de6031a61992cf96700826c29096867cae43 /t
parent1d2375ddfee18bd3effd2c1f98527cc2f8b1df0a (diff)
parentabea85d1e9ee0bd77e41e934534aa5d5cdd0593a (diff)
downloadgit-179c94b24ae87e28328f9b311489417b66bd62c9.zip
git-179c94b24ae87e28328f9b311489417b66bd62c9.tar.gz
git-179c94b24ae87e28328f9b311489417b66bd62c9.tar.bz2
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-xt/t5000-tar-tree.sh15
1 files changed, 14 insertions, 1 deletions
diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh
index dca2067..fa62b6a 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'