git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: git@vger.kernel.org
Subject: [BUG] "git checkout -b" erronously thinks a branch already exists
Date: Sun, 5 Jun 2011 13:05:13 +0200	[thread overview]
Message-ID: <201106051305.13723.stefano.lattarini@gmail.com> (raw)

[-- Attachment #1: Type: Text/Plain, Size: 1238 bytes --]

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 #2: bug.sh --]
[-- Type: application/x-shellscript, Size: 233 bytes --]

             reply	other threads:[~2011-06-05 11:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-05 11:05 Stefano Lattarini [this message]
2011-06-06  1:38 ` Re* [BUG] "git checkout -b" erronously thinks a branch already exists Junio C Hamano
2011-06-06  5:27   ` Junio C Hamano
2011-06-06  8:26     ` Stefano Lattarini
2011-06-06 16:05     ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201106051305.13723.stefano.lattarini@gmail.com \
    --to=stefano.lattarini@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).