git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Rast <trast@student.ethz.ch>
To: Artur Skawina <art.08.09@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>,
	Daniel Barkalow <barkalow@iabervon.org>
Subject: Re: git failing to create new branches, depending on the name
Date: Sat, 8 Aug 2009 19:04:57 +0200	[thread overview]
Message-ID: <200908081904.58186.trast@student.ethz.ch> (raw)
In-Reply-To: <4A7D9AA7.1030709@gmail.com>

Artur Skawina wrote:
> + git checkout -f -b branch-g90bc1a6 askern/release
> fatal: git checkout: branch branch-g90bc1a6 already exists

This bisects to

commit 352eadc40024b141e1295693654ec20cc123844f
Author: Daniel Barkalow <barkalow@iabervon.org>
Date:   Sun Sep 21 14:36:06 2008 -0400

    Check early that a new branch is new and valid

    If you fail to update refs to change branches in checkout, your index
    and working tree are left already updated. We don't have an easy way
    to undo this, but at least we can check things that would make the
    creation of a new branch fail. These checks were in the shell version,
    and were lost in the C conversion.

    The messages are from the shell version, and should probably be made nicer.

    [jc: added test to t7201]

    Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>


Not sure this is a bug though.  If we allow branch names that are
ambiguous to rev-parse, what do they resolve to?  E.g., in the
presence of only 'master', 'master-g01234567' is defined to be the
same as 01234567.  What is it if you also have a *branch* called
'master-g01234567'?

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

  reply	other threads:[~2009-08-08 17:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-08 15:32 git failing to create new branches, depending on the name Artur Skawina
2009-08-08 17:04 ` Thomas Rast [this message]
2009-08-08 17:33   ` Artur Skawina
2009-08-08 17:35 ` Daniel Barkalow

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=200908081904.58186.trast@student.ethz.ch \
    --to=trast@student.ethz.ch \
    --cc=art.08.09@gmail.com \
    --cc=barkalow@iabervon.org \
    --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).