On Fri, Feb 13, 2009 at 09:59:06PM -0500, Jay Soffian wrote: > What should we show in the output of "git remote show origin" next to > the HEAD line? master, or frotz? If we show master, then user might > wonder why "git remote set-head origin --auto" leaves > refs/remotes/origin/HEAD set to frotz. If we show frotz, then user > might wonder why when they cloned the repo in the first place they > ended up with HEAD set to master. > > I'm bothered by that inconsistency, which is why I didn't follow-up > with another patch immediately. Hrm. Yeah, I think to avoid surprising the user, "--auto" has to use whatever we showed in "git remote show". > But I will propose an alternative. In the output of "get remote show > origin", we show all matching branches. If the user does a set-head > --auto and we cannot determine HEAD unambiguously, we do something > like: > > $ git remote set-head origin --auto > error: Multiple branches match HEAD. Please choose one explicitly with: > git remote set-head origin master > git remote set-head origin frotz I like that proposal. It doesn't hide from the user that we are doing a matching guess, which means we are less likely to surprise them in the long run. -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