git stash running on crossplatform ntfs folder

2

1

I've put my working dir on an ntfs drive so as to be able to work from both windows and ubuntu linux. I've put this one under git. When I try to run "git stash" from ubuntu, I've got the following error:

cp: preserving times for `$MYGITWORKDIR/.git/.git-stash.6306-index': Operation not permitted Cannot save the current worktree state

When I tried the same thing from windows using msysgit, no such problem occurred.

My guess is it's "cp" on ntfs folder. Is there any way to patch this problem or is it a known issue?

antreality

Posted 2010-10-10T07:50:26.823

Reputation: 121

git stash is just using cp -p. I guess the ntfs driver that you are using does not support utimes(2). This causes cp -p to issue an error, which causes git stash to abort. – Chris Johnsen – 2010-10-10T12:46:48.240

Yeah i think so too. On googling, some people do suggest to patch "cp" itself. But I felt it a little extreme. – antreality – 2010-10-12T15:16:12.060

Answers

1

Add the following option to ntfs-device under /etc/fstab:

uid=USERID

USERID is 1000 for me, but you can get yours with the shell command id.

anonymous

Posted 2010-10-10T07:50:26.823

Reputation: 11