make sure to compare against the latest target branch version
When applying the code style, we should make sure that we compare against the latest target branch version. Checking out the source branch gave an error if this branch existed in multiple remote repositories. It is obsolete anyway since we reset the working copy to the FETCH_HEAD later.
Fixes ACTS-252.