{"id":18310,"url":"https://patchwork.libcamera.org/api/1.1/patches/18310/?format=json","web_url":"https://patchwork.libcamera.org/patch/18310/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/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":"<20230227121546.3231835-1-paul.elder@ideasonboard.com>","date":"2023-02-27T12:15:46","name":"[libcamera-devel] utils: checkstyle.py: Don't run commit title checker on staged commits","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"2afb7afd488ee9147f3ea867827f03dc801efcc2","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/1.1/people/17/?format=json","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/18310/mbox/","series":[{"id":3771,"url":"https://patchwork.libcamera.org/api/1.1/series/3771/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3771","date":"2023-02-27T12:15:46","name":"[libcamera-devel] utils: checkstyle.py: Don't run commit title checker on staged commits","version":1,"mbox":"https://patchwork.libcamera.org/series/3771/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/18310/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/18310/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 9CC4CBE08A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 27 Feb 2023 12:16:00 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EFD4D6265A;\n\tMon, 27 Feb 2023 13:15:59 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E923662636\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 27 Feb 2023 13:15:57 +0100 (CET)","from pyrite.rasen.tech (h175-177-042-159.catv02.itscom.jp\n\t[175.177.42.159])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 62D7F56A;\n\tMon, 27 Feb 2023 13:15:56 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1677500160;\n\tbh=V8JUeRmaUY2Ov0MBBIS7ld1oi9MqwhFTB4vy1qYdh0s=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=rfSEp5JBAmVfjJl1mUYrJie0iv7Kj8a9dJLQ4TO51J0JIjxOthJB6YvBwj95WVlYV\n\tzDD/ZndUjA1W64ssmrf5ucWz3gERs1jVPZ+1DR4EOvbKSUiMqpxluKJs6HrjkYSZDs\n\tlFD4NX5CkK5AqPNg4jttjeqa4KCjwOtnkRTvYpy9SYMswnqAxp6EpRx0UwxU79TATd\n\tlzryJ5o27Th5UIm64X2NtNNy2kaqY3GJ7ib5GolI2DV1Wgz7G0zTexeJbWfkOfe4kx\n\tRDWHbyb2ju4f3axa5vj5zLQhV0MHemMcU9hg3ntTwTqahqXjafz3Ba3zMRPv/HKZkZ\n\tBiiZhSnq8GjTw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1677500157;\n\tbh=V8JUeRmaUY2Ov0MBBIS7ld1oi9MqwhFTB4vy1qYdh0s=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=lZ4USHUCiWFLn5bNK/zCJvf2D7EZvB0AHAOmDBQpiLPAJb64FyT6HHVrb7SUI48WB\n\thi8GHmGeLM5MLKyaqVFRAi9OiK/BKRaMT6YVrmCp7X7tyMt6C2lC3LFDVvXMOSLAzV\n\tXvl9bnxwKVg+1K6mb8x3Su0DolaIKzQ/rPsjwJT0="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"lZ4USHUC\"; dkim-atps=neutral","To":"libcamera-devel@lists.libcamera.org","Date":"Mon, 27 Feb 2023 21:15:46 +0900","Message-Id":"<20230227121546.3231835-1-paul.elder@ideasonboard.com>","X-Mailer":"git-send-email 2.35.1","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH] utils: checkstyle.py: Don't run commit\n\ttitle checker on staged commits","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>","From":"Paul Elder via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Paul Elder <paul.elder@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"When creating a new commit, there is no title, so the title checker\ncomplains that the title isn't compliant and the commit cannot be\ncreated if checkstyle is run as a pre-commit hook. Fix this by skipping\nthe title checker when run on staged changes.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n---\n utils/checkstyle.py | 3 +++\n 1 file changed, 3 insertions(+)","diff":"diff --git a/utils/checkstyle.py b/utils/checkstyle.py\nindex 78645410..84f0f50f 100755\n--- a/utils/checkstyle.py\n+++ b/utils/checkstyle.py\n@@ -360,6 +360,9 @@ class TitleChecker(CommitChecker):\n     def check(cls, commit, top_level):\n         title = commit.title\n \n+        if title == 'Staged changes':\n+            return []\n+\n         # Ignore release commits, they don't need a prefix.\n         if TitleChecker.release_regex.fullmatch(title):\n             return []\n","prefixes":["libcamera-devel"]}