From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1731F158041 for ; Fri, 1 Mar 2024 19:19:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3A90CE2A01; Fri, 1 Mar 2024 19:19:50 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1C1BBE2A01 for ; Fri, 1 Mar 2024 19:19:50 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5147F3430DB for ; Fri, 1 Mar 2024 19:19:49 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E325C1065 for ; Fri, 1 Mar 2024 19:19:47 +0000 (UTC) From: "Arthur Zamarin" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Arthur Zamarin" Message-ID: <1709320754.796cffb5634d50747c73fe989a3de77031aebea0.arthurzam@gentoo> Subject: [gentoo-commits] proj/pkgcore/pkgcheck:master commit in: src/pkgcheck/addons/ X-VCS-Repository: proj/pkgcore/pkgcheck X-VCS-Files: src/pkgcheck/addons/git.py X-VCS-Directories: src/pkgcheck/addons/ X-VCS-Committer: arthurzam X-VCS-Committer-Name: Arthur Zamarin X-VCS-Revision: 796cffb5634d50747c73fe989a3de77031aebea0 X-VCS-Branch: master Date: Fri, 1 Mar 2024 19:19:47 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: eebb1238-caf4-4d02-966e-50dbc4934f2a X-Archives-Hash: 11a2dd2be3bb5aca8056101c0bd87a93 commit: 796cffb5634d50747c73fe989a3de77031aebea0 Author: Sam James gentoo org> AuthorDate: Fri Feb 16 23:25:33 2024 +0000 Commit: Arthur Zamarin gentoo org> CommitDate: Fri Mar 1 19:19:14 2024 +0000 URL: https://gitweb.gentoo.org/proj/pkgcore/pkgcheck.git/commit/?id=796cffb5 git: fix no-copies option This reverts commit 9103513e26f9f2aeade5b563a49697c0e2665e3e. I originally added --no-find-copies in e688357bdc5773009bb2e106075d9852f2513f89 to suppress git being too clever which ends up confusing our git integration, as we're not really interested in copies. I was going to use --no-find-copies-harder but I figured --no-find-copies sounded better as it was less specific and for our purposes here, we don't want copies at all, so why not? But --no-find-copies isn't a boolean option, it's just that until git commit 5825268db1058516d05be03d6a8d8d55eea5a943 ('parse-options: fully disable option abbreviation with PARSE_OPT_KEEP_UNKNOWN'), it tolerated it and expanded it to --no-find-copies-harder. Oops! Let's use --no-find-copies-harder as we originally should have, as the only available option to control the behavior, modulo setting a similarity % threshold with --find-copies=n. We're fine to do this as, quoting the git-log docs: "[...] and options applicable to the git-diff[1] command to control how the changes each commit introduces are shown." Bug: https://bugs.gentoo.org/924718 Bug: https://github.com/pkgcore/pkgcheck/issues/663 Signed-off-by: Sam James gentoo.org> Closes: https://github.com/pkgcore/pkgcheck/pull/664 Signed-off-by: Arthur Zamarin gentoo.org> src/pkgcheck/addons/git.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pkgcheck/addons/git.py b/src/pkgcheck/addons/git.py index 752c9cff..7b2435ac 100644 --- a/src/pkgcheck/addons/git.py +++ b/src/pkgcheck/addons/git.py @@ -155,8 +155,7 @@ class _ParseGitRepo: cmd = shlex.split(self._git_cmd) cmd.append(f"--pretty=tformat:%n{'%n'.join(self._format)}") cmd.append(commit_range) - # https://bugs.gentoo.org/924718 - # cmd.extend(("--no-find-copies", "--no-find-copies-harder", "--find-renames")) + cmd.extend(("--no-find-copies-harder", "--find-renames")) self.git_log = GitLog(cmd, self.path) # discard the initial newline