On 2019-01-20 at 19:19 René Scharfe <l.s.r@xxxxxx> wrote: > Am 17.01.2019 um 21:29 schrieb Barret Rhoden: > > The blame_entry will get passed up the tree until we find a commit that > > has a diff chunk that affects those lines. If an ignored commit added > > more lines than it removed, the blame will fall on a commit that made a > > change nearby. There is no general solution here, just a best-effort > > approach. For a trivial example, consider ignoring this commit: > > > > Z: "Adding Lines" > > foo > > +No commit > > +ever touched > > +these lines > > bar > > Wouldn't it make more sense to assign such lines to unknown, perhaps > represented by an all-zero commit ID, instead of blaming a semi-random > bystander? I don't know if we can algorithmicly determine whether or not an assignment was the commit the user wanted. Maybe we could add a set of heuristics, like "any diff hunk that only added", as in my example. Maybe if count_a == 0 in blame_chunk_cb, that would work for that case; I'm not too familiar with that code. Either way, in my next commit I provide the option to mark the commit with a '*', which could serve the same purpose as the all-zero commit ID: flag the commit so the user knows it might not be correct. Barret