From: Michael J Gruber Date: Thu, 10 Dec 2009 13:21:39 GMT Subject: Re: [PATCH] tag -d: print sha1 of deleted tag Message-ID: <4B20F5E3.20004@drmicha.warpmail.net> In-Reply-To: <20091210124701.GA12521@atjola.homenet> Björn Steinbrink venit, vidit, dixit 10.12.2009 13:47: > On 2009.12.10 13:23:43 +0100, Michael J Gruber wrote: >> Print the sha1 of the deleted tag (in addition to the tag name) so that >> one can easily recreate a mistakenly deleted tag: >> >> git tag -d tagname >> Deleted tag 'tagname' DEADBEEF >> git tag 'tagname' DEADBEEF # for lightweight tags >> git update-ref refs/tags/'tagname' DEADBEEF # for annotated tags > > Using "git tag 'tagname' DEADBEEF" should actually work in both cases. > As that does nothing but creating the ref in the refs/tags/ namespace. > > Bjoern Cool, even better! So, an annotated tag is practically a lightweight tag pointing to a tag object. Once you think of it it's natural! Michael