diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-11-06 15:50:18 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-11-06 15:50:18 +0900 |
commit | a5ab66ee5f36fa3e90955f36f6451b3cf67943ed (patch) | |
tree | cd29474c4a158cb691d5f58455b7e208150aeced /t | |
parent | Merge branch 'jc/http-curlver-warnings' (diff) | |
parent | archive: initialize archivers earlier (diff) | |
download | tgif-a5ab66ee5f36fa3e90955f36f6451b3cf67943ed.tar.xz |
Merge branch 'js/remote-archive-dwimfix'
The logic to determine the archive type "git archive" uses did not
correctly kick in for "git archive --remote", which has been
corrected.
* js/remote-archive-dwimfix:
archive: initialize archivers earlier
Diffstat (limited to 't')
-rwxr-xr-x | t/t5000-tar-tree.sh | 6 | ||||
-rwxr-xr-x | t/t5003-archive-zip.sh | 7 |
2 files changed, 12 insertions, 1 deletions
diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh index 2a97b27b0a..602bfd9574 100755 --- a/t/t5000-tar-tree.sh +++ b/t/t5000-tar-tree.sh @@ -206,6 +206,12 @@ test_expect_success 'git archive with --output, override inferred format' ' test_cmp_bin b.tar d4.zip ' +test_expect_success GZIP 'git archive with --output and --remote creates .tgz' ' + git archive --output=d5.tgz --remote=. HEAD && + gzip -d -c <d5.tgz >d5.tar && + test_cmp_bin b.tar d5.tar +' + test_expect_success 'git archive --list outside of a git repo' ' nongit git archive --list ' diff --git a/t/t5003-archive-zip.sh b/t/t5003-archive-zip.sh index 55c7870997..106eddbd85 100755 --- a/t/t5003-archive-zip.sh +++ b/t/t5003-archive-zip.sh @@ -158,11 +158,16 @@ test_expect_success 'git archive --format=zip with --output' \ 'git archive --format=zip --output=d2.zip HEAD && test_cmp_bin d.zip d2.zip' -test_expect_success 'git archive with --output, inferring format' ' +test_expect_success 'git archive with --output, inferring format (local)' ' git archive --output=d3.zip HEAD && test_cmp_bin d.zip d3.zip ' +test_expect_success 'git archive with --output, inferring format (remote)' ' + git archive --remote=. --output=d4.zip HEAD && + test_cmp_bin d.zip d4.zip +' + test_expect_success \ 'git archive --format=zip with prefix' \ 'git archive --format=zip --prefix=prefix/ HEAD >e.zip' |