From 4aad2f1627bb74948874c0f31e8ce256bf236aa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Wed, 5 Apr 2017 17:24:38 +0700 Subject: path.c: and an option to call real_path() in expand_user_path() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In the next patch we need the ability to expand '~' to real_path($HOME). But we can't do that from outside because '~' is part of a pattern, not a true path. Add an option to expand_user_path() to do so. Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- credential-store.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'credential-store.c') diff --git a/credential-store.c b/credential-store.c index 55ca1b1334..ac295420dd 100644 --- a/credential-store.c +++ b/credential-store.c @@ -168,7 +168,7 @@ int cmd_main(int argc, const char **argv) if (file) { string_list_append(&fns, file); } else { - if ((file = expand_user_path("~/.git-credentials"))) + if ((file = expand_user_path("~/.git-credentials", 0))) string_list_append_nodup(&fns, file); file = xdg_config_home("credentials"); if (file) -- cgit v1.2.3