From patchwork Fri Jun 25 09:13:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 466829 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp1262164jao; Fri, 25 Jun 2021 02:15:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUiMeMxpMa+RSL7BPG/H0OAwN8+45dzJKdkmkulUiUhYYlw2abN/OrHjzl1Ws3Ep77WNf4 X-Received: by 2002:a6b:e916:: with SMTP id u22mr5241473iof.155.1624612501531; Fri, 25 Jun 2021 02:15:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624612501; cv=none; d=google.com; s=arc-20160816; b=nRsaJ065DHYr4c2ViiR35P7xE7tH0mcYpyD26Wx3j/Vi9GMxtKqAyOzALJzgMsKqkg pwETfGAo1B0taHhoKTE6bTmcG9ZQWksvuwFpEK94rtyVq5A7wMPQgRsHEI76zjI0jYIo +1JqkzS3f7pnS0yi65H3LFnZj/97b0wzLung0rEdaqv31v67CQdmbqC4U9u5ii8z6dML +xSQjVqYTmazlpTb3tjoU74ZR4etxcHmqdXebUci7foO/duHKDAuipJuYjLNl6rBfYiD uj2cluolbWDJOV4d4JAe80hmFP3fzxTidvYPecilgAiqylQ/PGrK3wEz+6JiLE9KNIWO 2Bgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=ES6aP9eLrpmL5vbwI6z5QtaMohdgOgmYVT83oPzFr5I=; b=LqGCHsnMuNf7gEhNBB9rZAGvuw6qACU6jvYf0NuENW5+bY9cxZkeDQzkxK45jKLFa7 wL5M2UHvfcP7xu2r6o1kEMNl9vA0d1DKM54cUkAgwlH2fUGWMXMgCLdBKgNWGI67pTrz bDcdWG6gf9CZlxNjHxcZzGbKUe7uReWmaVf5cTVrgNLPyaB+A0V2rxmeEOPLO04KCtFp tJ36pAK3efHcTK00mD1O09JwiooXvrPq/QYPGZiZfORkE+OpdAuzrnc3FFqQxDst1K1o FLnlb5mF+eH+fNRDjW1j2a11ofMIJiGpGZ6cecbxhlAbuF+BzOvCm6+iCJgYi38Ai9MK Arnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="eu/zuwf0"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id p19si6540130jas.9.2021.06.25.02.15.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Jun 2021 02:15:01 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="eu/zuwf0"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:53948 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwhvR-0000as-1e for patch@linaro.org; Fri, 25 Jun 2021 05:15:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53030) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwhuW-0000XL-Pk for qemu-devel@nongnu.org; Fri, 25 Jun 2021 05:14:04 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:44029) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lwhuU-0002ve-D3 for qemu-devel@nongnu.org; Fri, 25 Jun 2021 05:14:04 -0400 Received: by mail-wm1-x331.google.com with SMTP id p8-20020a7bcc880000b02901dbb595a9f1so5368829wma.2 for ; Fri, 25 Jun 2021 02:14:01 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=ES6aP9eLrpmL5vbwI6z5QtaMohdgOgmYVT83oPzFr5I=; b=eu/zuwf0ekSIQp2bhEhSbXJ8X/i4kVpqCeosR8+Sqoqqv5Wq14oyofBTddXxbIpAkx jy0hc5+E1bI1Op4bJKLwsl4mNE2aEfvbHY5zvRo8hxeFZv5NnDRKKIrkUbZp/MeaHN+m 964cjzjEJ8CNsJB32NJril2tUYgygHgA+nVD6RjzorS3I9QOirorxYMgPXrVf8wLn18m ADww6By00n0OXnVW0i0DSrHbCAIYOSAnkj/x25Tinnd3Cx/ItAsy3C2rWeVPMDQ1+l32 a0Tahl6ObSUSFibodrjt2Phi4H8cFHJjXrD2vcSrpianwBNAihSj3es92HEUdBWYO+RF 0bwg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=ES6aP9eLrpmL5vbwI6z5QtaMohdgOgmYVT83oPzFr5I=; b=QcarUcQZuTZDOBoSaxedbQZLRRvcWcAQ6iD+9G3U23y4Xj/VvEbQcEKyHoMKVuL1pA IxGcyZAVHqQmAppA3f6ONVCQMsdlnMRKxDQ4LQ7F8RlieyiDPWUe70xTmHpsxVJcCKXo /XKa30nzxdbJv3OHJyqA1lKycZEfgXat3yGQvucgicrzq0BrYpR5xe+tm2DSWu3wUKOt t4S5aALZ+Cg9p8LoCANvrhcSIji9PaKFfRdmPLjJ7XMyxQUREFgbp+azxW42YU4Rf647 308g9Ag4CdwoLIMOV5MqPZLgziTXJzY6Q6RdZQBuaTavQjrPu4W4Rmq7EPd9p7YmvV68 pnuA== X-Gm-Message-State: AOAM532y10h4bzqueFsSQrEk0ADUNILV45YlzoNHH5vUMMcAmzjXcc06 NFs/jLFdaybluuW0GDwkMECdwA== X-Received: by 2002:a7b:c8d8:: with SMTP id f24mr9663361wml.31.1624612440801; Fri, 25 Jun 2021 02:14:00 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id m184sm5066849wmm.26.2021.06.25.02.13.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Jun 2021 02:13:56 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id A91361FF8F; Fri, 25 Jun 2021 10:13:55 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 3/7] scripts/checkpatch: roll diff tweaking into checkpatch itself Date: Fri, 25 Jun 2021 10:13:51 +0100 Message-Id: <20210625091355.25673-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210625091355.25673-1-alex.bennee@linaro.org> References: <20210625091355.25673-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x331.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe?= =?utf-8?q?_Mathieu-Daud=C3=A9?= , Willian Rampazzo , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Rather than relying on external tweaks lets just do it inside checkpatch's direct commitish handling which is QEMU specific code anyway. Suggested-by: Daniel P. Berrangé Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Reviewed-by: Willian Rampazzo Reviewed-by: Wainer dos Santos Moschetta Message-Id: <20210623102749.25686-4-alex.bennee@linaro.org> -- 2.20.1 diff --git a/.gitlab-ci.d/static_checks.yml b/.gitlab-ci.d/static_checks.yml index 7e685c6a65..c5fa4fce26 100644 --- a/.gitlab-ci.d/static_checks.yml +++ b/.gitlab-ci.d/static_checks.yml @@ -4,9 +4,6 @@ check-patch: needs: job: amd64-centos8-container script: - - git config --local diff.renamelimit 0 - - git config --local diff.renames True - - git config --local diff.algorithm histogram - .gitlab-ci.d/check-patch.py variables: GIT_DEPTH: 1000 diff --git a/.patchew.yml b/.patchew.yml index 2638b7f564..1b78262ce5 100644 --- a/.patchew.yml +++ b/.patchew.yml @@ -138,9 +138,6 @@ testing: script: | #!/bin/bash git rev-parse base > /dev/null || exit 0 - git config --local diff.renamelimit 0 - git config --local diff.renames True - git config --local diff.algorithm histogram ./scripts/checkpatch.pl --mailback base.. docker-mingw@fedora: enabled: true diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index bbcd25ae05..cb8eff233e 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -399,7 +399,12 @@ if ($chk_branch) { my $num_patches = @patches; for my $hash (@patches) { my $FILE; - open($FILE, '-|', "git", "show", "--patch-with-stat", $hash) || + open($FILE, '-|', "git", + "-c", "diff.renamelimit=0", + "-c", "diff.renames=True", + "-c", "diff.algorithm=histogram", + "show", + "--patch-with-stat", $hash) || die "$P: git show $hash - $!\n"; while (<$FILE>) { chomp;