FWIW, I did end up figuring this out eventually.
According to the git docs, "By default, only tags on fetched branches
are imported"

Because of ZooKeeper's practice of cherry-picking and releasing from a
local release branch, the tags are not tags of commits which exist in
one of the fetched branches. So, they are not fetched by default.

release-3.6.0, for example, is a tag of commit
b4c89dc7f6083829e18fae6e446907ae0b1f22d7, which does not exist as a
commit in any branch.

In other projects I contribute to, this is not usually a problem,
because tagged commits are *always* merged into maintenance branches
(and eventually to the `master` branch as well, to preserve a complete
history there).

I was able to work around this in my local ZooKeeper git clone by
adding the `tagopt = --tags` explicitly to my git config with:

    git config remote.origin.tagopt --tags

So now, `git remote update` (or `git fetch --all`) pulls down tags for
these orphaned commits, even if they don't exist in a branch.

Hopefully this information is useful to others who are confused why
they aren't fetching tags after they are released.

On Wed, Apr 15, 2020 at 12:34 AM Christopher <ctubb...@apache.org> wrote:
>
> Possibly. It could also be related to the fact that I renamed my
> `origin` to `asf` after cloning it. I've seen this issue with git once
> before, but no idea why. Maybe I'll look into it some time. :)
>
> On Tue, Apr 14, 2020 at 11:44 PM Patrick Hunt <ph...@apache.org> wrote:
> >
> > No worries at all. That does seem odd, perhaps it's related to having
> > multiple remotes?
> >
> > Regards,
> >
> > Patrick
> >
> > On Tue, Apr 14, 2020 at 7:38 PM Christopher <ctubb...@apache.org> wrote:
> >
> > > This was a weird client-side error with git... not sure why it wasn't
> > > working, but `git remote update` wasn't fetching tags for some reason.
> > > I did `git fetch --tags`, then `git tag --delete $(git tag)`, then
> > > `git remote update` and it worked.
> > > So weird. Sorry for the noise.
> > >
> > > On Tue, Apr 14, 2020 at 9:44 PM Patrick Hunt <ph...@apache.org> wrote:
> > > >
> > > > Christopher - I believe it's release-3.6.0 - I have it from either gh or
> > > > apache gitbox, eg:
> > > > https://github.com/apache/zookeeper/tree/release-3.6.0
> > > >
> > > > Patrick
> > > >
> > > > On Tue, Apr 14, 2020 at 6:26 PM Christopher <ctubb...@apache.org> wrote:
> > > >
> > > > > Hi ZK Devs,
> > > > >
> > > > > I don't see a tag for 3.6.0 in git. Is there one available that hasn't
> > > > > been pushed?
> > > > >
> > > > > Thanks,
> > > > > Christopher
> > > > >
> > >

Reply via email to