Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 924718 - dev-vcs/git-2.43.2 breaks dev-util/pkgcheck: pkgcheck scan: error: failed running git log: fatal: unrecognized argument: --no-find-copies
Summary: dev-vcs/git-2.43.2 breaks dev-util/pkgcheck: pkgcheck scan: error: failed run...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
: 924719 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-02-16 12:24 UTC by Michał Górny
Modified: 2024-03-01 19:19 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-02-16 12:24:37 UTC
$ pkgcheck scan --net --commits --exit error
pkgcheck scan: error: failed running git log: fatal: unrecognized argument: --no-find-copies


No clue if it was removed, or if no such option ever existed.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-02-16 12:27:48 UTC
*** Bug 924719 has been marked as a duplicate of this bug. ***
Comment 2 Larry the Git Cow gentoo-dev 2024-02-16 20:44:24 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/pkgcore/pkgcheck.git/commit/?id=9103513e26f9f2aeade5b563a49697c0e2665e3e

commit 9103513e26f9f2aeade5b563a49697c0e2665e3e
Author:     Arthur Zamarin <arthurzam@gentoo.org>
AuthorDate: 2024-02-16 20:38:46 +0000
Commit:     Arthur Zamarin <arthurzam@gentoo.org>
CommitDate: 2024-02-16 20:38:46 +0000

    git: revert log no copies option
    
    It broke with git-2.43.2, until further upstream work by Sam James, I'll
    just revert it.
    
    Bug: https://bugs.gentoo.org/924718
    Reverts: e688357bdc5773009bb2e106075d9852f2513f89
    Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>

 src/pkgcheck/addons/git.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Comment 3 Larry the Git Cow gentoo-dev 2024-02-16 20:55:25 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=58304450bd6c08dc00e8c051ee19b138769c62f2

commit 58304450bd6c08dc00e8c051ee19b138769c62f2
Author:     Arthur Zamarin <arthurzam@gentoo.org>
AuthorDate: 2024-02-16 20:53:06 +0000
Commit:     Arthur Zamarin <arthurzam@gentoo.org>
CommitDate: 2024-02-16 20:55:11 +0000

    dev-util/pkgcheck: add patch to work with git-2.43.2
    
    Bug: https://bugs.gentoo.org/924718
    Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>

 dev-util/pkgcheck/Manifest                                        | 1 +
 .../{pkgcheck-0.10.27.ebuild => pkgcheck-0.10.27-r1.ebuild}       | 8 ++++++++
 2 files changed, 9 insertions(+)
Comment 4 Larry the Git Cow gentoo-dev 2024-02-17 00:09:48 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e4b453985cbfcc2beb2c2b52e7a0a4d2d967d2e

commit 1e4b453985cbfcc2beb2c2b52e7a0a4d2d967d2e
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-02-16 23:51:39 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-02-16 23:51:39 +0000

    profiles: unmask =dev-vcs/git-2.43.2
    
    pkgcheck now has a workaround in stable and it's not a build-time failure
    so we can unmask this safely w/o worrying about upgrade ordering or anything.
    
    Closes: https://bugs.gentoo.org/924718
    Signed-off-by: Sam James <sam@gentoo.org>

 profiles/package.mask | 4 ----
 1 file changed, 4 deletions(-)
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-02-17 00:11:14 UTC
I've posted a real fix at https://github.com/pkgcore/pkgcheck/pull/664.

The gist is that there is a real option but we were using a short form, and I assumed they were two *distinct* options, but instead git started rejecting ambiguous unknown options in some contexts.
Comment 6 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2024-02-17 06:29:37 UTC
yes, git changed it's behavior, but it wasn't a documented option as far as I can see.

Besides merging Sam's patch, I suggest asking Git upstream to add docs & testcase for --no-find-copies-harder
Comment 7 Larry the Git Cow gentoo-dev 2024-03-01 19:19:47 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/pkgcore/pkgcheck.git/commit/?id=796cffb5634d50747c73fe989a3de77031aebea0

commit 796cffb5634d50747c73fe989a3de77031aebea0
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-02-16 23:25:33 +0000
Commit:     Arthur Zamarin <arthurzam@gentoo.org>
CommitDate: 2024-03-01 19:19:14 +0000

    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@gentoo.org>
    Closes: https://github.com/pkgcore/pkgcheck/pull/664
    Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>

 src/pkgcheck/addons/git.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)