Skip to content

Commit 5c4003c

Browse files
dschogitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 751d3b9 commit 5c4003c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

setup.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,7 @@ const char *read_gitfile_gently(const char *path, int *return_error_code)
531531
ssize_t len;
532532

533533
if (stat(path, &st)) {
534+
/* NEEDSWORK: discern between ENOENT vs other errors */
534535
error_code = READ_GITFILE_ERR_STAT_FAILED;
535536
goto cleanup_return;
536537
}
@@ -902,6 +903,7 @@ static enum discovery_result setup_git_directory_gently_1(struct strbuf *dir,
902903
if (!gitdirenv) {
903904
if (die_on_error ||
904905
error_code == READ_GITFILE_ERR_NOT_A_FILE) {
906+
/* NEEDSWORK: fail if .git is not file nor dir */
905907
if (is_git_directory(dir->buf))
906908
gitdirenv = DEFAULT_GIT_DIR_ENVIRONMENT;
907909
} else if (error_code != READ_GITFILE_ERR_STAT_FAILED)

0 commit comments

Comments
 (0)