Thread (4 messages) flat view 4 messages, 3 authors, 2016-11-08

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

From: Markus Hitter <hidden>
Date: 2016-11-08 16:49:53

Am 08.11.2016 um 16:22 schrieb Jonathan Word:
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/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help