diff options
author | Sam James <sam@gentoo.org> | 2023-09-07 23:54:44 +0100 |
---|---|---|
committer | Arthur Zamarin <arthurzam@gentoo.org> | 2023-09-08 15:20:25 +0300 |
commit | e688357bdc5773009bb2e106075d9852f2513f89 (patch) | |
tree | 371fda1f3c8a484f65a94110472e2898e5814c31 /src | |
parent | checks: use stable sorting of fields + strip where needed (diff) | |
download | pkgcheck-e688357bdc5773009bb2e106075d9852f2513f89.tar.gz pkgcheck-e688357bdc5773009bb2e106075d9852f2513f89.tar.bz2 pkgcheck-e688357bdc5773009bb2e106075d9852f2513f89.zip |
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@gentoo.org>
Closes: https://github.com/pkgcore/pkgcheck/pull/618
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/pkgcheck/addons/git.py | 1 |
1 files changed, 1 insertions, 0 deletions
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 |