Script rmport shows error message

Rene Ladan rene at freebsd.org
Sat May 1 17:17:38 UTC 2021


On Sat, May 01, 2021 at 07:07:08PM +0200, Matthias Fechner wrote:
> Dear all,
> 
> I thought that the rmport script was already updated, but I cannot use it.
> I tried to execute it with:
> Tools/scripts/rmport databases/rubygem-gitlab-pg_query
> fatal: ambiguous argument 'remotes/origin/main': unknown revision or 
> path not in the working tree.
> Use '--' to separate paths from revisions, like this:
> 'git <command> [<revision>...] -- [<file>...]'
> you have local commits, exiting
> 
> But there are no local changes:
> ╰─ git status
> On branch main
> Your branch is up to date with 'freebsd/main'.
> 
> nothing to commit, working tree clean
> 
> The FreeBSD repository is under freebsd and not origin, maybe this is 
> the source of the problem:
> ╰─ git remote -v
> freebsd https://git.freebsd.org/ports.git (fetch)
> freebsd git at gitrepo.freebsd.org:ports.git (push)
> origin  git at gitlab.fechner.net:mfechner/Gitlab.git (fetch)
> origin  git at gitlab.fechner.net:mfechner/Gitlab.git (push)
> 
> Has anyone an idea how to fix/use this very useful script?
> 
It might indeed be because you have a remote it does not expect:

if ! ${GIT} diff --exit-code remotes/origin/main ; then
...
fi

Here I have:
% git remote -v
origin	https://git.freebsd.org/ports.git (fetch)
origin	git at gitrepo.FreeBSD.org:ports.git (push)

René


More information about the freebsd-git mailing list