summaryrefslogtreecommitdiff
path: root/builtin/tag.c
diff options
context:
space:
mode:
authorThorsten Glaser <tg@debian.org>2013-08-29 22:03:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-05-07 21:25:25 (GMT)
commitd78f340ed6250dfe8de6e039acc56a013bcf3637 (patch)
tree9275e5acc098d2c482b2cb36b7146b810fb43e51 /builtin/tag.c
parent0bc85abb7aa9b24b093253018801a0fb43d01122 (diff)
downloadgit-d78f340ed6250dfe8de6e039acc56a013bcf3637.zip
git-d78f340ed6250dfe8de6e039acc56a013bcf3637.tar.gz
git-d78f340ed6250dfe8de6e039acc56a013bcf3637.tar.bz2
builtin/tag.c: show tag name to hint in the message editor
Display the tag name about to be added to the user during interactive editing. Signed-off-by: Thorsten Glaser <tg@debian.org> Signed-off-by: Richard Hartmann <richih@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/tag.c')
-rw-r--r--builtin/tag.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin/tag.c b/builtin/tag.c
index 74d3780..8f1a0c1 100644
--- a/builtin/tag.c
+++ b/builtin/tag.c
@@ -246,11 +246,11 @@ static int do_sign(struct strbuf *buffer)
}
static const char tag_template[] =
- N_("\nWrite a tag message\n"
+ N_("\nWrite a message for tag:\n %s\n"
"Lines starting with '%c' will be ignored.\n");
static const char tag_template_nocleanup[] =
- N_("\nWrite a tag message\n"
+ N_("\nWrite a message for tag:\n %s\n"
"Lines starting with '%c' will be kept; you may remove them"
" yourself if you want to.\n");
@@ -346,9 +346,9 @@ static void create_tag(const unsigned char *object, const char *tag,
struct strbuf buf = STRBUF_INIT;
strbuf_addch(&buf, '\n');
if (opt->cleanup_mode == CLEANUP_ALL)
- strbuf_commented_addf(&buf, _(tag_template), comment_line_char);
+ strbuf_commented_addf(&buf, _(tag_template), tag, comment_line_char);
else
- strbuf_commented_addf(&buf, _(tag_template_nocleanup), comment_line_char);
+ strbuf_commented_addf(&buf, _(tag_template_nocleanup), tag, comment_line_char);
write_or_die(fd, buf.buf, buf.len);
strbuf_release(&buf);
}