diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2017-12-08 10:28:48 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2017-12-12 14:51:30 +0100 |
commit | f86bbc4b51ad59efdfb4f57fd03200b02f056de3 (patch) | |
tree | 21598ab40a31bfe8eb64e4f5a37ff98650c8482c | |
parent | d20ff861612c021815c756967ab01c0c356ce38e (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-x | dim | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -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) |