credential-store.c: replace home_config_paths() with xdg_config_home()
authorPaul Tan <pyokagan@gmail.com>
Wed, 6 May 2015 08:01:01 +0000 (16:01 +0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 6 May 2015 18:33:24 +0000 (11:33 -0700)
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>
credential-store.c
index d62dc29d06570f54c35aa9f55ab11e431ab1c0a9..8ebfb97c7ffde917da081e65c316673d40571051 100644 (file)
@@ -170,7 +170,7 @@ int main(int argc, char **argv)
        } else {
                if ((file = expand_user_path("~/.git-credentials")))
                        string_list_append_nodup(&fns, file);
-               home_config_paths(NULL, &file, "credentials");
+               file = xdg_config_home("credentials");
                if (file)
                        string_list_append_nodup(&fns, file);
        }