git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Close the index file between writing and committing

From
Junio C Hamano <junkio@cox.net>
Date
Jul 8, 2006, 10:28 UTC
Message-ID
<7vbqs0qtl2.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.63.0607081055520.29667@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 	Alternatively, write_cache() could be taught to close the file
> 	itself, but maybe there will be a user of write_cache() who wants
> 	to write something after the cache data?

Currently I suspect nobody would want to append stuff to the index file, because anybody who wants to add something to the cache can do so with the index extension mechanism.

However, it is conceivable that later we might invent a new program that writes the index file and other things to a single stream, and closing the fd in write_cache() would inconvenience such a program.

Previous: Johannes Schindelin
Message 2 of 2 in “Close the index file between writing and committing”
  1. Close the index file between writing and committingJohannes Schindelin, Jul 8, 2006
  2. Junio C HamanoJul 8, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.