From: Junio C Hamano Date: Sat, 08 Jul 2006 10:28:09 GMT Subject: Re: [PATCH] Close the index file between writing and committing Message-ID: <7vbqs0qtl2.fsf@assigned-by-dhcp.cox.net> In-Reply-To: Johannes Schindelin 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.