From: Junio C Hamano Date: Tue, 14 May 2013 17:50:06 GMT Subject: Re: [PATCHv2 03/10] refs.c: Refactor code for mapping between shorthand names and full refnames Message-ID: <7vobcdjvsh.fsf@alter.siamese.dyndns.org> In-Reply-To: Johan Herland writes: > I think I like "refs/peers/%1/heads/%*" better than > "refs/peers/%1/heads/%2", since the latter sort of makes me wonder > whether the 3rd, 4th, etc. components would be discarded. Makes sense. > I am not sure why we would want "refs/remotes/%1/%2" instead of > "refs/remote/%*". The former way makes it easier to see what "refs/peers/%1/heads/%2" means, I think, but otherwise aren't they equivalent? I do not see a strong reason to favor one over the other. > remote-tracking branch "baz" from remote "foo/bar", but we might say > that's ok, because (a) multi-level remote names are so rare, and (b) > the simple workaround of explicitly saying > "refs/peers/foo/bar/heads/baz" would always be available in any case. Sounds sensible. And if you limit things that way, "%1" again starts to make sense, as you are representing "the first path component" with it.