git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [cosmetic bug?] needlessly(?) executable files
@ 2015-02-21 17:48 Christoph Anton Mitterer
  2015-02-22 18:44 ` Junio C Hamano
  0 siblings, 1 reply; 5+ messages in thread
From: Christoph Anton Mitterer @ 2015-02-21 17:48 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 349 bytes --]

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.

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5313 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [cosmetic bug?] needlessly(?) executable files
  2015-02-21 17:48 [cosmetic bug?] needlessly(?) executable files Christoph Anton Mitterer
@ 2015-02-22 18:44 ` Junio C Hamano
  2015-02-23  8:21   ` Dennis Kaarsemaker
  0 siblings, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2015-02-22 18:44 UTC (permalink / raw)
  To: Christoph Anton Mitterer; +Cc: git

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.

> 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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [cosmetic bug?] needlessly(?) executable files
  2015-02-22 18:44 ` Junio C Hamano
@ 2015-02-23  8:21   ` Dennis Kaarsemaker
  2015-02-23 13:08     ` Christoph Anton Mitterer
  2015-02-23 18:55     ` Junio C Hamano
  0 siblings, 2 replies; 5+ messages in thread
From: Dennis Kaarsemaker @ 2015-02-23  8:21 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Christoph Anton Mitterer, git

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).

-- 
Dennis Kaarsemaker
http://www.kaarsemaker.net

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [cosmetic bug?] needlessly(?) executable files
  2015-02-23  8:21   ` Dennis Kaarsemaker
@ 2015-02-23 13:08     ` Christoph Anton Mitterer
  2015-02-23 18:55     ` Junio C Hamano
  1 sibling, 0 replies; 5+ messages in thread
From: Christoph Anton Mitterer @ 2015-02-23 13:08 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 234 bytes --]

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.

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5313 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [cosmetic bug?] needlessly(?) executable files
  2015-02-23  8:21   ` Dennis Kaarsemaker
  2015-02-23 13:08     ` Christoph Anton Mitterer
@ 2015-02-23 18:55     ` Junio C Hamano
  1 sibling, 0 replies; 5+ messages in thread
From: Junio C Hamano @ 2015-02-23 18:55 UTC (permalink / raw)
  To: Dennis Kaarsemaker; +Cc: Christoph Anton Mitterer, git

Dennis Kaarsemaker <dennis@kaarsemaker.net> writes:

> 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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-02-23 18:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-21 17:48 [cosmetic bug?] needlessly(?) executable files Christoph Anton Mitterer
2015-02-22 18:44 ` Junio C Hamano
2015-02-23  8:21   ` Dennis Kaarsemaker
2015-02-23 13:08     ` Christoph Anton Mitterer
2015-02-23 18:55     ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).