This isn't really correct. These lines don't belong to commit. We don't know where they came from until *after* the next iteration of build() can execute and we can accurately blame them on revision, or they need to carry earlier.

I would build these Line objects with no commit at all at this stage. If no commit is set, it means we don't yet know the origin of the Line. Later during mergeLines() we assign the commit to a Line if the Line appears in the B range (assuming you invert the diff like I suggest below).