Skip to content

Commit d78f340

Browse files
mirabilosgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Richard Hartmann <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0bc85ab commit d78f340

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

builtin/tag.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -246,11 +246,11 @@ static int do_sign(struct strbuf *buffer)
246246
}
247247

248248
static const char tag_template[] =
249-
N_("\nWrite a tag message\n"
249+
N_("\nWrite a message for tag:\n %s\n"
250250
"Lines starting with '%c' will be ignored.\n");
251251

252252
static const char tag_template_nocleanup[] =
253-
N_("\nWrite a tag message\n"
253+
N_("\nWrite a message for tag:\n %s\n"
254254
"Lines starting with '%c' will be kept; you may remove them"
255255
" yourself if you want to.\n");
256256

@@ -346,9 +346,9 @@ static void create_tag(const unsigned char *object, const char *tag,
346346
struct strbuf buf = STRBUF_INIT;
347347
strbuf_addch(&buf, '\n');
348348
if (opt->cleanup_mode == CLEANUP_ALL)
349-
strbuf_commented_addf(&buf, _(tag_template), comment_line_char);
349+
strbuf_commented_addf(&buf, _(tag_template), tag, comment_line_char);
350350
else
351-
strbuf_commented_addf(&buf, _(tag_template_nocleanup), comment_line_char);
351+
strbuf_commented_addf(&buf, _(tag_template_nocleanup), tag, comment_line_char);
352352
write_or_die(fd, buf.buf, buf.len);
353353
strbuf_release(&buf);
354354
}

0 commit comments

Comments
 (0)