Script rmport shows error message
Mark Millard
marklmi at yahoo.com
Sat May 1 19:50:18 UTC 2021
On 2021-May-1, at 10:07, Matthias Fechner <mfechner at freebsd.org> wrote:
> 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
Summary:
ports/Tools/scripts/rmport does not yet seem to be set up to
expect or try "remotes/freebsd/" instead of "remotes/origin/".
Details:
If you follow the documented instructions the refs
for the ports main are (ignore any refs/ prefix):
# git remote show
freebsd
# git show-ref --abbrev main
a6233da12c53 refs/heads/main
a6233da12c53 refs/remotes/freebsd/main
If you are not set up to be a committer you might
have something like:
# git remote -v show
freebsd ssh://anongit@git.freebsd.org/ports.git (fetch)
freebsd ssh://anongit@git.freebsd.org/ports.git (push)
(Where the push one is not intended to work and there
are https:// alternatives to the ssh:// use.)
You can use such commands to check on what is set up
in your environment.
This contrasts with the typical defaults, such as from
another git context that I have (older github: so master
instead of main):
# git remote show
origin
# git remote -v show # output edited
origin https://github.com/OMITTED/OMITTED.git (fetch)
origin https://github.com/OMITTED/OMITTED.git (push)
# git show-ref --abbrev master
ae3f9ba refs/heads/master
ae3f9ba refs/remotes/origin/master
As for ports/Tools/scripts/rmport . . .
# grep origin /usr/ports/Tools/scripts/rmport
if ! ${GIT} diff --exit-code remotes/origin/main ; then
# grep freebsd /usr/ports/Tools/scripts/rmport
url="https://bugs.freebsd.org/bugzilla/buglist.cgi?quicksearch=${synopsis}"
So no attempt at use of remotes/freebsd/ use.
Locally you could replace the "remotes/origin/" text
in the script until there is official support for
the documented way of setting things up.
> 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?
>
===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)
More information about the freebsd-git
mailing list