From patchwork Wed Jul 26 12:07:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 108756 Delivered-To: patch@linaro.org Received: by 10.182.45.195 with SMTP id p3csp741324obm; Wed, 26 Jul 2017 05:08:48 -0700 (PDT) X-Received: by 10.98.131.131 with SMTP id h125mr619950pfe.271.1501070928280; Wed, 26 Jul 2017 05:08:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501070928; cv=none; d=google.com; s=arc-20160816; b=yxVqbx4/MPLR5YzlnL0y5k2LIJ+tDssj2YRVp1XPg7ISQiDwGio8R3/iXlKqTmy64g svlrSH5nbl63yfOj2ZKGjOhe9owH7taiDMvhCK27SXEpadY9lV+VGcr21nrYOooww4qi s6QBrrDk764VWfCu7Xx4tx2v8g5Tys4c5zN0ApPqJ9p/9yKjMS+C9fkME5tBWjk/Hhlw SgdAhZzrlvaWO06bnTOBO+2oPK/8MVYLjWimkj2y8KQ+iFVERRZOHQivn6NqfGQkIoXg SH9mHhiuDpV5qYfVGu5BYvoHxEWpZALSlGkW2Z2SoloC4qOOWeWPcsI6kp4c5d1Jv5lW nMYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:message-id:date:subject:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=n+lCVv0kC941vlAi7RIHKIMg/5BwL0U81gaO8NczqjA=; b=MEXOA4M3auBWia9L5izSNn4Qxxc8myYl1nYDk9rr6qyQPl0tDSUlwk1VGaUuJ78WtY I/9VmKBl6EXxIxEhy5DEP7vvaUPkug4Zf3warLkL0g5Mx50P9AUpLyENnw2gPOSrmb9B 790NGGh7BkoKIaQxMdfuhgn3Mt/hvvFvYmlkU3XzqYpU5LVeU8pNU5ATBvPBFq7UeUtc pNgsp9C2lhxmxGRcTLsxwuDkxB786QS/Cc1R4WptMoCnWknVLZW3lc/jAO4KAJsoHQlY +GoaoHVVdrKB32tZC79yWOYiypByf60aGNtPA2OI50eXo3UM4c7rd8+BZH30DFU4YrRl mM2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=eB/mCTYi; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id n34si2567811pld.993.2017.07.26.05.08.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Jul 2017 05:08:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=eB/mCTYi; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EEA9A6E72E; Wed, 26 Jul 2017 12:08:46 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com [IPv6:2a00:1450:400c:c09::22b]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5258D6E72E for ; Wed, 26 Jul 2017 12:08:46 +0000 (UTC) Received: by mail-wm0-x22b.google.com with SMTP id t138so901243wmt.1 for ; Wed, 26 Jul 2017 05:08:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=WF7d3bW0win1cTTevxv9yWoSmtCJcmmCbkMdxp0PNq0=; b=eB/mCTYib/eDwJ/NHBNqquDRNKhCCvGgJnuw0kghaFMvQYE8hJkHjlKcYg8JATrzqp u6DVx9qyv56P8Ino4qQeMJf9ic16ddECP2Lzj9KziE+yqx1hoC3ucwgSUjv2c05UJgB7 f6m2ERJZDOJX5KM5Dr3kmJOe64ssyeSweanN0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=WF7d3bW0win1cTTevxv9yWoSmtCJcmmCbkMdxp0PNq0=; b=Xh1p1GQBhFhvboFTDE9ZoSU95Z76/Hn0IJLa4Oz20gx4QksYy1GhYFSE+AxdmwX/NU T1a8s0/svDm8r1pIS51OzjkYDFIpKSrtJ+rtQv5KHXmter6+LpU2i0IRtlhpty7N5/Uh XA7JAEDqh9I2LTBYy44nHJe9KNw1NgdMM38p9tFcTFj0goQ8r6AvXieY9BdXP3uE9cXr WZGCgkXuRT5tMLK95IdTFY17bqWwc6pBkzWzAWBa0dIZwImOwF/oGXIIZUcWVUdTreQe NoBub3D6gvg5Im41N8zuQRKohaNgBAN50hw1UEW/ZtW760mMaE3dzP7V6vTTv4qEqZNa nl0Q== X-Gm-Message-State: AIVw111f6hpQkb6wQ28wbFDo/qd2UtmNQS+hmw0WeQyVCBAJXI4e9oLw w8rxjbEHWiNnr7VXK0DxFw== X-Received: by 10.28.35.140 with SMTP id j134mr601487wmj.94.1501070924582; Wed, 26 Jul 2017 05:08:44 -0700 (PDT) Received: from lmenx321.lme.st.com. ([80.214.77.47]) by smtp.gmail.com with ESMTPSA id o76sm13508852wmg.43.2017.07.26.05.08.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 26 Jul 2017 05:08:44 -0700 (PDT) From: Benjamin Gaignard To: dri-devel@lists.freedesktop.org, daniel.vetter@ffwll.ch, seanpaul@chromium.org Subject: [PATCH v2] dim: add checks for author and committer sign-off-by Date: Wed, 26 Jul 2017 14:07:49 +0200 Message-Id: <1501070869-26411-1-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.9.1 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add checks for author and committer sign-off-by. Add a check for "Link" tag added by dim apply-branch. Use real names for people with many different email addresses. Signed-off-by: Benjamin Gaignard --- version 2: - keep the same logic than before for reviewed/acked-by checks - use real names dim | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/dim b/dim index 786fe6b..c0cbe35 100755 --- a/dim +++ b/dim @@ -662,13 +662,32 @@ function checkpatch_commit_push sha1=$1 + # use real names for people with many different email addresses + author=$(git show -s $sha1 --format="format:%an") + committer=$(git show -s $sha1 --format="format:%cn") + + # check for author sign-off + if ! git show -s $sha1 | grep -qi "S.*-by:.*$author" ; then + warn_or_fail "$sha1 is lacking author of sign-off" + fi + + # check for committer sign-off + if ! git show -s $sha1 | grep -qi "S.*-by:.*$committer" ; then + warn_or_fail "$sha1 is lacking committer of sign-off" + fi + + # check for Link tag + if ! git show -s $sha1 | grep -qi 'Link:' ; then + warn_or_fail "$sha1 is lacking of link tag" + fi + # check for a-b/r-b tag if git show -s $sha1 | grep -qi '\(reviewed\|acked\)\S*-by:' ; then return fi # check for committer != author - if [[ $(git show -s $sha1 --format="format:%ce") != $(git show -s $sha1 --format="format:%ae") ]]; then + if [[ $committer != $author ]]; then return fi