Hi Junio, On Wed, 28 Feb 2024, Junio C Hamano wrote: > "Johannes Schindelin via GitGitGadget" <gitgitgadget@xxxxxxxxx> > writes: > > > From: Johannes Schindelin <johannes.schindelin@xxxxxx> > > > > When `git fetch --update-shallow` needs to test for commit ancestry, it > > can naturally run into a missing object (e.g. if it is a parent of a > > shallow commit). For the purpose of `--update-shallow`, this needs to be > > treated as if the child commit did not even have that parent, i.e. the > > commit history needs to be clamped. > > > > For all other scenarios, clamping the commit history is actually a bug, > > as it would hide repository corruption (for an analysis regarding > > shallow and partial clones, see the analysis further down). > > > > Add a flag to optionally ask the function to ignore missing commits, as > > `--update-shallow` needs it to, while detecting missing objects as a > > repository corruption error by default. > > > > This flag is needed, and cannot replaced by `is_repository_shallow()` to Hrmpf. I just spotted the missing "be" between "cannot" and "replaced". Junio, would you kindly amend the commit message accordingly? > > indicate that situation, because that function would return 0 in the > > `--update-shallow` scenario: There is not actually a `shallow` file in > > that scenario, as demonstrated e.g. by t5537.10 ("add new shallow root > > with receive.updateshallow on") and t5538.4 ("add new shallow root with > > receive.updateshallow on"). > > Nicely written. > > The description above that has been totally revamped reads much much > clearer, at least to me, compared to the previous round. Thank you! > Should we declare the topic done and mark it for 'next'? After you looked over the correctness of the patches, I would be comfortable with that. Thanks! Johannes