On Mon, Feb 07, 2011 at 03:51:55PM -0500, Nicolas Pitre wrote: > > Will it > > also apply to refs/heads/foo versus refs/remotes/*/tags/foo? In the > > final case, that does matter to "git push" (should the destination be in > > the head or tag namespace?). > > In such a case I'd say that head refs have precedence over tag refs, and > when that occurs then warn the user. And I wouldn't make a special > case for 'git push' here. Whether it is push or log, the head ref would > take precedence, and the user warned about existence of a tag with the > same name. Of course using "tag/foo" should be unambigous again. I am fine with that, although it is the opposite of the current dwim_ref behavior (which warns on ambiguity but prefers tags). However, Junio has said that the current behavior was simply arbitrary. > > So the actual names of the ref can matter, > > and should probably be taken into account when deciding what is > > ambiguous. > > What happens today when you have refs/heads/foo and refs/tags/foo? For dwim_ref, it prefers the tag and issues a warning. For git-push, it complains about the ambiguity and dies. For git checkout, we prefer the head. For git-tag, we prefer the tag (though I think that only matters for "git tag -d"). -Peff -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html