Fix generating the diff of two branches
Until now the algorithm was looking at the main branch and the feature
branch and for each step in both branches checking if there was a shared
commit.
Otherwise it would keep the list of the commits seen.
The first time it finds a shared commit, it stops.
Then we clear from the list of diff commits all the ones found in master.
Except that we may end up in a situation where we have in the diff list
a number of commits that are already in master but after the first one
shared.
Say:
a - b - c - d - e - f - g
\ h
The diff list would be [h, b, a ...] since it will take some iteration
to reach the b commit on both branches.
With this commit, instead of removing all the commits that are in master
it iterates through the list of diff commits and only keep the commit
that are present before the first shared commit.