summaryrefslogtreecommitdiff
path: root/Documentation/git-rev-list.txt
diff options
context:
space:
mode:
authorJohannes Sixt <j6t@kdbg.org>2011-03-16 08:18:49 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-03-17 21:54:11 (GMT)
commit3ba2e8653c88d220b0b22f35260477bb0afa7d7b (patch)
tree3a4b5420ae9e41af1f6d0e20e93bd83d225da3e1 /Documentation/git-rev-list.txt
parent23a32ffe803237b64651cbd104585d04b8fe33d6 (diff)
downloadgit-3ba2e8653c88d220b0b22f35260477bb0afa7d7b.zip
git-3ba2e8653c88d220b0b22f35260477bb0afa7d7b.tar.gz
git-3ba2e8653c88d220b0b22f35260477bb0afa7d7b.tar.bz2
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 'Documentation/git-rev-list.txt')
0 files changed, 0 insertions, 0 deletions