[RFC] Possibility to have a per-user config directory

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

 




Huynh Khoi Nguyen NGUYEN <nguyenhu@xxxxxxxxxxxxxxx> writes:
Hello,

As you know, git stores its configuration in ~/.gitconfig file and in other >hidden files at the root of the user's directory.

We would like to have a configuration directory instead of all these >configuration files by following the XDG specification because:
- not a lot of hidden files at the root, so better view
- one directory per software in ~/.config

I update my suggestion.

As I said, I would like to propose to users the possibility to have an XDG configuration file, that's to say $XDG_CONFIG_HOME/git/config. If $XDG_CONFIG_HOME is either not set or empty, $HOME/.config/git/config will be used.

So now I will put forward 2 patches: one for reading, and one for writing.

Patch for reading:
Git would read both in $XDG_CONFIG_HOME/git/config and in ~/.gitconfig in this order:
.git/config > ~/.gitconfig > $XDG_CONFIG_HOME/git/config > /etc/gitconfig

Patch for writing:
Git would write its configuration in $XDG_CONFIG_HOME/git/config file if:
- this file exists,
- and ~/.gitconfig file doesn't.
Otherwise git would write its configuration in ~/.gitconfig as usual.

If you don't create $XDG_CONFIG_HOME/git/config, there is no change.
I don't want to force users to have $XDG_CONFIG_HOME/git/config.
I will write in documentation advice for users who often come back to an old version of Git, on different computers with the same $HOME, not to use $XDG_CONFIG_HOME/git/config for the time being. If they don't read documentation, they can't know possibility of $XDG_CONFIG_HOME/git/config.

I will send you the patch for reading before 24h.
Then I will try to send you the patch for writing before 24h.

We will also send other patches to propose to users the possiblity to have easily $XDG_CONFIG_HOME/git/gitignore and $XDG_CONFIG_HOME/git/gitattributes.

Valentin DUPERRAY,
Franck JONAS
Lucien KONG,
Thomas NGUY,
Huynh Khoi Nguyen NGUYEN,

Grenoble INP ENSIMAG

--
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]