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.