Re: [RFH] GSoC 2015 application
From: Dennis Kaarsemaker <hidden>
Date: 2016-06-15 23:03:52
On vr, 2015-02-20 at 11:06 +0100, Matthieu Moy wrote:
The ~/.git-credential-cache may be a bit harder, but the case of ~/.git-credentials should follow the same pattern as files for which this is already done. So, doing it by mimicking existing code shouldn't be too hard. But maybe that's me being optimistic ;-)
Having just copied that logic to one of my tools, I reaclly would have fount if useful to have something that, given a config file name tells you where it should be, maybe in the resident kitchen-sink that is rev-parse: $ git rev-parse --config git /home/dennis/.gitconfig $ git rev-parse --config gitk /home/dennis/.gitk $ git rev-parse --config foobar /home/dennis/.foobar Or, when XDG config files are used: $ git rev-parse --config gitk /home/dennis/.config/git/gitk $ git rev-parse --config git /home/dennis/.config/git/config $ git rev-parse --config foobar /home/dennis/.config/git/foobar So, ~/.$filename or $XDG_CONFIG_HOME/git/filename, with a special case only for git itself, with consistent selection of which to use (currently gitk and git are inconsistent). -- Dennis Kaarsemaker http://www.kaarsemaker.net