Commit Graph

8 Commits

Author SHA1 Message Date
Thomas Haller
172dace30d contrib/scripts: use "main" branch name in "checkpatch-feature-branch.sh" 2021-04-01 22:28:59 +02:00
Thomas Haller
869ff96ad1 contrib/checkpatch: fix shallow repository for checkpatch script
The checkpatch test tests the patches on the merg-request, as they
branch off from master (or one of the stable branches).

It thus need the full git history, but the git repository might be a
shallow clone. Fix it.
2020-11-10 18:23:36 +01:00
Thomas Haller
45cb0ef403 contrib/checkpatch: use random name for git remote and clean up afterwards 2020-11-10 17:14:07 +01:00
Thomas Haller
3019648b4b checkpatch,gitlab-ci: let checkpatch script compare against latest upstream master
When opening a merge request from a fork of NetworkManager, then the
pipeline runs with the a checkout of the fork. That means, checkpatch
would compare the branch against "master" (or "nm-x-y" stable branches)
of the fork, instead of upstream.

That doesn't seem too useful. Instead, also add upstream NetworkManager
as git remote, fetch the branches, and use the branches from there as
base for checkpatch.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/255
2019-10-02 18:46:36 +02:00
Thomas Haller
301d703bc3 checkpatch: quote variable in "checkpatch-feature-branch.sh" 2018-10-22 18:21:41 +02:00
Thomas Haller
924a895a1a checkpatch: support ranges for "checkpatch-feature-branch.sh"
Improve "checkpatch-feature-branch.sh" to support accepting
range as argument.
2018-10-22 14:09:47 +02:00
Thomas Haller
4543785438 checkpatch: fix "checkpatch-feature-branch.sh" for master branch
The main purpose of "checkpatch-feature-branch.sh" is to test all
patches of a feature branch. When we run the script against master
(or nm-1-*), then there is no feature branch.

Previously, the script would just error out.

That is not very useful, in particular as we call this from gitlab-ci,
which also runs on master.

Instead, in that case, test the HEAD.
2018-10-22 13:35:20 +02:00
Thomas Haller
369446eae6 checkpatch: add "contrib/scripts/checkpatch-feature-branch.sh" script
This takes current HEAD branch, and finds all the commits what
are not on master or one of the nm-1-* branches, and runs
checkpatch.pl on each.

The use is to run checkpatch.pl on all patches of a feature
branch.
2018-10-22 13:19:15 +02:00