threads / bug / 38621

[cosmetic bug?] needlessly(?) executable files

Subject: [cosmetic bug?] needlessly(?) executable files

## tl;dr

5 messages between Feb 21, 2015 and Feb 23, 2015.

replies: 4people: 3as markdown or json

Christoph Anton Mitterer· Feb 21, 2015, 17:48 UTC · lore
Hey.

Just a question about files like: .git/config .git/hooks/*.sample

Is there any reason that these are created executable? Especially the config file? I know the hooks are already disabled by being named .sample, but having them executable just increases the chance that one accidentally fires them up manually.

Cheers, Chris.

Junio C Hamano· Feb 22, 2015, 18:44 UTC · re: Christoph Anton Mitterer · lore

Re: [cosmetic bug?] needlessly(?) executable files

Christoph Anton Mitterer <calestyo@scientia.net> writes:
Show 6 quoted lines
> Just a question about files like:
> .git/config
> .git/hooks/*.sample
>
> Is there any reason that these are created executable? Especially the
> config file?
In a new repository I just did "git init", I see this:
    $ rm -fr stupid
    $ umask 0027
    $ git init stupid
    $ ls -l stupid/.git/config | sed -e 's/ .*//'
    -rw-r-----
So no, config is not created executable.
> I know the hooks are already disabled by being named .sample,
I think that is deliberate, so that lazy people can just do:
    $ mv .git/hooks/pre-commit.sample .git/hooks/pre-commit
without one more command
    $ chmod +x .git/hooks/pre-commit
after doing so.
Dennis Kaarsemaker· Feb 23, 2015, 08:21 UTC · re: Junio C Hamano · lore

Re: [cosmetic bug?] needlessly(?) executable files

On zo, 2015-02-22 at 10:44 -0800, Junio C Hamano wrote:
Show 19 quoted lines
> Christoph Anton Mitterer <calestyo@scientia.net> writes:
> 
> > Just a question about files like:
> > .git/config
> > .git/hooks/*.sample
> >
> > Is there any reason that these are created executable? Especially
> the
> > config file?
> 
> In a new repository I just did "git init", I see this:
> 
>     $ rm -fr stupid
>     $ umask 0027
>     $ git init stupid
>     $ ls -l stupid/.git/config | sed -e 's/ .*//'
>     -rw-r-----
> 
> So no, config is not created executable.

It used to be for a brief period in history, between daa22c6f8d (2.1.0) and 1f32ecf (2.2.2).

-- 
Dennis Kaarsemaker
http://www.kaarsemaker.net
Christoph Anton Mitterer· Feb 23, 2015, 13:08 UTC · re: Dennis Kaarsemaker · lore

Re: [cosmetic bug?] needlessly(?) executable files

On Mon, 2015-02-23 at 09:21 +0100, Dennis Kaarsemaker wrote: 
> It used to be for a brief period in history, between daa22c6f8d (2.1.0)
> and 1f32ecf (2.2.2).
Ah thanks,... I have 2.1.4 which explains this :)

Cheers, Chris.

Junio C Hamano· Feb 23, 2015, 18:55 UTC · re: Dennis Kaarsemaker · lore

Re: [cosmetic bug?] needlessly(?) executable files

Dennis Kaarsemaker <dennis@kaarsemaker.net> writes:
Show 23 quoted lines
> On zo, 2015-02-22 at 10:44 -0800, Junio C Hamano wrote:
>> Christoph Anton Mitterer <calestyo@scientia.net> writes:
>> 
>> > Just a question about files like:
>> > .git/config
>> > .git/hooks/*.sample
>> >
>> > Is there any reason that these are created executable? Especially
>> the
>> > config file?
>> 
>> In a new repository I just did "git init", I see this:
>> 
>>     $ rm -fr stupid
>>     $ umask 0027
>>     $ git init stupid
>>     $ ls -l stupid/.git/config | sed -e 's/ .*//'
>>     -rw-r-----
>> 
>> So no, config is not created executable.
>
> It used to be for a brief period in history, between daa22c6f8d (2.1.0)
> and 1f32ecf (2.2.2).
Ahh, yes, I think we fixed that bug not too long ago.
Thanks for reminding me.

← back to recent threads