{"thread":{"id":"43705","subject":"[PATCH] git-clone: stop dumb protocol from copying refs outside heads/ and tags/.","startedAt":"2006-11-25T03:17:05Z","lastAt":"2006-11-25T03:17:05Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"297005","messageId":"7vac2g8bbi.fsf@assigned-by-dhcp.cox.net","threadId":"43705","inReplyTo":null,"subject":"[PATCH] git-clone: stop dumb protocol from copying refs outside heads/ and tags/.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-11-25T03:17:05Z","receivedAt":"2006-11-25T03:17:05Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Most notably, the original code first copied refs/remotes/ that\nremote side had to local, and overwrote them by mapping refs/heads/\nfrom the remote when a dumb protocol transport was used.\n\nThis makes the clone behaviour by dumb protocol in line with the\ngit native and rsync transports.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\n\n * This is another one of those patches I've been doing recently\n   after making --use-separate-remote the default.  Judging from\n   my experience in the past few days, it is quite surprising\n   that none of these were found and reported earlier, given\n   that many people made loud noises to make separate-remote the\n   default layout.  Maybe they do not eat their own dog food?  I\n   honestly do not know...\n\n git-clone.sh |    4 ++++\n 1 files changed, 4 insertions(+), 0 deletions(-)\n\ndiff --git a/git-clone.sh b/git-clone.sh\nindex 9ed4135..d4ee93f 100755\n--- a/git-clone.sh\n+++ b/git-clone.sh\n@@ -48,6 +48,10 @@ Perhaps git-update-server-info needs to be run there?\"\n \t\tcase \"$name\" in\n \t\t*^*)\tcontinue;;\n \t\tesac\n+\t\tcase \"$bare,$name\" in\n+\t\tyes,* | ,heads/* | ,tags/*) ;;\n+\t\t*)\tcontinue ;;\n+\t\tesac\n \t\tif test -n \"$use_separate_remote\" &&\n \t\t   branch_name=`expr \"z$name\" : 'zheads/\\(.*\\)'`\n \t\tthen\n-- \n1.4.4.1.g61fba\n\n"}]}