Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2018-02-09 23:32:16 +0300
committerJunio C Hamano <gitster@pobox.com>2018-02-10 00:10:13 +0300
commit6317972cff9b4df7a6cc666b08be7133ba81617c (patch)
treeacbb3ab75f127187d608c7fe9f1b07dc5334d7a8 /t/t5510-fetch.sh
parent97716d217c1ea00adfc64e4f6bb85c1236d661ff (diff)
fetch: make the --prune-tags work with <url>
Make the new --prune-tags option work properly when git-fetch is invoked with a <url> parameter instead of a <remote name> parameter. This change is split off from the introduction of --prune-tags due to the relative complexity of munging the incoming argv, which is easier to review as a separate change. 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.sh16
1 files changed, 7 insertions, 9 deletions
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index 227dd70b7b..dce2371302 100755
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
@@ -738,18 +738,15 @@ test_configured_prune unset unset unset true pruned kept \
"--prune origin +refs/heads/*:refs/remotes/origin/*"
# Pruning that also takes place if a file:// url replaces a named
-# remote, with the exception of --prune-tags on the command-line
-# (arbitrary limitation).
-#
-# However, because there's no implicit
+# remote. However, because there's no implicit
# +refs/heads/*:refs/remotes/origin/* refspec and supplying it on the
# command-line negates --prune-tags, the branches will not be pruned.
test_configured_prune_type unset unset unset unset kept kept "origin --prune-tags" "name"
test_configured_prune_type unset unset unset unset kept kept "origin --prune-tags" "link"
test_configured_prune_type unset unset unset unset pruned pruned "origin --prune --prune-tags" "name"
-test_configured_prune_type unset unset unset unset kept kept "origin --prune --prune-tags" "link"
+test_configured_prune_type unset unset unset unset kept pruned "origin --prune --prune-tags" "link"
test_configured_prune_type unset unset unset unset pruned pruned "--prune --prune-tags origin" "name"
-test_configured_prune_type unset unset unset unset kept kept "--prune --prune-tags origin" "link"
+test_configured_prune_type unset unset unset unset kept pruned "--prune --prune-tags origin" "link"
test_configured_prune_type unset unset true unset pruned pruned "--prune origin" "name"
test_configured_prune_type unset unset true unset kept pruned "--prune origin" "link"
test_configured_prune_type unset unset unset true pruned pruned "--prune origin" "name"
@@ -761,8 +758,9 @@ test_configured_prune_type unset true true unset kept pruned "origin" "link"
test_configured_prune_type unset true unset true pruned pruned "origin" "name"
test_configured_prune_type unset true unset true kept pruned "origin" "link"
-# Interaction between --prune-tags and no "fetch" config in the remote
-# at all.
+# When all remote.origin.fetch settings are deleted a --prune
+# --prune-tags still implicitly supplies refs/tags/*:refs/tags/* so
+# tags, but not tracking branches, will be deleted.
test_expect_success 'remove remote.origin.fetch "one"' '
(
cd one &&
@@ -770,7 +768,7 @@ test_expect_success 'remove remote.origin.fetch "one"' '
)
'
test_configured_prune_type unset unset unset unset kept pruned "origin --prune --prune-tags" "name"
-test_configured_prune_type unset unset unset unset kept kept "origin --prune --prune-tags" "link"
+test_configured_prune_type unset unset unset unset kept pruned "origin --prune --prune-tags" "link"
test_expect_success 'all boundary commits are excluded' '
test_commit base &&