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

Re: [PATCH] builtin-tag.c: remove global variable to use the callback data of git-config.

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 17, 2009, 15:47 UTC
Message-ID
<alpine.DEB.1.00.0903171646140.6393@intel-tinevez-2-302>
In-Reply-To
<1237301031.10001.13.camel@equipo-loli>
Hi,
On Tue, 17 Mar 2009, Carlos Rica wrote:
Show 9 quoted lines
> By using strbuf to save the signing-key id, it also imposes no limit
> to the length of the string obtained from the config or command-line.
> This string is then passed to gpg to sign the tag, when appropriate.
> 
> Signed-off-by: Carlos Rica <jasampler@gmail.com>
> ---
> 
> 
> QUESTION: Is it safe to remove this limit?
I think so.  GPG should return an error if it thinks it is too large.
Show 10 quoted lines
> @@ -164,11 +162,10 @@ static int do_sign(struct strbuf *buffer)
>  	int len;
>  	int i, j;
>  
> -	if (!*signingkey) {
> -		if (strlcpy(signingkey, git_committer_info(IDENT_ERROR_ON_NO_NAME),
> -				sizeof(signingkey)) > sizeof(signingkey) - 1)
> -			return error("committer info too long.");
> -		bracket = strchr(signingkey, '>');
> +	if (!signingkey->buf[0]) {

It is probably better to ask for !signingkey->len (think of trying to understand the code in 6 months from now).

Other than that, very nice!

Ciao, Dscho

Previous: Carlos RicaNext: Carlos Rica
Message 2 of 6 in “builtin-tag.c: remove global variable to use the callback data of git-config.”
  1. builtin-tag.c: remove global variable to use the callback data of git-config.Carlos Rica, Mar 17, 2009
  2. Johannes SchindelinMar 17, 2009
  3. Carlos RicaMar 17, 2009
  4. Junio C HamanoMar 17, 2009
  5. Johannes SchindelinMar 17, 2009
  6. Carlos RicaMar 18, 2009

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.