aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-01-07 15:38:50 -0800
committerJunio C Hamano <gitster@pobox.com>2010-01-07 15:38:50 -0800
commit0ad6f1a988312ebc2733126cf17f694d7008659f (patch)
tree56e88bd2ad8499c90c8248a9a2d94c00d30e4366
parentaec7de4bedc0021683f729d88e21c310e0722afd (diff)
parent0a043b1fe5615a1182aceda29da65faebaf6e970 (diff)
downloadgit-0ad6f1a988312ebc2733126cf17f694d7008659f.tar.gz
git-0ad6f1a988312ebc2733126cf17f694d7008659f.tar.xz
Merge branch 'mg/tag-d-show'
* mg/tag-d-show: tag -d: print sha1 of deleted tag
-rw-r--r--builtin-tag.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin-tag.c b/builtin-tag.c
index c4790185e..4ef1c4f50 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' (was %s)\n", name, find_unique_abbrev(sha1, DEFAULT_ABBREV));
return 0;
}
@@ -479,6 +479,8 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
die("%s: cannot lock the ref", ref);
if (write_ref_sha1(lock, object, NULL) < 0)
die("%s: cannot update the ref", ref);
+ if (force && hashcmp(prev, object))
+ printf("Updated tag '%s' (was %s)\n", tag, find_unique_abbrev(prev, DEFAULT_ABBREV));
strbuf_release(&buf);
return 0;