Re: OpenZFS imports, status update

From: Li-Wen Hsu <lwhsu_at_freebsd.org>
Date: Tue, 08 Jun 2021 10:41:14 UTC
On Tue, Jun 8, 2021 at 6:29 AM Li-Wen Hsu <lwhsu@freebsd.org> wrote:
> And to allow creating master and zfs-2.1-release branches in the
> vendor/openzfs namespace, we need to rename the original
> vendor/openzfs to create rooms for them. Because we disallow deleting
> branches or other destructive operations from remote and it's not that
> cost-effective to modify the configuration and hooks for this single
> operation. I would like to just rename the branch on the server, with
> command:
>
>     git branch -m vendor/openzfs vendor/openzfs/legacy

So we're taking this route after discussing it with imp@ and delphij@.
I'll send a heads-up for this.

> The people have local branch tracking the original vendor/openzfs will
> encounter issues like this whey doing `git pull`:
>
>     error: cannot lock ref
> 'refs/remotes/freebsd/vendor/openzfs/legacy':
> 'refs/remotes/freebsd/vendor/openzfs' exists; cannot create
> 'refs/remotes/freebsd/vendor/openzfs/legacy'
>
> The solution is update the upstream of the tracking branch:
>
>     (change "freebsd" to "origin" if you use default remote name)
>     git update-ref -d refs/remotes/freebsd/vendor/openzfs

And we'll primarily suggest people using:
git remote prune freebsd (or "origin", depends on the remote name you use)

>     git branch -u freebsd/vendor/openzfs/legacy vendor/openzfs/legacy