mirror of
https://github.com/git/git
synced 2024-08-27 19:49:21 +00:00
credential-store.c: replace home_config_paths() with xdg_config_home()
Since only the xdg credentials file path is required, and home_config_paths() is unable to construct the path ~/.git-credentials, simplify the code by replacing home_config_paths() with xdg_config_home(). Signed-off-by: Paul Tan <pyokagan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
2845ce7ff1
commit
64ab71db3a
|
@ -170,7 +170,7 @@ int main(int argc, char **argv)
|
||||||
} else {
|
} else {
|
||||||
if ((file = expand_user_path("~/.git-credentials")))
|
if ((file = expand_user_path("~/.git-credentials")))
|
||||||
string_list_append_nodup(&fns, file);
|
string_list_append_nodup(&fns, file);
|
||||||
home_config_paths(NULL, &file, "credentials");
|
file = xdg_config_home("credentials");
|
||||||
if (file)
|
if (file)
|
||||||
string_list_append_nodup(&fns, file);
|
string_list_append_nodup(&fns, file);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue