summaryrefslogtreecommitdiff
path: root/credential-cache.c
diff options
context:
space:
mode:
authorLibravatar Nguyễn Thái Ngọc Duy <pclouds@gmail.com>2017-04-05 17:24:38 +0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-04-14 23:51:38 -0700
commit4aad2f1627bb74948874c0f31e8ce256bf236aa6 (patch)
treede6b04a3b94f2d709971e878375168120e4fa359 /credential-cache.c
parentconfig: add conditional include (diff)
downloadtgif-4aad2f1627bb74948874c0f31e8ce256bf236aa6.tar.xz
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-cache.c')
-rw-r--r--credential-cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/credential-cache.c b/credential-cache.c
index cc8a6ee192..774d1469fb 100644
--- a/credential-cache.c
+++ b/credential-cache.c
@@ -106,7 +106,7 @@ int cmd_main(int argc, const char **argv)
op = argv[0];
if (!socket_path)
- socket_path = expand_user_path("~/.git-credential-cache/socket");
+ socket_path = expand_user_path("~/.git-credential-cache/socket", 0);
if (!socket_path)
die("unable to find a suitable socket path; use --socket");