Skip to content

Commit 43eb7cb

Browse files
committed
Merge branch 'tg/tag-state-tag-name-in-editor-hints'
* tg/tag-state-tag-name-in-editor-hints: builtin/tag.c: show tag name to hint in the message editor
2 parents d83c9c7 + d78f340 commit 43eb7cb

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
@@ -338,11 +338,11 @@ static int do_sign(struct strbuf *buffer)
338338
}
339339

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

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

@@ -438,9 +438,9 @@ static void create_tag(const unsigned char *object, const char *tag,
438438
struct strbuf buf = STRBUF_INIT;
439439
strbuf_addch(&buf, '\n');
440440
if (opt->cleanup_mode == CLEANUP_ALL)
441-
strbuf_commented_addf(&buf, _(tag_template), comment_line_char);
441+
strbuf_commented_addf(&buf, _(tag_template), tag, comment_line_char);
442442
else
443-
strbuf_commented_addf(&buf, _(tag_template_nocleanup), comment_line_char);
443+
strbuf_commented_addf(&buf, _(tag_template_nocleanup), tag, comment_line_char);
444444
write_or_die(fd, buf.buf, buf.len);
445445
strbuf_release(&buf);
446446
}

0 commit comments

Comments
 (0)