public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
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,  1 Mar 2024 19:19:47 +0000 (UTC)	[thread overview]
Message-ID: <1709320754.796cffb5634d50747c73fe989a3de77031aebea0.arthurzam@gentoo> (raw)

commit:     796cffb5634d50747c73fe989a3de77031aebea0
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 16 23:25:33 2024 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> 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 <sam <AT> gentoo.org>
Closes: https://github.com/pkgcore/pkgcheck/pull/664
Signed-off-by: Arthur Zamarin <arthurzam <AT> 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


             reply	other threads:[~2024-03-01 19:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-01 19:19 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-02-16 20:44 Arthur Zamarin
2024-02-09 18:46 Arthur Zamarin
2023-10-03 18:28 Arthur Zamarin
2023-09-08 12:20 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=1709320754.796cffb5634d50747c73fe989a3de77031aebea0.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