From: Linus Torvalds Date: Tue, 03 May 2005 23:22:46 GMT Subject: Re: Careful object writing.. Message-ID: In-Reply-To: <81b0412b05050316045fa31c2a@mail.gmail.com> On Wed, 4 May 2005, Alex Riesen wrote: > > On 5/3/05, Linus Torvalds wrote: > > I also change the permission to 0444 before it gets its final name. > > Maybe umask it first? Just in case. I considered it, but it's not worth it. If you don't want somebody else to see your objects, you should just disable execute permission on your .git directory. "umask" is actually a fairly nasty interface, since it takes effect on create(), and we do want to fchmod _after_ the create (some filesystems don't like it when you create a non-writable object and then write to it, but more importantly, since we use "mkstemp()" for the temp-file handling, we don't even have control of the initial umask. So to make it (0444 & umask) git would actually have to jump through silly hoops. Without actually buying you anything new, since the access permissions for git objects really are about the _directory_ anyway. Linus