From: Michael Haggerty <mhagger@alum.mit.edu>
To: Dennis Kaarsemaker <dennis@kaarsemaker.net>,
Jonathan Nieder <jrnieder@gmail.com>
Cc: Keith Derrick <keith.derrick@lge.com>,
"git@vger.kernel.org" <git@vger.kernel.org>,
"simon.busch@lge.com" <simon.busch@lge.com>
Subject: Re: BUG or FEATURE? Use of '/' in branch names
Date: Sun, 04 May 2014 07:39:48 +0200 [thread overview]
Message-ID: <5365D2A4.9010702@alum.mit.edu> (raw)
In-Reply-To: <1399102525.2716.1.camel@spirit>
On 05/03/2014 09:35 AM, Dennis Kaarsemaker wrote:
> On vr, 2014-05-02 at 15:16 -0700, Jonathan Nieder wrote:
>>> $ git checkout -b hotfix/b2
>>> error: unable to resolve reference refs/heads/hotfix/b2: Not a
>> directory
>>> fatal: Failed to lock ref for update: Not a directory
>>> $
>>
>> That's an ugly message. I think we can do better. (hint hint)
>
> 2.0.0-rc2 has a better message already:
>
> $ git checkout -b hotfix/b2
> error: 'refs/heads/hotfix' exists; cannot create 'refs/heads/hotfix/b2'
> fatal: Failed to lock ref for update: Not a directory
I was trying to remember when this was changed, but at first I couldn't
reproduce the "fixed" error message at all. Finally I figured out that
the the error message that you get depends on whether the existing
reference is loose:
$ bin-wrappers/git checkout -b master/foo
error: unable to resolve reference refs/heads/master/foo: Not a
directory
fatal: Failed to lock ref for update: Not a directory
vs. packed:
$ bin-wrappers/git checkout -b base/foo
error: 'refs/heads/base' exists; cannot create 'refs/heads/base/foo'
fatal: Failed to lock ref for update: Not a directory
It would be good to make the error message uniform and to document this
restriction.
Michael
--
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/
prev parent reply other threads:[~2014-05-04 5:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5363D1B4.1000503@lge.com>
2014-05-02 22:04 ` BUG or FEATURE? Use of '/' in branch names Keith Derrick
2014-05-02 22:10 ` Felipe Contreras
2014-05-02 22:16 ` Junio C Hamano
2014-05-02 22:16 ` Jonathan Nieder
2014-05-02 22:36 ` Keith Derrick
2014-05-02 22:43 ` Jonathan Nieder
2014-05-03 7:35 ` Dennis Kaarsemaker
2014-05-04 5:39 ` Michael Haggerty [this message]
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=5365D2A4.9010702@alum.mit.edu \
--to=mhagger@alum.mit.edu \
--cc=dennis@kaarsemaker.net \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
--cc=keith.derrick@lge.com \
--cc=simon.busch@lge.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.