Commit 2d08ead9 by Edward Thomson

attr: use home directory for `~` includes

Users can specify an attribute file to be included in the home
directory using `~/filename` syntax. Instead of looking in the
global configuration location (which may be overridden), use the
user's _actual_ home directory. This allows callers to change the
global configuration location separately from the home directory.
parent 523d8b64
......@@ -300,7 +300,7 @@ static int attr_cache__lookup_path(
/* expand leading ~/ as needed */
if (cfgval && cfgval[0] == '~' && cfgval[1] == '/') {
if (! (error = git_sysdir_expand_global_file(&buf, &cfgval[2])))
if (! (error = git_sysdir_expand_homedir_file(&buf, &cfgval[2])))
*out = git_str_detach(&buf);
} else if (cfgval) {
*out = git__strdup(cfgval);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment