Johannes Schindelin <Johannes.Schindelin@xxxxxx> writes: > Hi, > > On Mon, 5 Oct 2009, Jeff King wrote: > >> Some devil's advocate questions: >> >> 1. How do we find "origin/next" given "next"? What are the exact >> lookup rules? Do they cover every case? Do they avoid surprising >> the user? > > I am sure your strategy would be the same as mine: enumerate all remote > branches, strip the remote nickname, and compare. If there are > ambiguities, tell the user and stop. > >> 2. What do we do if our lookup is ambiguous (e.g., "origin/next" and >> "foobar/next" both exist)? > > See above. One problem with this approach is that if users get used to the behavior, the command will have great probability to end up in a user's script, then the script will "work" as long as there is no ambiguity, and cease to work afterwards. And for the user of the script, this will sound like "WTF, it was working yesterday and it's broken now". So, the good thing with being strict, even if giving advice in case of failure, is that it teaches the user the reliable way to do. All that said, I'm not sure how serious this is, but we're in a "devil's advocate" session, so I'm still allowed to speak ;-). The other fear I have is to create confusion. Today, it's quite clear that "next" is not the same as "origin/next". With some DWIMery on top of this, a naive user may think they are more or less the same, and then not understand what "git fetch" does and why it's not the same as "git pull". -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- 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