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

Re: [PATCH 2/2] config: treat user and xdg config permission problems as errors

From
Jeff King <peff@peff.net>
Date
Oct 14, 2012, 06:22 UTC
Message-ID
<20121014062218.GB13477@sigill.intra.peff.net>
In-Reply-To
<20121014000402.GB11399@elie.Belkin>
On Sat, Oct 13, 2012 at 05:04:02PM -0700, Jonathan Nieder wrote:
Show 6 quoted lines
> Better to error out and ask the user to correct the problem.
> 
> This only affects the user and xdg config files, since the user
> presumably has enough access to fix their permissions.  If the system
> config file is unreadable, the best we can do is to warn about it so
> the user knows to notify someone and get on with work in the meantime.

I'm on the fence about treating the systme config specially. On the one hand, I see the convenience if somebody has a bogus /etc/gitconfig and gets EPERM but can't fix it. On the other hand, if we get EIO, isn't that a good indication that we would want to die?

For example, servers may depend on /etc/gitconfig to enforce security policy (e.g., setting transfer.fsckObjects or receive.deny*). Perhaps our default should be safe, and people can use GIT_CONFIG_NOSYSTEM to work around a broken machine.

-Peff
Previous: Jonathan NiederNext: Jonathan Nieder
Message 4 of 13 in “Re: [PATCH] config: warn on inaccessible files”
  1. 0/2 Re: [PATCH] config: warn on inaccessible filesJonathan Nieder, Oct 14, 2012
  2. 1/2 config, gitignore: failure to access with ENOTDIR is okJonathan Nieder, Oct 14, 2012
  3. 2/2 config: treat user and xdg config permission problems as errorsJonathan Nieder, Oct 14, 2012
  4. Jeff KingOct 14, 2012
  5. Jonathan NiederOct 14, 2012
  6. 3/2 config doc: advertise GIT_CONFIG_NOSYSTEMJonathan Nieder, Oct 14, 2012
  7. 3/2 doc: advertise GIT_CONFIG_NOSYSTEMJonathan Nieder, Oct 14, 2012
  8. 4/2 config: exit on error accessing any config fileJonathan Nieder, Oct 14, 2012
  9. Jeff KingOct 14, 2012
  10. Junio C HamanoOct 14, 2012
  11. Jeff KingOct 14, 2012
  12. Jonathan NiederOct 14, 2012
  13. Jeff KingOct 14, 2012

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.