From: Alex Riesen Date: Thu, 14 May 2009 12:16:31 GMT Subject: Re: git-tag bug? confusing git fast-export with double tag objects Message-ID: <81b0412b0905140516k4bc84606scb71981936966caf@mail.gmail.com> In-Reply-To: 2009/5/14 Matthias Andree : > Am 14.05.2009, 05:18 Uhr, schrieb Junio C Hamano : >> No.  You can tag any object, and a tag is an object.  You can point a >> signed tag with your own signed tag to attest your own belief on that >> other guy's tag, be it "it's genuine", "the tagged commit suits my need", >> etc. > > OK, so I can tag/sign any object, fine. > > HOWEVER, I see two problems here (yes, they are corner cases): > > #1: git tag -f ("replace tag") fails to "replace" a heaviweight tag if I try > to replace a tag by itself (or create a cycle by some other means). It is not a "cycle" ("loop"?) The tags information is the SHA1, not the tag's name. > The new "foo" is unique in refs (OK), but it's *not unique* in objects > (FAIL), as the old "foo" is referenced by the new "foo" and bears the same > tag name. Of course it is unique. Look at tag's SHA1. > #2: related: git tag -d cannot reliably delete tag objects > > Same here: if another tag object references the tag object I'm deleting, we > only delete the ref, but not the tag object. It doesn't (cannot) become > dangling. As soon as an object is not referenced anymore by any reference (including references from refs/tags/), reference log or index it will be removed by garbage collection (gc, prune) at the next opportunity.