Message ID | 7ecfae7d6f63d235e6efe85b1b1d7c8f3fc08c29.1688044991.git.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 866b43e6442f16d0073ae9ce8d79b6cb1161b1a9 |
Headers | show |
Series | commit -a -m: allow the top-level tree to become empty again | expand |
diff --git a/read-cache.c b/read-cache.c index f4c31a68c85..b10caa9831c 100644 --- a/read-cache.c +++ b/read-cache.c @@ -2285,6 +2285,7 @@ int do_read_index(struct index_state *istate, const char *path, int must_exist) if (fd < 0) { if (!must_exist && errno == ENOENT) { set_new_index_sparsity(istate); + istate->initialized = 1; return 0; } die_errno(_("%s: index file open failed"), path);