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

Re: Bug: git config does not respect read-only .gitconfig file

From
Markus Hitter <mah@jump-ing.de>
Date
Nov 8, 2016, 16:49 UTC
Message-ID
<40608c85-f870-87f7-daee-7fa98f5d19c1@jump-ing.de>
In-Reply-To
<CAD9aWChH14eviop=0_Ma_2Pa-2OyWJp9KjimH8dyqy-XDn9Rhw@mail.gmail.com>
Am 08.11.2016 um 16:22 schrieb Jonathan Word:
Show 10 quoted lines
> Proposal:
> 
> Part 1) Add a .gitconfig variable to respect a read-only gitconfig
> file and optional "--force" override option for the `git config`
> command
> 
> Such a gitconfig variable could be defined as:
> config.respectFileMode: [ "never", "allow-override", "always" ]
> [...]
> Thoughts?
I'd consider disrespecting file permissions to be a bug. Only very few tools allow to do so ('rm' is the only other one coming to mind right now), for good reason. If they do, only with additional parameters or by additional user interaction. Git should follow this strategy.
Which means: respect file permissions, no additional config variable and only if there's very substantial reason, add a --force. KISS.
That said, disrespecting permissions requires additional code, so it'd be interesting to know why this code was added. The relevant commit in the git.git repo should tell.
Markus
-- 
- - - - - - - - - - - - - - - - - - -
Dipl. Ing. (FH) Markus Hitter
http://www.jump-ing.de/
Previous: Jonathan WordNext: Jonathan Word
Message 2 of 7 in “Bug: git config does not respect read-only .gitconfig file”
  1. Jonathan WordNov 8, 2016
  2. Markus HitterNov 8, 2016
  3. Jonathan WordNov 8, 2016
  4. Jeff KingNov 8, 2016
  5. Junio C HamanoNov 9, 2016
  6. Jeff KingNov 9, 2016
  7. Jonathan WordNov 9, 2016

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.