Sync with changes from GTK:
- Set a git config to work around security
improvements in recent git.
- Only fetch the two branches we want to compare
for the style check.
- Use the existing git merge-base command to find
their common ancestor.
It’s a more inclusive name, has the same tab-completion prefix, and is
the default choice for new repositories created locally by git, and on
GitHub and GitLab.
https://sfconservancy.org/news/2020/jun/23/gitbranchname/
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Fixes: #2348
and so checkout only the HEAD of the branch.
This leads to not being able to find an ancestor since there is only one
new commit. I presume that when it worked, it was because of specific
settings of some users.
Now we fetch (with the same depth as the target branch) the source branch
and use it to compare sha1 and find the common ancestor.
Closes#2292
Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>