Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'mg/tag-d-show'
author
Junio C Hamano
<gitster@pobox.com>
Thu, 7 Jan 2010 23:38:50 +0000
(15:38 -0800)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 7 Jan 2010 23:38:50 +0000
(15:38 -0800)
* mg/tag-d-show:
tag -d: print sha1 of deleted tag
builtin-tag.c
patch
|
blob
|
history
raw
(from parent 1:
aec7de4
)
diff --git
a/builtin-tag.c
b/builtin-tag.c
index c4790185ebb9979a6772cf7159d16c2a1deeeaf3..4ef1c4f508b0261e725c360e96f2b8cbed50e9ce 100644
(file)
--- 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;