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-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'credential-cache.c') diff --git a/credential-cache.c b/credential-cache.c index cc8a6ee19..774d1469f 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"); -- cgit v1.2.1