Patch Set 4: I would prefer that you didn't submit this

(1 inline comment)

When I have a folder containing just two locally added files the change is marked as incoming.

You should simplify the code calulating the commits, see inline comments.