From patchwork Wed Apr 29 01:06:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 3607 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4F6D261AD4 for ; Wed, 29 Apr 2020 03:06:07 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="L2KXpghQ"; dkim-atps=neutral Received: from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B5D44521 for ; Wed, 29 Apr 2020 03:06:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1588122367; bh=S78F+VN+aBeDTud66lZZSJOzutHhJyTtCQTcea1/vO4=; h=From:To:Subject:Date:From; b=L2KXpghQwXdd5yb305UUa2csH3TeFYstqm4fijDa6VoliJfASoVHzMBOAJUv4UHug UEjfH4TNnbuUWb8+xHfKmBiC0fY7PEYJyBeWX+poWzU7+t1N/NN6FcfA8VvJmLBGUq RdE+SUUsqYrEdxruGo+eC/j5lBJlwbnpT0FqTttg= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Wed, 29 Apr 2020 04:06:01 +0300 Message-Id: <20200429010601.32639-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.25.3 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] utils: hooks: pre-push: Catch commits without reviews X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2020 01:06:07 -0000 Improve the pre-push git hook script to reject commits without at least one Reviewed-by line. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- utils/hooks/pre-push | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/utils/hooks/pre-push b/utils/hooks/pre-push index 0eb8f5ce193d..5dc8addabeb6 100755 --- a/utils/hooks/pre-push +++ b/utils/hooks/pre-push @@ -56,6 +56,13 @@ do echo >&2 "Missing committer Signed-off-by in commit $commit" errors=$((errors+1)) fi + + # 3. A Reviewed-by is required. + if ! echo "$msg" | grep -q '^Reviewed-by: ' + then + echo >&2 "No Reviewed-by in commit $commit" + errors=$((errors+1)) + fi done if [ $errors != 0 ]