From: Santi Béjar Date: Wed, 01 Jun 2005 12:59:22 GMT Subject: Re: [COGITO PATCH] Heads and tags in subdirectories 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" --- 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