Hi Junio, On Tue, 17 Jul 2018, Junio C Hamano wrote: > Jeff King <peff@xxxxxxxx> writes: > > > I'm OK with having a partial fix, or one that fixes immediate pain > > without doing a big cleanup, as long as it doesn't make anything _worse_ > > in a user-visible way. And that's really my question: is pruning here > > going to bite people unexpectedly (not rhetorical -- I really don't > > know)? > > Yeah, that matches the general guideline I follow when reviewing a > patch that claims to make existing things better. And I do not > think I can explain to a third person why pruning here is a good > idea and won't cause problems, after seeing these patches and > the discussion from the sideline. It is very easy to explain: `git repack` can drop unreachable commits without further warning, making the corresponding entries in `.git/shallow` invalid, which causes serious problems when deepening the branches. The solution is easy: drop also the now-invalid entries in `.git/shallow` after dropping unreachable commits unceremoniously. While I am sympathetic to Peff's attempt to make this a bit more general, I think he overthinks it, and we do not even need to complexify the code for now. Ciao, Dscho