Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git: fix no-copies option #664

Closed
wants to merge 1 commit into from
Closed

Conversation

thesamesam
Copy link
Member

@thesamesam thesamesam commented Feb 16, 2024

git: fix no-copies option

This reverts commit 9103513.

I originally added --no-find-copies in e688357
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: #663
Signed-off-by: Sam James [email protected]

@thesamesam thesamesam force-pushed the git-again branch 2 times, most recently from fd83f17 to 8424a69 Compare February 16, 2024 23:37
@thesamesam thesamesam requested a review from arthurzam February 16, 2024 23:38
This reverts commit 9103513.

I originally added --no-find-copies in e688357
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: pkgcore#663
Signed-off-by: Sam James <[email protected]>
@gentoo-bot gentoo-bot closed this in 796cffb Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants