summaryrefslogtreecommitdiff
path: root/setup.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2017-03-13 20:12:18 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-03-14 21:24:16 (GMT)
commit5c4003ca3f0e9ac6d3c8aa3e387ff843bd440411 (patch)
treeda62594d6fb70db7b9550c5f3b0ba2ce6cd71b6d /setup.c
parent751d3b9415fc08c8cc926f55646b735b0237fd4a (diff)
downloadgit-5c4003ca3f0e9ac6d3c8aa3e387ff843bd440411.zip
git-5c4003ca3f0e9ac6d3c8aa3e387ff843bd440411.tar.gz
git-5c4003ca3f0e9ac6d3c8aa3e387ff843bd440411.tar.bz2
setup.c: mention unresolved problems
During the review of the `early-config` patch series, two issues have been identified that have been with us forever. Mark the identified problems for later so that we do not forget them. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'setup.c')
-rw-r--r--setup.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/setup.c b/setup.c
index f26094e..98b8dee 100644
--- a/setup.c
+++ b/setup.c
@@ -531,6 +531,7 @@ const char *read_gitfile_gently(const char *path, int *return_error_code)
ssize_t len;
if (stat(path, &st)) {
+ /* NEEDSWORK: discern between ENOENT vs other errors */
error_code = READ_GITFILE_ERR_STAT_FAILED;
goto cleanup_return;
}
@@ -902,6 +903,7 @@ static enum discovery_result setup_git_directory_gently_1(struct strbuf *dir,
if (!gitdirenv) {
if (die_on_error ||
error_code == READ_GITFILE_ERR_NOT_A_FILE) {
+ /* NEEDSWORK: fail if .git is not file nor dir */
if (is_git_directory(dir->buf))
gitdirenv = DEFAULT_GIT_DIR_ENVIRONMENT;
} else if (error_code != READ_GITFILE_ERR_STAT_FAILED)