On Mon, 2011-10-17 at 10:24 -0500, Jonathan Nieder wrote: > Soeren Sonnenburg wrote: > > > to reproduce (as run by a buildbot) do e.g., > > > > mkdir foo && cd foo > > git init > > git fetch -t git://github.com/shogun-toolbox/shogun.git +master > > git reset --hard 72d1bdeb46bf0c63c9d59c940930f2dba1bb6111 > > git branch -M master > > Ah, here's another exception to the "it's usually not obvious what it > would mean to overwrite the current branch by another one" rule. > Namely: > > git branch -M master master > > is clearly meant to be a no-op, even if you are on the master branch. > And in the latter case, it can be abbreviated: > > git branch -M master > > This seems like a valuable exception to allow, because then "git > branch -M foo" would _always_ be allowed --- either 'foo' is not the > current branch, and it does the obvious thing, or 'foo' is the current > branch, and nothing happens.
That makes a lot of sense to me and is probably why the http://buildbot.net/ people are using git branch -M in exactly the way you describe it above. You should forward your suggestion to the git mailinglist if you havent' done already... Soeren -- For the one fact about the future of which we can be certain is that it will be utterly fantastic. -- Arthur C. Clarke, 1962
signature.asc
Description: This is a digitally signed message part