Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 925620 - dev-util/pkgcheck-0.10.27-r1 gives "ambiguous argument 'origin': unknown revision or path not in the working tree" error
Summary: dev-util/pkgcheck-0.10.27-r1 gives "ambiguous argument 'origin': unknown revi...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: PkgCore project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-27 14:51 UTC by Paolo Pedroni
Modified: 2024-02-28 15:53 UTC (History)
1 user (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 Paolo Pedroni 2024-02-27 14:51:34 UTC
Following the instructions at https://wiki.gentoo.org/wiki/GitHub_Pull_Requests for a pull request, when I get to the step "Make the changes and make sure to run pkgcheck to check for basic errors:" I get an error when I give the command "pkgcheck scan --net --commits". The error says:
pkgcheck scan: error: failed running git: fatal: ambiguous argument 'origin': unknown revision or path not in the working tree.
Suggested to configure the remote by running 'git remote set-head origin -a'"

I even wiped my local mirror completely and restarted from scratch, but the error remains.

~/github/gentoo $ git config --local --list
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.upstream.url=https://github.com/gentoo/gentoo.git
remote.upstream.fetch=+refs/heads/*:refs/remotes/upstream/*
branch.master.remote=upstream
branch.master.merge=refs/heads/master
remote.github.url=<redacted>
remote.github.fetch=+refs/heads/*:refs/remotes/github/*
user.name=<redacted>
user.email=<redacted>
user.signingkey=<redacted>
commit.gpgsign=1
pull.ff=only
pull.rebase=merges
push.default=simple
push.gpgsign=0

~/github/gentoo $ git remote -v
github  https://github.com/<github user>/gentoo (fetch)
github  https://github.com/<github user>/gentoo (push)
upstream        https://github.com/gentoo/gentoo.git (fetch)
upstream        https://github.com/gentoo/gentoo.git (push)
Comment 2 Paolo Pedroni 2024-02-28 11:26:17 UTC
(In reply to Sam James from comment #1)
> Does
> https://wiki.gentoo.org/wiki/Pkgcheck#failed_retrieving_origin.
> 2FHEAD_commit_hash_for_git_repo help?

 $ LC_ALL=C git remote set-head origini master
error: Not a valid ref: refs/remotes/origin/master
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-02-28 13:02:47 UTC
(In reply to Paolo Pedroni from comment #2)
> (In reply to Sam James from comment #1)
> > Does
> > https://wiki.gentoo.org/wiki/Pkgcheck#failed_retrieving_origin.
> > 2FHEAD_commit_hash_for_git_repo help?
> 
>  $ LC_ALL=C git remote set-head origini master
> error: Not a valid ref: refs/remotes/origin/master

Yes, you don't have a 'origin' remote. It's a known annoying issue
Comment 4 Paolo Pedroni 2024-02-28 15:53:17 UTC
(In reply to Sam James from comment #3)
> (In reply to Paolo Pedroni from comment #2)
> > (In reply to Sam James from comment #1)
> > > Does
> > > https://wiki.gentoo.org/wiki/Pkgcheck#failed_retrieving_origin.
> > > 2FHEAD_commit_hash_for_git_repo help?
> > 
> >  $ LC_ALL=C git remote set-head origini master
> > error: Not a valid ref: refs/remotes/origin/master
> 
> Yes, you don't have a 'origin' remote. It's a known annoying issue

But it used to work (at least until about a year ago, when my last PR was).

Anything I can do? I'm by no way a 'git' power user.