From: Jeff King <peff@peff.net>
To: Marcus Kida <marcus.kida@gmail.com>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>, git@vger.kernel.org
Subject: Re: Bug: git branch -D can be used to delete branch which is currently checked out - Part 2
Date: Thu, 10 Mar 2016 17:41:58 -0500 [thread overview]
Message-ID: <20160310224158.GA2772@sigill.intra.peff.net> (raw)
In-Reply-To: <9EFA8642-FA02-4ADB-B37B-530E611C9C1F@gmail.com>
On Fri, Mar 11, 2016 at 05:30:00AM +1100, Marcus Kida wrote:
> thank you for the feedback.
> I will fix this, test it and send a patch.
Unfortunately, I think this issue is a little more complicated.
There's some prior discussion in
http://thread.gmane.org/gmane.comp.version-control.git/284022
and
http://thread.gmane.org/gmane.comp.version-control.git/276456/focus=276506
The latter, in particular, shows a case where this approach will do the
wrong thing. The fundamental issue is that refs are potentially stored
in _two_ places: the filesystem, and the packed-refs file. And the
latter is always case-sensitive, while the former sometimes is and
sometimes isn't. But because the storage all happens behind the scenes,
the user has no way of reliably disambiguating (e.g., does "foo" refer
to your checked-out "FOO", or are you intentionally trying to delete an
extraneous "FOO" that ended up in the packed-refs file?).
-Peff
next prev parent reply other threads:[~2016-03-10 22:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-10 8:39 Bug: git branch -D can be used to delete branch which is currently checked out - Part 2 Marcus Kida
2016-03-10 12:15 ` Johannes Schindelin
2016-03-10 18:30 ` Marcus Kida
2016-03-10 22:41 ` Jeff King [this message]
2016-03-10 22:43 ` Marcus Kida
2016-03-10 21:20 ` Marcus Kida
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=20160310224158.GA2772@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=marcus.kida@gmail.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 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).