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 27E5A158089 for ; Fri, 8 Sep 2023 12:20:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 638012BC033; Fri, 8 Sep 2023 12:20:35 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 221072BC033 for ; Fri, 8 Sep 2023 12:20:35 +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) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 098E4335C47 for ; Fri, 8 Sep 2023 12:20:34 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4EFA01124 for ; Fri, 8 Sep 2023 12:20:32 +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: <1694175625.e688357bdc5773009bb2e106075d9852f2513f89.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: e688357bdc5773009bb2e106075d9852f2513f89 X-VCS-Branch: master Date: Fri, 8 Sep 2023 12:20:32 +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: ee2ad308-b4b4-4347-8674-bc98af1a74a5 X-Archives-Hash: ee2fb67995da24c05ba28a705c624ab1 commit: e688357bdc5773009bb2e106075d9852f2513f89 Author: Sam James gentoo org> AuthorDate: Thu Sep 7 22:54:44 2023 +0000 Commit: Arthur Zamarin gentoo org> CommitDate: Fri Sep 8 12:20:25 2023 +0000 URL: https://gitweb.gentoo.org/proj/pkgcore/pkgcheck.git/commit/?id=e688357b addons: git: pass --no-find-copies --no-find-copies-harder --find-renames to git log I currently have a local git hack to allow configuring git to default to --find-copies-harder because it's *extremely* useful when working on ebuild repositories (prompted by a discussion with Eli Schwartz). Unfortunately, this can confuse pkgcheck's git intergration because it'll call `git log` like: ``` git log --name-status --diff-filter=ARMD -z --pretty=tformat:%n%h%n%ct cc5b3b9f134a070c548faa4e3de17d615497d0b3..origin/HEAD ``` and get nothing back because (I think) git is interpreting some changes as copies rather than renames or new files. Explicitly pass options to disable finding copies, even though normally this isn't necessary, to keep things working. Signed-off-by: Sam James gentoo.org> Closes: https://github.com/pkgcore/pkgcheck/pull/618 Signed-off-by: Arthur Zamarin gentoo.org> src/pkgcheck/addons/git.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pkgcheck/addons/git.py b/src/pkgcheck/addons/git.py index 669ac262..5d41ba3b 100644 --- a/src/pkgcheck/addons/git.py +++ b/src/pkgcheck/addons/git.py @@ -155,6 +155,7 @@ class _ParseGitRepo: cmd = shlex.split(self._git_cmd) cmd.append(f"--pretty=tformat:%n{'%n'.join(self._format)}") cmd.append(commit_range) + cmd.extend(("--no-find-copies", "--no-find-copies-harder", "--find-renames")) self.git_log = GitLog(cmd, self.path) # discard the initial newline