From: "Arthur Zamarin" <arthurzam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/pkgcore/pkgcheck:master commit in: src/pkgcheck/addons/
Date: Fri, 8 Sep 2023 12:20:32 +0000 (UTC) [thread overview]
Message-ID: <1694175625.e688357bdc5773009bb2e106075d9852f2513f89.arthurzam@gentoo> (raw)
commit: e688357bdc5773009bb2e106075d9852f2513f89
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 7 22:54:44 2023 +0000
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> 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 <sam <AT> gentoo.org>
Closes: https://github.com/pkgcore/pkgcheck/pull/618
Signed-off-by: Arthur Zamarin <arthurzam <AT> 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
next reply other threads:[~2023-09-08 12:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-08 12:20 Arthur Zamarin [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-02-07 19:26 [gentoo-commits] proj/pkgcore/pkgcheck:master commit in: src/pkgcheck/addons/ Arthur Zamarin
2024-03-01 19:19 Arthur Zamarin
2024-02-16 20:44 Arthur Zamarin
2024-02-09 18:46 Arthur Zamarin
2023-10-03 18:28 Arthur Zamarin
2023-01-24 19:22 Arthur Zamarin
2023-01-19 20:57 Arthur Zamarin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1694175625.e688357bdc5773009bb2e106075d9852f2513f89.arthurzam@gentoo \
--to=arthurzam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox