summaryrefslogtreecommitdiff
path: root/t/t5512-ls-remote.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2015-08-19 14:48:53 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-08-19 14:48:54 -0700
commit824a0be6be8d6c3323003bae65b3df98387e575b (patch)
tree3a30a0d7f94026303a2a9a6d532b0c53ffa86cf0 /t/t5512-ls-remote.sh
parentMerge branch 'jk/test-with-x' (diff)
parentrefs: support negative transfer.hideRefs (diff)
downloadtgif-824a0be6be8d6c3323003bae65b3df98387e575b.tar.xz
Merge branch 'jk/negative-hiderefs'
A negative !ref entry in multi-value transfer.hideRefs configuration can be used to say "don't hide this one". * jk/negative-hiderefs: refs: support negative transfer.hideRefs docs/config.txt: reorder hideRefs config
Diffstat (limited to 't/t5512-ls-remote.sh')
-rwxr-xr-xt/t5512-ls-remote.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/t/t5512-ls-remote.sh b/t/t5512-ls-remote.sh
index 3bd9759e0f..aadaac515e 100755
--- a/t/t5512-ls-remote.sh
+++ b/t/t5512-ls-remote.sh
@@ -128,6 +128,11 @@ test_expect_success 'Report match with --exit-code' '
test_cmp expect actual
'
+test_expect_success 'set up some extra tags for ref hiding' '
+ git tag magic/one &&
+ git tag magic/two
+'
+
for configsection in transfer uploadpack
do
test_expect_success "Hide some refs with $configsection.hiderefs" '
@@ -138,6 +143,24 @@ do
sed -e "/ refs\/tags\//d" >expect &&
test_cmp expect actual
'
+
+ test_expect_success "Override hiding of $configsection.hiderefs" '
+ test_when_finished "test_unconfig $configsection.hiderefs" &&
+ git config --add $configsection.hiderefs refs/tags &&
+ git config --add $configsection.hiderefs "!refs/tags/magic" &&
+ git config --add $configsection.hiderefs refs/tags/magic/one &&
+ git ls-remote . >actual &&
+ grep refs/tags/magic/two actual &&
+ ! grep refs/tags/magic/one actual
+ '
+
done
+test_expect_success 'overrides work between mixed transfer/upload-pack hideRefs' '
+ test_config uploadpack.hiderefs refs/tags &&
+ test_config transfer.hiderefs "!refs/tags/magic" &&
+ git ls-remote . >actual &&
+ grep refs/tags/magic actual
+'
+
test_done