summaryrefslogtreecommitdiff
path: root/t/t5510-fetch.sh
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2018-02-09 20:32:07 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-02-09 21:10:12 (GMT)
commit6fb23f56c16c0981a2f7b46f53ac3af12b247996 (patch)
tree194a2f7f13a7e1363dce7e415157b1fd620f0876 /t/t5510-fetch.sh
parentca3065e7e7bcb406043f8202ef672f884eeb925d (diff)
downloadgit-6fb23f56c16c0981a2f7b46f53ac3af12b247996.zip
git-6fb23f56c16c0981a2f7b46f53ac3af12b247996.tar.gz
git-6fb23f56c16c0981a2f7b46f53ac3af12b247996.tar.bz2
fetch tests: test --prune and refspec interaction
Add a test for the interaction between explicitly provided refspecs and fetch.prune. There's no point in adding this boilerplate to every combination of unset/false/true, it's instructive and sufficient to show that no matter if the variable is unset, false or true the refspec on the command-line overrides any configuration variable. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5510-fetch.sh')
-rwxr-xr-xt/t5510-fetch.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index fad65bd..dacdb87 100755
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
@@ -609,6 +609,10 @@ test_configured_prune () {
test_configured_prune unset unset kept kept ""
test_configured_prune unset unset kept kept "--no-prune"
test_configured_prune unset unset pruned kept "--prune"
+test_configured_prune unset unset kept pruned \
+ "--prune origin refs/tags/*:refs/tags/*"
+test_configured_prune unset unset pruned pruned \
+ "--prune origin refs/tags/*:refs/tags/* +refs/heads/*:refs/remotes/origin/*"
test_configured_prune false unset kept kept ""
test_configured_prune false unset kept kept "--no-prune"
@@ -625,6 +629,10 @@ test_configured_prune unset false pruned kept "--prune"
test_configured_prune false false kept kept ""
test_configured_prune false false kept kept "--no-prune"
test_configured_prune false false pruned kept "--prune"
+test_configured_prune false false kept pruned \
+ "--prune origin refs/tags/*:refs/tags/*"
+test_configured_prune false false pruned pruned \
+ "--prune origin refs/tags/*:refs/tags/* +refs/heads/*:refs/remotes/origin/*"
test_configured_prune true false kept kept ""
test_configured_prune true false pruned kept "--prune"
@@ -641,6 +649,10 @@ test_configured_prune false true pruned kept "--prune"
test_configured_prune true true pruned kept ""
test_configured_prune true true pruned kept "--prune"
test_configured_prune true true kept kept "--no-prune"
+test_configured_prune true true kept pruned \
+ "--prune origin refs/tags/*:refs/tags/*"
+test_configured_prune true true pruned pruned \
+ "--prune origin refs/tags/*:refs/tags/* +refs/heads/*:refs/remotes/origin/*"
test_expect_success 'all boundary commits are excluded' '
test_commit base &&