bug: git branch -d and case-insensitive file-systems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]