From: Johannes Sixt Date: Wed, 30 Jun 2010 15:40:36 GMT Subject: Re: [RFC PATCH] rerere: fix overeager gc Message-ID: <4C2B6574.1060902@viscovery.net> In-Reply-To: <7v7hlg8s0e.fsf@alter.siamese.dyndns.org> Am 6/30/2010 17:22, schrieb Junio C Hamano: > Johannes Sixt writes: >> Am 6/29/2010 19:59, schrieb Junio C Hamano: >>> One possibility is to look at the timestamp of the directory itself >>> instead. Then we can safely gc otherwise-unused "thisimage" file when >>> rerere is not in use. I wonder if directory m_time timestamps are usable >>> for this purpose on non-POSIX platforms? >> >> I don't think that will work at all: We only use fopen() to write >> thisimage, which only truncates the file, but doesn't modify mtime of the >> directory. Nor do we create any other (temporary) directory entries that >> would modify the mtime. > > Ah, I see; I don't mind a patch that fixes the creation of thisimage to > follow the "create into temporary and then commit by renaming" pattern. > > Would that solve this issue? I think so. On Windows, the directory's mtime is updated. -- Hannes