diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-04-09 12:02:41 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-04-09 12:02:41 -0700 |
commit | fbae3d9ace0b71f8db62cde127fa6fe24c40380c (patch) | |
tree | e21a4680776b2aed597dc95286769ca495aa3c36 /t | |
parent | Merge branch 'mh/update-ref-batch-create-fix' into maint (diff) | |
parent | fetch: handle overlaping refspecs on --prune (diff) | |
download | tgif-fbae3d9ace0b71f8db62cde127fa6fe24c40380c.tar.xz |
Merge branch 'cn/fetch-prune-overlapping-destination' into maint
* cn/fetch-prune-overlapping-destination:
fetch: handle overlaping refspecs on --prune
fetch: add a failing test for prunning with overlapping refspecs
Diffstat (limited to 't')
-rwxr-xr-x | t/t5510-fetch.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh index ab28594c62..b212f83db7 100755 --- a/t/t5510-fetch.sh +++ b/t/t5510-fetch.sh @@ -113,6 +113,26 @@ test_expect_success 'fetch --prune with a namespace keeps other namespaces' ' git rev-parse origin/master ' +test_expect_success 'fetch --prune handles overlapping refspecs' ' + cd "$D" && + git update-ref refs/pull/42/head master && + git clone . prune-overlapping && + cd prune-overlapping && + git config --add remote.origin.fetch refs/pull/*/head:refs/remotes/origin/pr/* && + + git fetch --prune origin && + git rev-parse origin/master && + git rev-parse origin/pr/42 && + + git config --unset-all remote.origin.fetch + git config remote.origin.fetch refs/pull/*/head:refs/remotes/origin/pr/* && + git config --add remote.origin.fetch refs/heads/*:refs/remotes/origin/* && + + git fetch --prune origin && + git rev-parse origin/master && + git rev-parse origin/pr/42 +' + test_expect_success 'fetch --prune --tags prunes branches but not tags' ' cd "$D" && git clone . prune-tags && |