git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* bug: git branch -d and case-insensitive file-systems
@ 2015-08-24 16:11 Aaron Dufour
  2015-08-25  5:21 ` Jeff King
  0 siblings, 1 reply; 3+ messages in thread
From: Aaron Dufour @ 2015-08-24 16:11 UTC (permalink / raw)
  To: git

I use git (2.2.1) on OS X (10.9.5) and recently my repo got into a bad
state.  I think this involves a mis-handling of case-insensitive file
systems.

This reproduces the problem:

    > git init
    Initialized empty Git repository in /Users/aarond_local/code/git-test/.git/
    > git commit --allow-empty -m 'first commit'
    [master (root-commit) 923d8b8] first commit
    > git checkout -b feature
    Switched to a new branch 'feature'
    > git checkout -b Feature
    fatal: A branch named 'Feature' already exists.
    > git checkout -B Feature
    Switched to and reset branch 'Feature'
    > git branch -d feature
    Deleted branch feature (was 923d8b8).
    > git log
    fatal: bad default revision 'HEAD'

This is the behavior when there isn't a case mismatch, which is what I
would have expected in the previous case as well:

    > git init
    Initialized empty Git repository in /Users/aarond_local/code/git-test/.git/
    > git commit --allow-empty -m 'first commit'
    [master (root-commit) 48df19f] first commit
    > git checkout -b feature
    Switched to a new branch 'feature'
    > git branch -d feature
    error: Cannot delete the branch 'feature' which you are currently on.

I can also reproduce the issue on git 2.5.0.

-Aaron Dufour

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-08-25 15:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-24 16:11 bug: git branch -d and case-insensitive file-systems Aaron Dufour
2015-08-25  5:21 ` Jeff King
     [not found]   ` <CAJrRhQw-+kbQLexPwa0A6ih-LH9DgbyoTD0DiWWhQeXrOvkYbA@mail.gmail.com>
2015-08-25 15:42     ` Fwd: " Aaron Dufour

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).