git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 22, 2015, 18:44 UTC
Message-ID
<xmqqr3thwzur.fsf@gitster.dls.corp.google.com>
In-Reply-To
<1424540917.15539.24.camel@scientia.net>
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.
Previous: Christoph Anton MittererNext: Dennis Kaarsemaker
Message 2 of 5 in “[cosmetic bug?] needlessly(?) executable files”
  1. Christoph Anton MittererFeb 21, 2015
  2. Junio C HamanoFeb 22, 2015
  3. Dennis KaarsemakerFeb 23, 2015
  4. Christoph Anton MittererFeb 23, 2015
  5. Junio C HamanoFeb 23, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.