diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-08-19 14:48:53 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-08-19 14:48:54 -0700 |
commit | 824a0be6be8d6c3323003bae65b3df98387e575b (patch) | |
tree | 3a30a0d7f94026303a2a9a6d532b0c53ffa86cf0 /t/t5512-ls-remote.sh | |
parent | Merge branch 'jk/test-with-x' (diff) | |
parent | refs: support negative transfer.hideRefs (diff) | |
download | tgif-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-x | t/t5512-ls-remote.sh | 23 |
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 |