From: Junio C Hamano Date: Mon, 28 Nov 2011 19:38:57 GMT Subject: Re: git branch -M" regression in 1.7.7? Message-ID: <7vk46kuje6.fsf@alter.siamese.dyndns.org> In-Reply-To: <20111126023002.GA17652@elie.hsd1.il.comcast.net> Jonathan Nieder writes: > 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. > > Buildbot uses this idiom and was broken in 1.7.7 (it would emit the > message "Cannot force update the current branch"). Although I am not sure the practice deserves to be called "idiom", I agree that there is no reason to forbid renaming the current branch to the tip commit of itself. Will queue.