Commit graph

9 commits

Author SHA1 Message Date
Laurent Pinchart
40d9947781 utils: hooks: pre-push: Check push to integration/* branches
Branches named integration/* are candidates for merge in the master
branch. Subject them to the same checks in the pre-push git hook.

An important difference between integration branches and the master
branch is that the former are typically created as new branches. We
can't check the whole history as there are known bad commits, so we have
to identify the base commit for the integration branch. The best
approximation is to use the remote master branch for the tree being
pushed to.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-10-19 13:14:54 +03:00
Laurent Pinchart
4757ff4ab7 utils: hooks: pre-push: Reject commits with a Change-Id
We're not using gerrit, so let's prevent Change-Id tags creeping in
unadvertently.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-11-02 01:03:31 +02:00
Laurent Pinchart
ef4bc8d101 utils: hooks: pre-push: Accept Acked-by in addition to Reviewed-by
Allow pushing commits that have no Reviewed-by tag but have at least one
Acked-by tag.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-10-02 15:30:14 +03:00
Laurent Pinchart
49856afa01 utils: hooks: pre-push: Catch commits without reviews
Improve the pre-push git hook script to reject commits without at least
one Reviewed-by line.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-04-30 00:43:09 +03:00
Laurent Pinchart
fcfbec801b utils: hooks: pre-push: Catch commits without committer's SoB
Improve the pre-push git hook script to reject commits without the
committer's Signed-off-by line.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-04-30 00:43:09 +03:00
Laurent Pinchart
606623dcb8 licenses: Add SPDX headers to the git commit hook scripts
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-04-15 19:51:56 +03:00
Laurent Pinchart
36ad4eb188 utils: hooks: Add pre-push commit hook
Add a pre-push commit hooks to prevent unintentional push of patches
containing local changelogs to the master branch.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-04-15 01:07:42 +03:00
Nicolas Dufresne
3628fb704b checkstyle: Add a pre-commit hook script
This adds support for pre-commit hook workflow. In pre-commit hook we
check the style on the changes currently staged or the combination
of the index and the last commit if "git commit --amend" is being used.

Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-01-18 22:41:00 +02:00
Kieran Bingham
3f82f50227 utils: hooks: Provide post-commit hook example to checkstyle.py
Provide an example post-commit hook which a developer can install, ensuring
that every commit gets the style checker executed on it.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2019-01-30 10:57:37 +00:00