summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2017-12-08 10:28:48 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2017-12-12 14:51:30 +0100
commitf86bbc4b51ad59efdfb4f57fd03200b02f056de3 (patch)
tree21598ab40a31bfe8eb64e4f5a37ff98650c8482c
parentd20ff861612c021815c756967ab01c0c356ce38e (diff)
dim: basic checks for pull requests too
dim push doesn't check everyone's patches (since most subsystems don't have strict review requirements). But when we take a pull request we really want to make sure people follow due process. Motivated by the recent gvt pull, which lacked a commiter sob. Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
-rwxr-xr-xdim14
1 files changed, 11 insertions, 3 deletions
diff --git a/dim b/dim
index 8b8621d157b2..2c58536df31e 100755
--- a/dim
+++ b/dim
@@ -696,9 +696,12 @@ function dim_rebuild_tip
# additional patch checks before pushing, e.g. for r-b tags
function checkpatch_commit_push
{
- local sha1
+ local sha1 non_dim
sha1=$1
+ managed_branch=${2:-1}
+
+ echo checking $sha1, managed $managed_branch
# use real names for people with many different email addresses
author=$(git show -s $sha1 --format="format:%an")
@@ -717,7 +720,7 @@ function checkpatch_commit_push
fi
# check for Link tag
- if ! git show -s $sha1 | grep -qi 'Link:' ; then
+ if [[ "$managed_branch" = "1" ]] && ! git show -s $sha1 | grep -qi 'Link:' ; then
warn_or_fail "$sha1 is lacking of link tag"
fi
@@ -864,7 +867,12 @@ function dim_apply_pull
echo $pull_branch
- git pull $pull_branch
+ git fetch $pull_branch
+ for sha1 in $(git rev-list "HEAD..FETCH_HEAD" --no-merges) ; do
+ checkpatch_commit_push $sha1 0
+ done
+
+ $DRY git pull $pull_branch
message_id=$(message_get_id $file)