diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-10-08 13:05:25 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-10-08 13:05:26 -0700 |
commit | b2c45f5b961b3b5d894fb723d2031e8ff41cadf7 (patch) | |
tree | ae94ddbc40beb6c552d4c6907eff133831be930f /t | |
parent | Merge branch 'jc/push-cert' (diff) | |
parent | archive: support filtering paths with glob (diff) | |
download | tgif-b2c45f5b961b3b5d894fb723d2031e8ff41cadf7.tar.xz |
Merge branch 'nd/archive-pathspec'
"git archive" learned to filter what gets archived with pathspec.
* nd/archive-pathspec:
archive: support filtering paths with glob
Diffstat (limited to 't')
-rwxr-xr-x | t/t5000-tar-tree.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh index 7b8babd89b..d01bbdc968 100755 --- a/t/t5000-tar-tree.sh +++ b/t/t5000-tar-tree.sh @@ -305,4 +305,18 @@ test_expect_success GZIP 'remote tar.gz can be disabled' ' >remote.tar.gz ' +test_expect_success 'archive and :(glob)' ' + git archive -v HEAD -- ":(glob)**/sh" >/dev/null 2>actual && + cat >expect <<EOF && +a/ +a/bin/ +a/bin/sh +EOF + test_cmp expect actual +' + +test_expect_success 'catch non-matching pathspec' ' + test_must_fail git archive -v HEAD -- "*.abc" >/dev/null +' + test_done |