Re: [RFH] GSoC 2015 application
- From
Dennis Kaarsemaker <dennis@kaarsemaker.net>
- Date
- Feb 20, 2015, 10:22 UTC
- Message-ID
- <1424427763.30155.28.camel@kaarsemaker.net>
- In-Reply-To
- <vpqwq3cdhhe.fsf@anie.imag.fr>
On vr, 2015-02-20 at 11:06 +0100, Matthieu Moy wrote:
Show 7 quoted lines
> 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