From: Omar Polo Subject: send "unreachable" tags fails To: gameoftrees@openbsd.org Date: Tue, 14 Sep 2021 09:45:49 +0200 Hello, `got send' fails to send tags that were tagged on deleted branches. I don't know how widespread it is but for a couple of projects I'm used to tag bugfix releases by branching off the last release, cherrypicking the changes, tag the minor release and delete the branch. I understand that probably is not a workflow intended for got, and that I'm not in the targeted audience, but anyway. Here's how to reproduce. I'm using a "testing" repo over at my site, but any repository would do (TL;DR branch off your main, commit and tag some work, then come back in the main branch, delete the temp branch, commit other work on the master and try to send) % got co /home/op/git/testing.git/ A /tmp/testing/README.md Now shut up and hack % cd testing/ % got branch foo Switching work tree from refs/heads/master to refs/heads/foo % date > now % got add now A now % got ci -m 'new file' now A now Created commit ae46845550d7138051afeb1cc6f3a426732284b3 % got tag -m 'tag 1.0' 1.0 Created tag f7c778ba0d5c2a41571ca0651bd4ae8e81fb4309 % got update -b master Switching work tree from refs/heads/foo to refs/heads/master D now Updated to commit c786e732493bcb09b89ab53d73847d22c2d6f841 % got ref -d foo Deleted refs/heads/foo: ae46845550d7138051afeb1cc6f3a426732284b3 % echo something >> README.md % got ci -m 'do stuff...' README.md M README.md Created commit f18e6fc324353be5cfc65b7c995a122a8d24b658 at this point, `got log' and `tog' seems to behave correctly. But if I try to send: % got send # no tags! Connecting to "origin" git@omarpolo.com packing 1 reference; 3 objects; deltify: 100%; uploading pack: 267B 100% Server has accepted refs/heads/master % got send -T Connecting to "origin" git@omarpolo.com packing 2 references; 119 objects; deltify: 100%; uploading pack: 32.1K 100%fatal: bad object ae46845550d7138051afeb1cc6f3a426732284b3 fatal: bad object ae46845550d7138051afeb1cc6f3a426732284b3 got-send-pack: unexpected message from server got: bad packet received % Obviously, at https://git.omarpolo.com/testing I can't see the tag. Now that I think about it, it's a weird way to do stuff, and I acknowledge it. Thanks, Omar Polo