git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Jay Soffian
Message 5 of 5 in “git-stash fails on OSX 10.5”
  1. Jacob Kaplan-MossApr 10, 2009
  2. Junio C HamanoApr 10, 2009
  3. Jacob Kaplan-MossApr 10, 2009
  4. Jay SoffianApr 13, 2009
  5. Jacob Kaplan-MossApr 13, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.