{"id":3607,"url":"https://patchwork.libcamera.org/api/patches/3607/?format=json","web_url":"https://patchwork.libcamera.org/patch/3607/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20200429010601.32639-1-laurent.pinchart@ideasonboard.com>","date":"2020-04-29T01:06:01","name":"[libcamera-devel] utils: hooks: pre-push: Catch commits without reviews","commit_ref":"49856afa01c36d7e41f3a1ed31d7437e7e01dcc8","pull_url":null,"state":"accepted","archived":false,"hash":"49fca842fb8c9ba8c5d0c74a3011522593b2a832","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/3607/mbox/","series":[{"id":848,"url":"https://patchwork.libcamera.org/api/series/848/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=848","date":"2020-04-29T01:06:01","name":"[libcamera-devel] utils: hooks: pre-push: Catch commits without reviews","version":1,"mbox":"https://patchwork.libcamera.org/series/848/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/3607/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/3607/checks/","tags":{},"headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4F6D261AD4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 29 Apr 2020 03:06:07 +0200 (CEST)","from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B5D44521\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 29 Apr 2020 03:06:06 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"L2KXpghQ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1588122367;\n\tbh=S78F+VN+aBeDTud66lZZSJOzutHhJyTtCQTcea1/vO4=;\n\th=From:To:Subject:Date:From;\n\tb=L2KXpghQwXdd5yb305UUa2csH3TeFYstqm4fijDa6VoliJfASoVHzMBOAJUv4UHug\n\tUEjfH4TNnbuUWb8+xHfKmBiC0fY7PEYJyBeWX+poWzU7+t1N/NN6FcfA8VvJmLBGUq\n\tRdE+SUUsqYrEdxruGo+eC/j5lBJlwbnpT0FqTttg=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","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","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH] utils: hooks: pre-push: Catch commits\n\twithout reviews","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Wed, 29 Apr 2020 01:06:07 -0000"},"content":"Improve the pre-push git hook script to reject commits without at least\none Reviewed-by line.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n utils/hooks/pre-push | 7 +++++++\n 1 file changed, 7 insertions(+)","diff":"diff --git a/utils/hooks/pre-push b/utils/hooks/pre-push\nindex 0eb8f5ce193d..5dc8addabeb6 100755\n--- a/utils/hooks/pre-push\n+++ b/utils/hooks/pre-push\n@@ -56,6 +56,13 @@ do\n \t\t\techo >&2 \"Missing committer Signed-off-by in commit $commit\"\n \t\t\terrors=$((errors+1))\n \t\tfi\n+\n+\t\t# 3. A Reviewed-by is required.\n+\t\tif ! echo \"$msg\" | grep -q '^Reviewed-by: '\n+\t\tthen\n+\t\t\techo >&2 \"No Reviewed-by in commit $commit\"\n+\t\t\terrors=$((errors+1))\n+\t\tfi\n \tdone\n \n \tif [ $errors != 0 ]\n","prefixes":["libcamera-devel"]}