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

Re: jn/config-ignore-inaccessible (Re: What's cooking in git.git (Apr 2013, #10; Mon, 29))

From
Thomas Rast <trast@inf.ethz.ch>
Date
May 6, 2013, 09:54 UTC
Message-ID
<8738u0igc0.fsf@linux-k42r.v.cablecom.net>
In-Reply-To
<20130504201414.GA2420@elie.Belkin>
Jonathan Nieder <jrnieder@gmail.com> writes:
Show 28 quoted lines
> Thomas Rast wrote:
>> Junio C Hamano <gitster@pobox.com> writes:
>
>>> * jn/config-ignore-inaccessible (2013-04-15) 1 commit
>>>  - config: allow inaccessible configuration under $HOME
>>>
>>>  When $HOME is misconfigured to point at an unreadable directory, we
>>>  used to complain and die. This loosens the check.
>>>
>>>  I do not think we agreed that this is a good idea, though.
>>
>> As a data point: yesterday on IRC, two users complained that they each
>> had this problem.
>>
>>   http://colabti.org/irclogger/irclogger_log/git?date=2013-05-03#l3022
>>   http://colabti.org/irclogger/irclogger_log/git?date=2013-05-03#l3111
>
> I think the approach taken in the patch above is a good one.  If
> /etc/gitconfig contains important configuration, it is still not
> ignored, errors other than permissions reading ~/.gitconfig are
> still fatal, and permissions errors accessing ~/.gitconfig are no
> longer fatal because they are expected as something very common
> in normal setups.
>
> I haven't been able to convince myself there is a different, better
> behavior to be found.  Special-casing inaccessible $HOME while still
> forbidding inaccessible $HOME/.config/git and $HOME/.gitconfig would
> seem strange.

What I found iffy about all of it is that the current failures happen really late: they prevent the children spawned by the daemon for repo handling from doing any useful work, while the daemon itself chugs along nicely.

Wouldn't it be better to (attempt to) reload configs immediately after switching to the new user/group, and then either warn or exit?

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
Previous: Jeff King
Message 8 of 8 in “What's cooking in git.git (Apr 2013, #10; Mon, 29)”
  1. Junio C HamanoApr 29, 2013
  2. Felipe ContrerasMay 1, 2013
  3. Thomas RastMay 4, 2013
  4. Junio C HamanoMay 4, 2013
  5. jn/config-ignore-inaccessible (Re: What's cooking in git.git (Apr 2013, #10; Mon, 29))Jonathan Nieder, May 4, 2013
  6. Junio C HamanoMay 5, 2013
  7. Jeff KingMay 7, 2013
  8. Thomas RastMay 6, 2013

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.