Subject: [RFD] git stash over OpenBSD/Linux NFS - cp -p breakage

From: Jakob Pfender <[email-masked]>
Date: Tue, 15 Mar 2011 11:08:36 +0100

We have an NFS setup with Linux machines mounting an NFS that is hosted 
on an OpenBSD server. Recently, we discovered git-stash breaking with:

$ git stash
cp: preserving permissions for 
`/home/jpfender/stashtest/.git/.git-stash.3056-index': Operation not 
supported
Cannot save the current worktree state

This was discovered to be caused by a bug in cp that causes 'cp -p' to 
fail in this particular NFS setup - preserving permissions in an NFS 
shared across Linux and OpenBSD machines doesn't work.

I looked at git-stash.sh and could not discover a reason why it had to 
use 'cp -p'. I patched it to use only cp without preserving permissions, 
and everything seemed to work fine. All stash tests succeeded (bar two 
known breakages).

So my question is: Does git-stash really need 'cp -p'? Is it safe to remove?