t5510: check that "git fetch --prune --tags" does not prune branches

"git fetch --prune --tags" is currently interpreted as follows: * "--tags" is equivalent to specifying a refspec "refs/tags/*:refs/tags/*", and supersedes any default refspecs configured via remote.$REMOTE.fetch. * "--prune" only operates on the refspecs being fetched. Therefore, "git fetch --prune --tags" prunes tags in refs/tags/* but does not fetch or prune other references. The fact that this command does not prune references outside of refs/tags/* was previously untested. So add a test that verifies the status quo. However, the status quo is surprising, so it will be changed later in this patch series. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Michael Haggerty committed Oct 23, 2013 at 17:50 UTC 68a304d5fed6657e452e8c1571fe9ca93d0a272a
1 file changed +4
t/t5510-fetch.sh
+4
@@ -118,9 +118,13 @@ test_expect_success 'fetch --prune --tags does not delete the remote-tracking br
118 git clone . prune-tags &&
119 cd prune-tags &&
120 git tag sometag master &&
121 + # Create what looks like a remote-tracking branch from an earlier
122 + # fetch that has since been deleted from the remote:
123 + git update-ref refs/remotes/origin/fake-remote master &&
124
125 git fetch --prune --tags origin &&
126 git rev-parse origin/master &&
127 + git rev-parse origin/fake-remote &&
128 test_must_fail git rev-parse sometag
129 '
130