From: Junio C Hamano Date: Tue, 07 May 2013 01:48:37 GMT Subject: Re: [PATCH 6/7] refname_match(): Caller must declare if we're matching local or remote refs Message-ID: <7vsj1zo8zu.fsf@alter.siamese.dyndns.org> In-Reply-To: <1367711749-8812-7-git-send-email-johan@herland.net> Johan Herland writes: > refname_match() is used to check whether a given shorthand name matches a > given full refname, but that full refname does not always belong in the > local repo, rather it is sometimes taken from list of refs sent over from > a remote repo. That "local vs remote" is a wrong way to think about things. All refs you can feed to resolve_ref() and dwim_ref() are local, and "remotes" is not all that special. It is just a convention to store many different kind of things per different hierarchy, and the only special hierarchy we have is refs/heads/* that can be updated by making new commits through the index and the working tree.