Patrick Steinhardt reports that Git stopped reloading alternates when an object cannot be found. The behavior broke with 5946a564cd (odb/source: make read_object_info() function pluggable, 2026-03-05). He calls it an uncommon scenario, but says alternates were rewritten under running processes in production systems often enough to hit it.
The second patch alone restores the functionality. Steinhardt was unhappy with the cost: looking up 20k missing objects went from 180ms to 309ms. The last two patches address that performance regression.
Christian Couder reviewed the series. He noted that the cover letter still carried sentences from the earlier version, such as "only the second commit is really needed" and "the last two patches". He also wanted a behavior change mentioned in the commit message, and he said a removed NEEDSWORK comment should be explained, since its points about mount points and a wrong core.ignoreCase might still matter.
Couder also asked whether avoiding a syscall means the "object directory %s does not exist" error is no longer printed. Steinhardt answered that the error still appears when someone tries to add an alternate that does not exist. If an alternate disappears after it was already added, the message is no longer printed. He considers that niche and said he would add the message back in.
Steinhardt said that concurrent in-place updates are inherently broken, since a process may see any in-between state. He said Couder's proposed variant is subtly wrong because it does not clear the stat cache when open(3p) itself fails, and that he will adapt it for the next version.