aboutsummaryrefslogtreecommitdiff
path: root/submodule.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2026-03-16 10:48:14 -0700
committerJunio C Hamano <gitster@pobox.com>2026-03-16 10:48:14 -0700
commitc563b12ce7aa6bf8130385c80c001b2340026ff5 (patch)
tree23d546954cdc15b74f625a5243c26ee3616eb76d /submodule.c
parentd4b2a7908de36697d56e79eecc50d1d92a091041 (diff)
parent1dd27bfbfdc0f3b2071ecb8b505476f4caa56a13 (diff)
downloadgit-c563b12ce7aa6bf8130385c80c001b2340026ff5.tar.xz
Merge branch 'ty/setup-error-tightening'
While discovering a ".git" directory, the code treats any stat() failure as a sign that a filesystem entity .git does not exist there, and ignores ".git" that is not a "gitdir" file or a directory. The code has been tightened to notice and report filesystem corruption better. * ty/setup-error-tightening: setup: improve error diagnosis for invalid .git files
Diffstat (limited to 'submodule.c')
-rw-r--r--submodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/submodule.c b/submodule.c
index 4f9aaa2c75..cd879a5cfe 100644
--- a/submodule.c
+++ b/submodule.c
@@ -2559,7 +2559,7 @@ void absorb_git_dir_into_superproject(const char *path,
const struct submodule *sub;
struct strbuf sub_gitdir = STRBUF_INIT;
- if (err_code == READ_GITFILE_ERR_STAT_FAILED) {
+ if (err_code == READ_GITFILE_ERR_MISSING) {
/* unpopulated as expected */
strbuf_release(&gitdir);
return;