* git-stash fails on OSX 10.5
@ 2009-04-10 16:44 Jacob Kaplan-Moss
2009-04-10 17:26 ` Junio C Hamano
0 siblings, 1 reply; 5+ messages in thread
From: Jacob Kaplan-Moss @ 2009-04-10 16:44 UTC (permalink / raw)
To: git
Hi folks --
I'm stumped; git-stash simply won't work on my machine. On any
repository I've tried, with various permutations, I keep getting::
$ git stash
cp: `.../.git/index': No such file or directory
Cannot save the current worktree state
I spent about an hour in #git this morning trying to track it down
(log: http://colabti.org/irclogger/irclogger_log/git?date=2009-04-10#l1946).
I've tried stashing with and without content added to the index; I've
also tried entirely removing .git/index and then recreating it via git
reset. No dice.
I'm entirely willing to entertain the possibility that this is my
fault, but I am fairly familiar with git (been using it for about a
year) and so if it is fault it's gotta be something pretty subtle.
I'm concerned by the fact that it doesn't work on *any* repository on
my machine, though. I think that points to a systematic problem.
I'm on OS X 10.5.6; Git is 1.6.2.2, built and installed from source,
though the same problem happened with the old 1.6.0 I had yesterday,
and also the 1.6.2.1 I installed via the OSX package.
Thanks!
Jacob
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: git-stash fails on OSX 10.5
2009-04-10 16:44 git-stash fails on OSX 10.5 Jacob Kaplan-Moss
@ 2009-04-10 17:26 ` Junio C Hamano
2009-04-10 18:14 ` Jacob Kaplan-Moss
0 siblings, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2009-04-10 17:26 UTC (permalink / raw)
To: Jacob Kaplan-Moss; +Cc: git
Jacob Kaplan-Moss <jacob@jacobian.org> writes:
> Hi folks --
>
> I'm stumped; git-stash simply won't work on my machine. On any
> repository I've tried, with various permutations, I keep getting::
>
> $ git stash
> cp: `.../.git/index': No such file or directory
> Cannot save the current worktree state
Are you exporting
GIT_INDEX_FILE=.../.git/index
into the environment, and that path perhaps does not exist?
Otherwise the above error message wouldn't have said ".../.git/index"; it
is coming from the only invocation of "cp" command in git-stash.sh
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: git-stash fails on OSX 10.5
2009-04-10 17:26 ` Junio C Hamano
@ 2009-04-10 18:14 ` Jacob Kaplan-Moss
2009-04-13 17:57 ` Jay Soffian
0 siblings, 1 reply; 5+ messages in thread
From: Jacob Kaplan-Moss @ 2009-04-10 18:14 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
On Fri, Apr 10, 2009 at 12:26 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Otherwise the above error message wouldn't have said ".../.git/index"; it
> is coming from the only invocation of "cp" command in git-stash.sh
Sorry; I trimmed the error message to omit the details of where the
repository is since this happens regardless of the repo. The error
gives the full path to the file, i.e. "cp:
`/Users/jacob/Projects/uri/.git/index': No such file or directory".
Jacob
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: git-stash fails on OSX 10.5
2009-04-10 18:14 ` Jacob Kaplan-Moss
@ 2009-04-13 17:57 ` Jay Soffian
2009-04-13 18:13 ` Jacob Kaplan-Moss
0 siblings, 1 reply; 5+ messages in thread
From: Jay Soffian @ 2009-04-13 17:57 UTC (permalink / raw)
To: Jacob Kaplan-Moss; +Cc: Junio C Hamano, git
On Fri, Apr 10, 2009 at 2:14 PM, Jacob Kaplan-Moss <jacob@jacobian.org> wrote:
> Sorry; I trimmed the error message to omit the details of where the
> repository is since this happens regardless of the repo. The error
> gives the full path to the file, i.e. "cp:
> `/Users/jacob/Projects/uri/.git/index': No such file or directory".
1) Does "ls -l /Users/jacob/Projects/uri/.git/index" work?
2) Does "cp -v /Users/jacob/Projects/uri/.git/index /tmp/" work?
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?
j.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: git-stash fails on OSX 10.5
2009-04-13 17:57 ` Jay Soffian
@ 2009-04-13 18:13 ` Jacob Kaplan-Moss
0 siblings, 0 replies; 5+ messages in thread
From: Jacob Kaplan-Moss @ 2009-04-13 18:13 UTC (permalink / raw)
To: Jay Soffian; +Cc: Junio C Hamano, git
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-04-13 18:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-10 16:44 git-stash fails on OSX 10.5 Jacob Kaplan-Moss
2009-04-10 17:26 ` Junio C Hamano
2009-04-10 18:14 ` Jacob Kaplan-Moss
2009-04-13 17:57 ` Jay Soffian
2009-04-13 18:13 ` Jacob Kaplan-Moss
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).