From: Michael J Gruber Date: Thu, 10 Dec 2009 12:23:43 GMT Subject: [PATCH] tag -d: print sha1 of deleted tag Message-ID: <3b0a7bfa75126e4c13ec15a4357645b2bfd14b5b.1260447713.git.git@drmicha.warpmail.net> In-Reply-To: <87ljhb87nj.fsf@jondo.cante.net> 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 Signed-off-by: Michael J Gruber Suggested-by: Jari Aalto --- builtin-tag.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/builtin-tag.c b/builtin-tag.c index c479018..39d0ce2 100644 --- a/builtin-tag.c +++ b/builtin-tag.c @@ -140,7 +140,7 @@ static int delete_tag(const char *name, const char *ref, { if (delete_ref(ref, sha1, 0)) return 1; - printf("Deleted tag '%s'\n", name); + printf("Deleted tag '%s' %s\n", name, sha1_to_hex(sha1)); return 0; } -- 1.6.6.rc1.292.gd8fe