Skip to content

Commit

Permalink
Merge branch 'mg/tag-d-show'
Browse files Browse the repository at this point in the history
* mg/tag-d-show:
  tag -d: print sha1 of deleted tag
  • Loading branch information
Junio C Hamano committed Jan 7, 2010
2 parents aec7de4 + 0a043b1 commit 0ad6f1a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion builtin-tag.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 0ad6f1a

Please sign in to comment.