From: Johan Herland Date: Sat, 28 Mar 2009 10:48:41 GMT Subject: Re: [PATCH 1/2] Move chmod(foo, 0444) into move_temp_to_file() Message-ID: <200903281148.41982.johan@herland.net> In-Reply-To: <7vskky18ds.fsf@gitster.siamese.dyndns.org> On Saturday 28 March 2009, Junio C Hamano wrote: > Johan Herland writes: > > When writing out a loose object or a pack (index), move_temp_to_file() > > is called to finalize the resulting file. These files (loose files and > > packs) should all have permission mode 0444 (modulo > > adjust_shared_perm()). Therefore, instead of doing chmod(foo, 0444) > > explicitly from each callsite (or even forgetting to chmod() at all), > > do the chmod() call from within move_temp_to_file(). > > I think you would need this on top. Agreed. Thanks, ..Johan -- Johan Herland, www.herland.net