aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-04-10 00:47:04 -0700
committerJunio C Hamano <gitster@pobox.com>2008-04-10 00:47:04 -0700
commit71349732c53a4c1b64729628b04db7b3c3f7606d (patch)
tree22cd6c2ca4223b1a442400334958269ea1fac3ec /t
parent2a5fe2545882721d6841bad11dae0f15b454bf0d (diff)
parentf59774add488a6c5fb440a4aaa7255f594b1027d (diff)
downloadgit-71349732c53a4c1b64729628b04db7b3c3f7606d.tar.gz
git-71349732c53a4c1b64729628b04db7b3c3f7606d.tar.xz
Merge branch 'maint'
* maint: git-fetch: fix status output when not storing tracking ref 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 dca2067b2..fa62b6aa2 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'