Git

Some remarks and explanations how PyCodeQual works with Git.

Merge base

When showing the diff between two branches in most cases it does not make sense to show the diff between the respective heads, because in the general case the branches will have diverged (ie. there are new commits on both branches after the branch point).

There are two strategies that are used to show a diff between two branches. Let’s use master and feature-branch here.

  1. show the diff between the head of feature-branch and the last commit it has in common with master (this is called merge base))

  2. simulate the merge and show the diff between the latest commit on master and the simulated merge commit

PyCodeQual follows strategy 1. For reference, Github uses strategy 1 while Bitbucket uses strategy 2.