git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Christoph Anton Mitterer <calestyo@scientia.net>
Cc: git@vger.kernel.org
Subject: Re: [cosmetic bug?] needlessly(?) executable files
Date: Sun, 22 Feb 2015 10:44:12 -0800	[thread overview]
Message-ID: <xmqqr3thwzur.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1424540917.15539.24.camel@scientia.net> (Christoph Anton Mitterer's message of "Sat, 21 Feb 2015 18:48:37 +0100")

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.

  reply	other threads:[~2015-02-22 18:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-21 17:48 [cosmetic bug?] needlessly(?) executable files Christoph Anton Mitterer
2015-02-22 18:44 ` Junio C Hamano [this message]
2015-02-23  8:21   ` Dennis Kaarsemaker
2015-02-23 13:08     ` Christoph Anton Mitterer
2015-02-23 18:55     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqr3thwzur.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=calestyo@scientia.net \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).