summaryrefslogtreecommitdiff
path: root/t/t5001-archive-attr.sh
diff options
context:
space:
mode:
authorLibravatar René Scharfe <l.s.r@web.de>2017-08-19 07:32:37 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-08-19 00:40:25 -0700
commit5ff247ac0cc9b2d09c8c24bd0c8df12eed94aebc (patch)
tree3491f059ec09b1fedd756f2f76ba7c700574500e /t/t5001-archive-attr.sh
parentarchive: factor out helper functions for handling attributes (diff)
downloadtgif-5ff247ac0cc9b2d09c8c24bd0c8df12eed94aebc.tar.xz
archive: don't queue excluded directories
Reject directories with the attribute export-ignore already while queuing them. This prevents read_tree_recursive() from descending into them and this avoids write_archive_entry() rejecting them later on, which queue_or_write_archive_entry() is not prepared for. Borrow the existing strbuf to build the full path to avoid string copies and extra allocations; just make sure we restore the original value before moving on. Keep checking any other attributes in write_archive_entry() as before, but avoid checking them twice. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5001-archive-attr.sh')
-rwxr-xr-xt/t5001-archive-attr.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t5001-archive-attr.sh b/t/t5001-archive-attr.sh
index 063622bc71..897f6f06d5 100755
--- a/t/t5001-archive-attr.sh
+++ b/t/t5001-archive-attr.sh
@@ -76,7 +76,7 @@ test_expect_exists archive-pathspec/ignored-by-worktree
test_expect_missing archive-pathspec/excluded-by-pathspec.d failure
test_expect_missing archive-pathspec/excluded-by-pathspec.d/file
-test_expect_failure 'git archive with wildcard pathspec' '
+test_expect_success 'git archive with wildcard pathspec' '
git archive HEAD ":!excluded-by-p*" >archive-pathspec-wildcard.tar &&
extract_tar_to_dir archive-pathspec-wildcard
'
@@ -85,7 +85,7 @@ test_expect_missing archive-pathspec-wildcard/ignored
test_expect_missing archive-pathspec-wildcard/ignored-by-tree
test_expect_missing archive-pathspec-wildcard/ignored-by-tree.d
test_expect_missing archive-pathspec-wildcard/ignored-by-tree.d/file
-test_expect_exists archive-pathspec-wildcard/ignored-by-worktree failure
+test_expect_exists archive-pathspec-wildcard/ignored-by-worktree
test_expect_missing archive-pathspec-wildcard/excluded-by-pathspec.d
test_expect_missing archive-pathspec-wildcard/excluded-by-pathspec.d/file