diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-04-09 23:02:41 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-04-09 23:02:41 +0400 |
commit | fbae3d9ace0b71f8db62cde127fa6fe24c40380c (patch) | |
tree | e21a4680776b2aed597dc95286769ca495aa3c36 /t | |
parent | aba7af8e67664f60b432ae1760644f9e96470949 (diff) | |
parent | e6f637122ecd60c59df27b8188b6ddac39ac0063 (diff) |
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 && |