diff options
author | Lénaïc Huard <lenaic@lhuard.fr> | 2021-09-04 22:54:58 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-09-07 10:57:04 -0700 |
commit | cb7db5bbd56f587a35c1861282c46d424fee0b38 (patch) | |
tree | 74e1279faf234aa87d77f21a8f3a0642783d6b3d /t/t5515/refs.br-remote-glob-merge | |
parent | Git 2.32 (diff) | |
download | tgif-cb7db5bbd56f587a35c1861282c46d424fee0b38.tar.xz |
cache.h: Introduce a generic "xdg_config_home_for(…)" function
Current implementation of `xdg_config_home(filename)` returns
`$XDG_CONFIG_HOME/git/$filename`, with the `git` subdirectory inserted
between the `XDG_CONFIG_HOME` environment variable and the parameter.
This patch introduces a `xdg_config_home_for(subdir, filename)` function
which is more generic. It only concatenates "$XDG_CONFIG_HOME", or
"$HOME/.config" if the former isn’t defined, with the parameters,
without adding `git` in between.
`xdg_config_home(filename)` is now implemented by calling
`xdg_config_home_for("git", filename)` but this new generic function can
be used to compute the configuration directory of other programs.
Signed-off-by: Lénaïc Huard <lenaic@lhuard.fr>
Acked-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5515/refs.br-remote-glob-merge')
0 files changed, 0 insertions, 0 deletions