On Tue, Mar 15, 2011 at 20:28, Junio C Hamano <gitster@xxxxxxxxx> wrote: > Johannes Sixt <j.sixt@xxxxxxxxxxxxx> writes: > >> 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. > > Thanks, will apply. Please note that the file to the --index-output option needs to be on the same filesystem as GIT_INDEX_FILE, so that it can be renamed. Here is the corresponding manual page paragraph for this: --index-output=<file> Instead of writing the results out to $GIT_INDEX_FILE, write the resulting index in the named file. While the command is operating, the original index file is locked with the same mechanism as usual. The file must allow to be rename(2)ed into from a temporary file that is created next to the usual index file; typically this means it needs to be on the same filesystem as the index file itself, and you need write permission to the directories the index file and index output file are located in. I don' have the full context, so I can't judge whether $TMP-index is guaranteed to be on the same filesystem as ${GIT_INDEX_FILE-"$GIT_DIR/index"}. Bert -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html