Re: Difficulties in advertising a new branch to git newbies

From: Jeff King <peff@peff.net>
Date: 2007-02-06 19:12:05
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
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Tue Feb 06 19:12:24 2007

This archive was generated by hypermail 2.1.8 : 2007-02-06 19:14:19 EST