From: Linus Torvalds Date: Thu, 05 Oct 2006 02:55:42 GMT Subject: Re: [PATCH] pack-refs: use lockfile as everybody else does. Message-ID: In-Reply-To: <7v7izhrc2v.fsf@assigned-by-dhcp.cox.net> On Tue, 3 Oct 2006, Junio C Hamano wrote: > > Also I am not sure about the "fsync(fd); fclose(refs_file)" > sequence I did not touch with this patch. Doesn't stdio still > have stuff buffered when you run fsync()? Would adding fflush() > in between help? Yes, there should be a fflush() there before the fsync. Linus