From: Jeff King Date: Tue, 06 Feb 2007 08:12:05 GMT Subject: Re: Difficulties in advertising a new branch to git newbies Message-ID: <20070206081205.GA31948@coredump.intra.peff.net> In-Reply-To: <7vy7nbiv90.fsf@assigned-by-dhcp.cox.net> On Mon, Feb 05, 2007 at 11:46:19PM -0800, Junio C Hamano wrote: > I think the abstraction is wrong -- why do you even need to > iterate over .git/remotes (and .git/config remote.*) when the > only thing this cares about is refs under refs/remotes/* > hierarchy? Well, you obviously can't look in the directory because of packed refs. You can enumerate all refs with for_each_remote_ref and try to match against "refs/remotes/*/$ref". But how do you handle '/' in a remote name or a branch name? If I have a remote "foo/bar" with branch "baz", should I match it while looking up "bar/baz"? What about having the remote "foo" and the branch "bar/baz"? Should a lookup for "baz" find that? If I'm just given the collapsed "remote/branch" text, I don't know which parts are remote and which parts are branch, unless I make the assumption that remotes have no '/' in them (which I did not think we were making). -Peff