summaryrefslogtreecommitdiff
path: root/setup.c
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2017-01-24 15:56:49 -0800
committerJunio C Hamano <gitster@pobox.com>2017-01-26 11:00:24 -0800
commit40d96325143ae04cb3f645ac96f6413d1f641b9b (patch)
tree7735daaa9b2177d15d4241f43ba76643a5c8718f /setup.c
parent4e59582ff70d299f5a88449891e78d15b4b3fabe (diff)
downloadgit-40d96325143ae04cb3f645ac96f6413d1f641b9b.tar.gz
setup: add gentle version of resolve_git_dir
This follows a93bedada (setup: add gentle version of read_gitfile, 2015-06-09), and assumes the same reasoning. resolve_git_dir is unsuited for speculative calls, so we want to use the gentle version to find out about potential errors. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'setup.c')
-rw-r--r--setup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/setup.c b/setup.c
index 1b534a7508..4605fd3c3c 100644
--- a/setup.c
+++ b/setup.c
@@ -1017,11 +1017,11 @@ const char *setup_git_directory(void)
return setup_git_directory_gently(NULL);
}
-const char *resolve_gitdir(const char *suspect)
+const char *resolve_gitdir_gently(const char *suspect, int *return_error_code)
{
if (is_git_directory(suspect))
return suspect;
- return read_gitfile(suspect);
+ return read_gitfile_gently(suspect, return_error_code);
}
/* if any standard file descriptor is missing open it to /dev/null */