git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [COGITO PATCH] Heads and tags in subdirectories

From
SBSanti Béjar <sbejar@gmail.com>
Date
Jun 1, 2005, 12:59 UTC
Message-ID
<87is0yi66t.fsf@ifae.es>
In-Reply-To
<87is0zginw.fsf@ifae.es>
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
Previous: Santi BéjarNext: Santi Béjar
Message 3 of 4 in “Heads and tags in subdirectories”
  1. Heads and tags in subdirectoriesSanti Béjar, May 31, 2005
  2. fetch_local -d behaves different from other fetch_*Santi Béjar, Jun 1, 2005
  3. Santi BéjarJun 1, 2005
  4. Santi BéjarJun 1, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.