summaryrefslogtreecommitdiff
path: root/t/t5510-fetch.sh
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2014-02-27 09:00:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-03-26 19:57:52 (GMT)
commite6f637122ecd60c59df27b8188b6ddac39ac0063 (patch)
tree444fa9d30b7ef7905e4dce9006ae03ac40dc22ee /t/t5510-fetch.sh
parentf377e7a37c1b28359a228cf5bb43161a8a22b385 (diff)
downloadgit-e6f637122ecd60c59df27b8188b6ddac39ac0063.zip
git-e6f637122ecd60c59df27b8188b6ddac39ac0063.tar.gz
git-e6f637122ecd60c59df27b8188b6ddac39ac0063.tar.bz2
fetch: handle overlaping refspecs on --prune
We need to consider that a remote-tracking branch may match more than one rhs of a fetch refspec. In such a case, it is not enough to stop at the first match but look at all of the matches in order to determine whether a head is stale. To this goal, introduce a variant of query_refspecs which returns all of the matching refspecs and loop over those answers to check for staleness. Signed-off-by: Carlos Martín Nieto <cmn@elego.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5510-fetch.sh')
-rwxr-xr-xt/t5510-fetch.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index 473e855..0616128 100755
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
@@ -113,7 +113,7 @@ test_expect_success 'fetch --prune with a namespace keeps other namespaces' '
git rev-parse origin/master
'
-test_expect_failure 'fetch --prune handles overlapping refspecs' '
+test_expect_success 'fetch --prune handles overlapping refspecs' '
cd "$D" &&
git update-ref refs/pull/42/head master &&
git clone . prune-overlapping &&