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

[PATCH 0/2] Don't make $GIT_DIR executable

From
Michael Haggerty <mhagger@alum.mit.edu>
Date
Nov 15, 2014, 07:26 UTC
Message-ID
<1416036379-4994-1-git-send-email-mhagger@alum.mit.edu>

Starting with v2.1.0, "git init" creates $GIT_DIR/config with its u+x bit set. These two patches are "belt and suspenders"--either one would fix the bug, but IMO it makes sense to apply both of them. Plus, the second patch will help repair repositories that were created while this bug was in the wild.

I think these patches should go into "maint". They apply cleanly there. When merging forward to master, there are two conflicts in config.c which can be resolved by

    s/lock->filename/lock->filename.buf/
in two places.
Michael Haggerty (2):
  create_default_files(): don't set u+x bit on $GIT_DIR/config
  config: clear the executable bits (if any) on $GIT_DIR/config
 builtin/init-db.c |  1 +
 config.c          | 12 ++++++++++--
 2 files changed, 11 insertions(+), 2 deletions(-)
-- 
2.1.1
Next: Michael Haggerty
Message 1 of 13 in “Don't make $GIT_DIR executable”
  1. 0/2 Don't make $GIT_DIR executableMichael Haggerty, Nov 15, 2014
  2. 1/2 create_default_files(): don't set u+x bit on $GIT_DIR/configMichael Haggerty, Nov 15, 2014
  3. Torsten BögershausenNov 15, 2014
  4. Michael HaggertyNov 16, 2014
  5. 2/2 config: clear the executable bits (if any) on $GIT_DIR/configMichael Haggerty, Nov 15, 2014
  6. Stefan BellerNov 15, 2014
  7. Michael HaggertyNov 15, 2014
  8. Junio C HamanoNov 16, 2014
  9. Michael HaggertyNov 17, 2014
  10. Junio C HamanoNov 17, 2014
  11. Michael HaggertyNov 17, 2014
  12. Eric WongNov 15, 2014
  13. Michael HaggertyNov 16, 2014

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.