All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Santi Béjar" <sbejar@gmail.com>
To: Git Mailing List <git@vger.kernel.org>
Subject: Re: [COGITO PATCH] Heads and tags in subdirectories
Date: Wed, 01 Jun 2005 14:59:22 +0200	[thread overview]
Message-ID: <87is0yi66t.fsf@ifae.es> (raw)
In-Reply-To: <87is0zginw.fsf@ifae.es> ( Santi Béjar's message of "Wed, 01 Jun 2005 00:00:35 +0200")


Teach cg-init about the origin directory.

Signed-off-by: "Santi Béjar" <sbejar@gmail.com>
---
 cg-init |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/cg-init b/cg-init
--- a/cg-init
+++ b/cg-init
@@ -29,8 +29,9 @@ ln -s refs/heads/master $_git/HEAD
 if [ "$uri" ]; then
 	echo "$uri" >$_git/branches/origin
 	cg-pull origin || die "pull failed"
-
-	cp $_git/refs/heads/origin $_git/refs/heads/master
+	uribranch=$(echo $uri | cut -d '#' -f 2 -s)
+	uribranch=${uribranch:-master}
+	cp $_git/refs/heads/origin/$uribranch $_git/refs/heads/master
 	git-read-tree HEAD
 	git-checkout-cache -a
 	git-update-cache --refresh


  parent reply	other threads:[~2005-06-01 12:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-31 22:00 [COGITO PATCH] Heads and tags in subdirectories Santi Béjar
2005-06-01 10:55 ` [COGITO PATCH] fetch_local -d behaves different from other fetch_* Santi Béjar
2005-06-01 12:59 ` Santi Béjar [this message]
2005-06-01 16:17   ` [COGITO PATCH] Heads and tags in subdirectories Santi Béjar

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=87is0yi66t.fsf@ifae.es \
    --to=sbejar@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.