summaryrefslogtreecommitdiff
path: root/credential-store.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2017-04-05 10:24:38 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-04-15 06:51:38 (GMT)
commit4aad2f1627bb74948874c0f31e8ce256bf236aa6 (patch)
treede6b04a3b94f2d709971e878375168120e4fa359 /credential-store.c
parent3efd0bedc6625a6b194c1f6e5f1b7aa7d8b7e6bb (diff)
downloadgit-4aad2f1627bb74948874c0f31e8ce256bf236aa6.zip
git-4aad2f1627bb74948874c0f31e8ce256bf236aa6.tar.gz
git-4aad2f1627bb74948874c0f31e8ce256bf236aa6.tar.bz2
path.c: and an option to call real_path() in expand_user_path()
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 <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'credential-store.c')
-rw-r--r--credential-store.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/credential-store.c b/credential-store.c
index 55ca1b1..ac29542 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)