Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: git@vger.kernel.org
Subject: [PATCH] git-clone: stop dumb protocol from copying refs outside heads/ and tags/.
Date: Fri, 24 Nov 2006 19:17:05 -0800	[thread overview]
Message-ID: <7vac2g8bbi.fsf@assigned-by-dhcp.cox.net> (raw)

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>
---

 * This is another one of those patches I've been doing recently
   after making --use-separate-remote the default.  Judging from
   my experience in the past few days, it is quite surprising
   that none of these were found and reported earlier, given
   that many people made loud noises to make separate-remote the
   default layout.  Maybe they do not eat their own dog food?  I
   honestly do not know...

 git-clone.sh |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/git-clone.sh b/git-clone.sh
index 9ed4135..d4ee93f 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
-- 
1.4.4.1.g61fba


                 reply	other threads:[~2006-11-25  3:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vac2g8bbi.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox