On 10/9/2020 11:59 AM, Junio C Hamano wrote: > * ds/commit-graph-merging-fix (2020-10-08) 1 commit > - commit-graph: ignore duplicates when merging layers > > When "git commit-graph" detects the same commit recorded more than > once while it is merging the layers, it used to die. The code now > ignores all but one of them and continues. > > Shouldn't it make sure all copies match, or discard all of them, to > avoid random corruptions kept in the repository? Making sure each copy matches is a bigger change than I would be comfortable with in the rc window. If you intend for this to at least be in a better state than before, then the current fix is safer than doing that harder work. If we had a clear repro that was testable, then I might have a different opinion. (I see that Thomas updated the thread with a possible repro, I will get back to him soon.) As for discarding them all: we would need to add code to "reparse" a commit from the object database. Perhaps that is doable, but we have so far not removed data from a parsed 'struct commit'. This is probably the easiest way forward to guarantee correct data here. Again, let's find a way to test this before committing. Thanks, -Stolee