[BUG] "git checkout -b" erronously thinks a branch already exists

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

 



First of all, sorry if this is the wrong address for bug reporting,
but I couldn't find any `git-bug' mailing list, nor a bug tracker.

Apparently, "git checkout -b NAME" fails if NAME contains the output
from "git-describe".  This happens for me both with git 1.7.2.3
installed from debian packages, and with the latest developement
version of git.

The attached script demonstrate the failures; here is what it outputs
on my system:

 $ sh bug.sh 
 + GIT=git
 + mkdir foo.dir
 + cd foo.dir
 + git init
 Initialized empty Git repository in /tmp/foo.dir/.git/
 + :
 + git add f1
 + git commit -m none
 [master (root-commit) 9b06795] none
  0 files changed, 0 insertions(+), 0 deletions(-)
  create mode 100644 f1
 + git tag -a -m 'first commit' v0
 + :
 + git add f2
 + git commit -m none
 [master ef5d975] none
  0 files changed, 0 insertions(+), 0 deletions(-)
  create mode 100644 f2
 ++ git describe
 + desc=v0-1-gef5d975
 + git checkout -b fix-v0-1-gef5d975
 fatal: git checkout: branch fix-v0-1-gef5d975 already exists

If you need more details, or if you can explain why this is an user error,
please keep me in CC:, as I'm not subscribed to this list.  In case it is
indeed an user error, sorry for the noise.

Regards,
  Stefano

Attachment: bug.sh
Description: application/shellscript


[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]