git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] builtin/tag.c: Add tag name to user message

From
Junio C Hamano <gitster@pobox.com>
Date
May 7, 2014, 21:24 UTC
Message-ID
<xmqqy4yd704c.fsf@gitster.dls.corp.google.com>
In-Reply-To
<201405070749.s477nvCL000897@herc.mirbsd.org>
Thorsten Glaser <tg@debian.org> writes:
Show 6 quoted lines
> 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>
> ---
Sounds sensible from a first glance.  Will queue; thanks.
Show 33 quoted lines
>  builtin/tag.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/builtin/tag.c b/builtin/tag.c
> index 6c7c6bd..8a7265b 100644
> --- a/builtin/tag.c
> +++ b/builtin/tag.c
> @@ -278,11 +278,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");
>  
> @@ -378,9 +378,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);
>  		}
Previous: Thorsten Glaser
Message 2 of 2 in “builtin/tag.c: Add tag name to user message”
  1. builtin/tag.c: Add tag name to user messageThorsten Glaser, Aug 29, 2013
  2. Junio C HamanoMay 7, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.