scan: add --git-remote option to select remote#601
Conversation
For repos with multiple remotes, it might be useful to select a specific remote to use (and not the default origin). This can be set using the `--git-remote` option for cmd call, or by adding `git-remote=value` to the config file. Resolves: pkgcore#600 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #601 +/- ##
=======================================
Coverage 79.75% 79.75%
=======================================
Files 58 58
Lines 8618 8621 +3
Branches 1961 1961
=======================================
+ Hits 6873 6876 +3
- Misses 1643 1648 +5
+ Partials 102 97 -5
☔ View full report in Codecov by Sentry. |
hartwork
left a comment
There was a problem hiding this comment.
Hi @arthurzam very nice and quick — thank you! 🙏
I have tried both (1) --git-remote git-gentoo-org and (2) the config option with no origin in sight now and it worked with each of these in isolation and did not work by default (as expected). That's great.
For anyone else interested, the config file looked like this for me in practice:
# cat ~/.config/pkgcheck/pkgcheck.conf
[DEFAULT]
git-remote = git-gentoo-org
One thing I noticed is that in the config file git-remote (with a dash) could be an unusual key format/syntax here if nothing else uses a dash so far (not sure); if so, git_remote with an underscore may work better, just an idea.
Thank you :)
At pkgcore stack we use the I'll merge it now. |
For repos with multiple remotes, it might be useful to select a specific remote to use (and not the default origin). This can be set using the
--git-remoteoption for cmd call, or by addinggit-remote=valueto the config file.@hartwork mind applying the patch and verifying if it work for you (ideally both ways of cmd arg and config file).
Resolves: #600