From patchwork Mon Jun 7 17:18:29 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: 455362 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp2946440jae; Mon, 7 Jun 2021 10:44:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy304HJyQiFJuWyA313P08TPhqLXq2omVluEhcINlhEwdgfcD3WrXiX3uzCFXHnKBRgovBK X-Received: by 2002:a05:6e02:1ca5:: with SMTP id x5mr3788064ill.139.1623087858643; Mon, 07 Jun 2021 10:44:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623087858; cv=none; d=google.com; s=arc-20160816; b=g4VfyV1OU+OchxG+f9n1a0vjDMUW6dY21SlH6Z2o4/6vUSvDLAS6zv/6A00kS6FpfM GJiWJVslQDoaY3q06h3AErS3w5lyQCUTEs+9OmXCxfvUQdicNufSaIGAFBqUjaXllfoR bcs/OPorgL9LPCv45Bg75TM3gJRJ2O0jSm1aKFkwSDA4fJU2oTioG96+bk2V6UwBC7Gw KSel3JjPoLRkYg4oezIjUuvark7ZPNA2glgBitTLt+WTwnm4+lEu+Bh5H+PczxSFBiWl 5F2RjtF5Z+VKt57g3ZfnZpbC/EfEGgBD3YrD6qe6sQ8px8Nrtl7x8ZESZFVuEekaq11P n/qA== 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:message-id:date:subject:to:from:dkim-signature; bh=j5k0oIoIWdvhtoUvcL122b402BM5eBr1x6LJEnAcLN0=; b=fxVch+K8PnssB5pTiksx8yB1HcR0F/AhUn/MS7rTv4OxN76oc7ynfAyzkRuXJoG+Ne 8l3iFsW3PYy0hkuri9VmlDqCEUTHeikFtXnrWPYNdC8X/nxsHCKybcPPy4OdnhAiNKaa IX5hqScR7Xl+KF2xkvBYGMeB5EIRue0zMKvrBLcY6S20J914+bb07Y91qg2NB0+rCX7X fjg+OJ/jGXbHQc7cuf8G+sadtdpqILygvPLZ+wSThBDX1oT8D0VO5QB816NVODdoh6oU Z3wruP3vcRdPNHxAx433nhYHHkc92sRJQEvWYG4krnz3HRuPNgsUZZF65wkHdLHB1Zup K9cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ZUunQuvZ; 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 p31si16591315jac.95.2021.06.07.10.44.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 07 Jun 2021 10:44:18 -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=ZUunQuvZ; 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]:42600 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqJIP-00050j-VO for patch@linaro.org; Mon, 07 Jun 2021 13:44:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35704) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqItg-0002rc-Tr for qemu-devel@nongnu.org; Mon, 07 Jun 2021 13:18:46 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:42529) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lqItb-0007va-RP for qemu-devel@nongnu.org; Mon, 07 Jun 2021 13:18:44 -0400 Received: by mail-wr1-x42a.google.com with SMTP id c5so18463214wrq.9 for ; Mon, 07 Jun 2021 10:18:39 -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:mime-version :content-transfer-encoding; bh=j5k0oIoIWdvhtoUvcL122b402BM5eBr1x6LJEnAcLN0=; b=ZUunQuvZwv04DiCOB/yTnGnEHBPWxyoWkBu46/YR2xXFTP6/3FMgTo48bcHoko48d+ d/GIwsMVznoYc4kXw2/Rsrh13LDHWbZEwyzrK1u8rm7vMUJUTuZIW8bGI24Uq/vidqvJ /XXdl7NvMXW+vKY7YS46K6CobddJVfY/lrOhylbB5F99naeIspR+rvlwXzaRE+HBtQYN OUg7rbK22igC+nvri4KwuVZd+XfGIb8UM/kczn7TDzjbGOWnv/yVWCwk291VTML2Vit3 UL730Wuiobm6F7M7qj/UUl6I2BmJlQPPaybs6ixb0IOOiTBUABe14ZXav/AomzlwqV4b Dpnw== 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:mime-version :content-transfer-encoding; bh=j5k0oIoIWdvhtoUvcL122b402BM5eBr1x6LJEnAcLN0=; b=RHnk0yd9K9SyHvt4P7WL12fLAPLSoNdSy/QmDR+ZRb19rzQI54Ia5apW8PjMXkIaDQ Af1F2vaR+hOPnMf1h54vXWygFyVow/OKDog2SjR9kp/OGkfyap1rw0KbGK9P629qKoEw xWlN+dSS+rXqkFiP0tVlHuv7ZrA/90C8kHwoB0OCiyHcQSHOoAeCS5zvxI/iqwN5bt+k T462e4rzxaoyQE+/ep3VvkeszIK8mFJtyCNzCLSL4OrUhL+/dKFCD3d9V1/2Kuxv+zH9 voaGSaOZPGEOLhG95/f+QD/6VTI/3hfpEWtl9pmEyD5RiKyLX56C3f63GhIowDVK5tln qoIA== X-Gm-Message-State: AOAM530pW3neKsTxUmiFY7uMtDTQ8EEsw2PRLU9dJ5FhI/qquA7TnHz5 PeCh2DtuYFjudpKdM69jCFlljg== X-Received: by 2002:a5d:6482:: with SMTP id o2mr17719684wri.79.1623086318122; Mon, 07 Jun 2021 10:18:38 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id r4sm16692802wre.84.2021.06.07.10.18.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Jun 2021 10:18:37 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 1AED61FF7E; Mon, 7 Jun 2021 18:18:36 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [RFC PATCH] scripts/checkpatch: roll diff tweaking into checkpatch itself Date: Mon, 7 Jun 2021 18:18:29 +0100 Message-Id: <20210607171829.25111-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42a.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 , berrange@redhat.com, =?utf-8?q?Philipp?= =?utf-8?q?e_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , 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 --- .gitlab-ci.d/static_checks.yml | 3 --- .patchew.yml | 3 --- scripts/checkpatch.pl | 7 ++++++- 3 files changed, 6 insertions(+), 7 deletions(-) -- 2.20.1 Reviewed-by: Daniel P. Berrangé Reviewed-by: Willian Rampazzo Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Wainer dos Santos Moschetta 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;