Skip to content

Commit

Permalink
git-clone: stop dumb protocol from copying refs outside heads/ and ta…
Browse files Browse the repository at this point in the history
…gs/.

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>
  • Loading branch information
Junio C Hamano committed Nov 25, 2006
1 parent 7002243 commit 983d2ee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions git-clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 983d2ee

Please sign in to comment.