On Tue, 15 Jan 2008, Brandon Casey wrote:
In that same vein, just above your changes in prepare_index() is:
if (!pathspec || !*pathspec) {
fd = hold_locked_index(&index_lock, 1);
refresh_cache(REFRESH_QUIET);
if (write_cache(fd, active_cache, active_nr) ||
close(fd) || commit_locked_index(&index_lock))
die("unable to write new_index file");
commit_style = COMMIT_AS_IS;
return get_index_file();
}
Yeah, I think that may be the one that got you. I obviously couldn't
follow the exact path through the code, I was just looking at the trace of
system calls and found that one thing that looked like it was your case,
but it's entirely possible that it was another path of the index lock file
that causes it.
Your patch seems "ObviouslyCorrect(tm)".
Linus