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

Re: [GSoC microproject] Add XDG support to the credential-store helper

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Mar 6, 2015, 17:28 UTC
Message-ID
<vpqa8zq9grq.fsf@anie.imag.fr>
In-Reply-To
<CACRoPnR3i3pTyqcxm0iELP0uR9cL2kvm9fd7BQPVpbLB0UBNVw@mail.gmail.com>
Paul Tan <pyokagan@gmail.com> writes:
Show 16 quoted lines
> Hi Luis,
>
> On Fri, Mar 6, 2015 at 7:41 AM, Luis Ressel <aranea@aixah.de> wrote:
>> Okay, I've had a look at Paul's patch for this. Sorry again for the
>> dupe, I must've missed it before. I guess I'll attempt another
>> microproject.
>>
>> However, I feel like my patch is really all that's neccessary; I don't
>> think we should try to use both files if they exist -- I consider
>> Paul's approach to be a bit overcomplicated.
>>
>> My patch still uses ~/.git-credentials as a default location, which
>> should be sufficient for compability.
>
> Indeed, that was my initial plan for implementation as well[1]. Matthieu,
> however, wanted the behavior to follow that of git-config[2].

The fact that I suggested doing it this way does not mean it _has_ to be done this way. Decisions are taken by trying to reach a consensus with discussion, so everyone is welcome to argue.

I don't remember all the discussions we had about the ~/.gitconfig, but one issue with considering only one file is if you create ~/.git/config/foo and initially make sure you don't have ~/.gitfoo, and then one tool creates ~/.gitfoo (either an old Git, or another tool trying to edit the config file), then you totally break your configuration.

I argued for not taking backward compatibility too much into account in another thread, but that was about precedence of one file over the other which is far less important. Here, any tool creating even an empty home file would break your configuration.

That also breaks the least surprise principle if you have a ~/.gitfoo file that you forgot about: edit ~/.config/git/foo, nothing is taken into account, at all (or the other way around, depending on the precedence you choose). I remember loosing some time with two vlc configuration files like this.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Paul TanNext: Paul Tan
Message 8 of 9 in “[GSoC microproject] Add XDG support to the credential-store helper”
  1. Luis ResselMar 5, 2015
  2. Add XDG support to the credential-store helperLuis Ressel, Mar 5, 2015
  3. Junio C HamanoMar 5, 2015
  4. Christian CouderMar 5, 2015
  5. Luis ResselMar 5, 2015
  6. Luis ResselMar 5, 2015
  7. Paul TanMar 6, 2015
  8. Matthieu MoyMar 6, 2015
  9. Paul TanMar 6, 2015

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.