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>

Johannes Schindelin committed Mar 13, 2017 at 21:12 UTC 5c4003ca3f0e9ac6d3c8aa3e387ff843bd440411
1 file changed +2
setup.c
+2
@@ -531,6 +531,7 @@ const char *read_gitfile_gently(const char *path, int *return_error_code)
531 ssize_t len;
532
533 if (stat(path, &st)) {
534 + /* NEEDSWORK: discern between ENOENT vs other errors */
535 error_code = READ_GITFILE_ERR_STAT_FAILED;
536 goto cleanup_return;
537 }
@@ -902,6 +903,7 @@ static enum discovery_result setup_git_directory_gently_1(struct strbuf *dir,
903 if (!gitdirenv) {
904 if (die_on_error ||
905 error_code == READ_GITFILE_ERR_NOT_A_FILE) {
906 + /* NEEDSWORK: fail if .git is not file nor dir */
907 if (is_git_directory(dir->buf))
908 gitdirenv = DEFAULT_GIT_DIR_ENVIRONMENT;
909 } else if (error_code != READ_GITFILE_ERR_STAT_FAILED)