summaryrefslogtreecommitdiff
path: root/git-clone.sh
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-11-24 19:07:24 -0800
committerJunio C Hamano <junkio@cox.net>2006-11-24 19:07:24 -0800
commit983d2ee284936e8bf14823863d3945b4d8740b94 (patch)
treec63a670875b8230ab253a58207156d1d78252985 /git-clone.sh
parent7002243f7ee7eb557a1e49420487e150730ff46f (diff)
downloadgit-983d2ee284936e8bf14823863d3945b4d8740b94.tar.gz
git-clone: stop dumb protocol from copying refs outside heads/ and tags/.
Most notably, the original code first copied refs/remotes/ that remote side had to local, and overwrote them by mapping refs/heads/ from the remote when a dumb protocol transport was used. This makes the clone behaviour by dumb protocol in line with the git native and rsync transports. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-clone.sh')
-rwxr-xr-xgit-clone.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/git-clone.sh b/git-clone.sh
index 9ed4135544..d4ee93f75b 100755
--- a/git-clone.sh
+++ b/git-clone.sh
@@ -48,6 +48,10 @@ Perhaps git-update-server-info needs to be run there?"
case "$name" in
*^*) continue;;
esac
+ case "$bare,$name" in
+ yes,* | ,heads/* | ,tags/*) ;;
+ *) continue ;;
+ esac
if test -n "$use_separate_remote" &&
branch_name=`expr "z$name" : 'zheads/\(.*\)'`
then