Re: git-commit fatal: Out of memory? mmap failed: Bad file descriptor
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Jan 15, 2008, 20:09 UTC
- Message-ID
- <alpine.LFD.1.00.0801151207150.2806@woody.linux-foundation.org>
- In-Reply-To
- <478D0CDA.5050709@nrlssc.navy.mil>
On Tue, 15 Jan 2008, Brandon Casey wrote:
Show 12 quoted lines
>
> 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