Hello! pkgcheck 0.10.16 crashes with --commits flag with the following error: Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/pkgcheck/addons/git.py", line 341, in generate_restrictions p = subprocess.run( File "/usr/lib/python3.10/subprocess.py", line 526, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['git', 'diff-tree', '-r', '--name-only', '-z', 'origin..HEAD']' returned non-zero exit status 128. pkgcheck scan: error: failed running git: fatal: ambiguous argument 'origin..HEAD': unknown revision or path not in the working tree. Thanks and best, Mikhail
Can you please add the following info: 1. link to overlay / repo (if not gentoo) 2. output of `git remove -v` in that git repo 3. all versions of pkgcheck stack (pkgcheck, pkgcore, snakeoil) 4. please add "--debug" to the command, and rerun it
1. https://github.com/DakEnviy/underworld-overlay 2. origin git@github.com:DakEnviy/underworld-overlay.git (fetch) origin git@github.com:DakEnviy/underworld-overlay.git (push) 3. dev-util/pkgcheck-0.10.17 sys-apps/pkgcore-0.12.16-r1 dev-python/snakeoil-0.10.1 4. Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/pkgcheck/addons/git.py", line 341, in generate_restrictions p = subprocess.run( File "/usr/lib/python3.10/subprocess.py", line 526, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['git', 'diff-tree', '-r', '--name-only', '-z', 'origin..HEAD']' returned non-zero exit status 128. pkgcheck scan: error: failed running git: fatal: ambiguous argument 'origin..HEAD': unknown revision or path not in the working tree.
Can you try to run the following command (taken from docs [1]): git remote set-head origin master And then try again to check commits :) [1] https://pkgcore.github.io/pkgcheck/man/pkgcheck.html#git
Sry, I've missed this one in docs. Thanks for the help :) Suggestion: maybe check this case and add suggestion to run the command: git remote set-head origin master
(In reply to Mikhail Golbakh from comment #4) > Sry, I've missed this one in docs. Thanks for the help :) No problems. I took maintenance over the stack not so long ago, so I still learn the pitfalls (believe me there are a lot!) > Suggestion: maybe check this case and add suggestion to run the command: > > git remote set-head origin master A very good idea! I will open a task for myself to think how to improve it (maybe if command fails, go to a longer code path which tries to guess the cause and show suggestion for that). For now I'm closing this bug.