Re: "Branch exists" error while trying to rename a non-existing branch to an existing one

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kaartic Sivaraam <kaarticsivaraam91196@xxxxxxxxx> writes:

> I recently got the following error message by change as a result of the
> command,
>
>     $ git branch -m no-branch master
>     fatal: A branch named 'master' already exists.
>
> Note: no-branch is an hypothetical branch that doesn't exist.
>
> Shouldn't I get a 'no-branch' doesn't exist before that?

This is borderline "meh" at least to me.  An argument against a
hypothetical version of Git that "fixes" your issue would be that no
matter what the source of renaming is, as long as 'master' exists,
"branch -m" shouldn't overwrite it, and it is a good thing to remind
the user that 'master' exists and the user meant to rename it to
something else.

Of course you can make the error message three-way, but I do not
think it is worth it.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux