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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Luis,

On Fri, Mar 6, 2015 at 7:41 AM, Luis Ressel <aranea@xxxxxxxx> 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].

[1] http://article.gmane.org/gmane.comp.version-control.git/264666
[2] http://article.gmane.org/gmane.comp.version-control.git/264669

> A user that wants to use
> ~/.config/git/credentials instead has to manually create that file
> first, which he just shouldn't do if he has to stay compatible to
> previous git versions.

Yes, I totally agree. I wonder if the current behavior to read the home
config file in addition to the xdg config file is actually
useful to the end-user. (However, that behavior has been in git since 2012, so
for consistency purposes it may not be desirable to make credential-store act
differently from git-config.)

What I do believe, however, is that there *should* be a way for
credential-store to lookup, erase and (maybe) store credentials to multiple
files. This opens the door for git to be fully xdg base dir spec compliant
by supporing both $XDG_CONFIG_HOME and $XDG_CONFIG_DIRS.
I quote from the spec[3]:

    The order of base directories denotes their importance; the first directory
    listed is the most important. When the same information is defined in
    multiple places the information defined relative to the more important base
    directory takes precedent. The base directory defined by $XDG_DATA_HOME is
    considered more important than any of the base directories defined by
    $XDG_DATA_DIRS. The base directory defined by $XDG_CONFIG_HOME is
    considered more important than any of the base directories defined by
    $XDG_CONFIG_DIRS.

[3] http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

Reading from multiple credential stores could be useful, for example, if the
system administrator wanted to setup credentials for all users on the system.

Thus, if we are implementing the machinery for the XDG dir spec, it would make
sense to just add the home git-credentials file to the search path as well.

Regards,
Paul
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]