Re: git-stash fails on OSX 10.5
- From
Jacob Kaplan-Moss <jacob@jacobian.org>
- Date
- Apr 13, 2009, 18:13 UTC
- Message-ID
- <be4ebbe10904131113q5b221fe9kf7e0a0fe3bb7fdc6@mail.gmail.com>
- In-Reply-To
- <76718490904131057k2801a62bn14825b055b345dfe@mail.gmail.com>
Hey Jay --
Thanks for the questions; they helped me figure out a bit more:
On Mon, Apr 13, 2009 at 12:57 PM, Jay Soffian <jaysoffian@gmail.com> wrote:
> 3) Anything unusual for OS X? e.g., Are you using FileVault? Are you > using a filesystem other than case-insensitive HFS+? Is your cp > command something other than /bin/cp?
The filesystem is case-*sensitive* HFS+:
$ diskutil info disk0s2 ... File System: Case-sensitive Journaled HFS+
... and cp is GNU cp, not Apple's:
$ which cp /usr/local/bin/cp
Looks like if I use Apple's cp then stash works again:
$ mv /usr/local/bin/cp /usr/local/bin/cp~ $ which cp /bin/cp $ git stash Saved working directory and index state "WIP on master: 504b9bd Updated README."HEAD is now at 504b9bd Updated README. (To restore them type "git stash apply")
So clearly there's some interaction between git-stash, case-sensitivity, and GNU cp. Given that GNU cp works correctly when I do it by hand (i.e. "cp -v /Users/jacob/Projects/uri/.git/index /tmp/" works), I suspect that git-stash is getting the case wrong somewhere and Apple's cp is automatically correcting for that error.
That's my theory, anyway; my bash-fu isn't that good, so I've not been able to figure out a way to patch git-stash to work around the problem. I've got a strange setup, I guess, so I understand if this is a "just don't do that" kind of situation.
Thanks!
Jacob