summaryrefslogtreecommitdiff
path: root/t/t4034/fortran/post
diff options
context:
space:
mode:
authorLibravatar Johannes Sixt <j6t@kdbg.org>2011-03-16 09:18:49 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-03-17 14:54:11 -0700
commit3ba2e8653c88d220b0b22f35260477bb0afa7d7b (patch)
tree3a4b5420ae9e41af1f6d0e20e93bd83d225da3e1 /t/t4034/fortran/post
parentstash: fix incorrect quoting in cleanup of temporary files (diff)
downloadtgif-3ba2e8653c88d220b0b22f35260477bb0afa7d7b.tar.xz
stash: copy the index using --index-output instead of cp -p
'git stash create' must operate with a temporary index. For this purpose, it used 'cp -p' to create a copy. -p is needed to preserve the timestamp of the index file. Now Jakob Pfender reported a certain combination of a Linux NFS client, OpenBSD NFS server, and cp implementation where this operation failed. Luckily, the first operation in git-stash after copying the index is to call 'git read-tree'. Therefore, use --index-output instead of 'cp -p' to write the copy of the index. --index-output requires that the specified file is on the same volume as the source index, so that the lock file can be rename()d. For this reason, the name of the temporary index is constructed in a way different from the other temporary files. The code path of 'stash -p' also needs a temporary index, but we do not use the new name because it does not depend on the same precondition as --index-output. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4034/fortran/post')
0 files changed, 0 insertions, 0 deletions