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

Re: [PATCH] builtin/log.c: prepend "RFC" on --rfc

From
Drew DeVault <sir@cmpwn.com>
Date
Aug 28, 2023, 14:49 UTC
Message-ID
<CV49EUBH6USG.TQMTR5HU2OGD@taiga>
In-Reply-To
<20230828144215.GA2537587@coredump.intra.peff.net>
On Mon Aug 28, 2023 at 4:42 PM CEST, Jeff King wrote:
Show 17 quoted lines
>  static int rfc_callback(const struct option *opt, const char *arg, int unset)
>  {
> +	/*
> +	 * "avoid" leak by holding on to a reference to the memory, since we
> +	 * need the string for the lifetime of the process anyway
> +	 */
> +	static char *prefix;
> +
>  	BUG_ON_OPT_NEG(unset);
>  	BUG_ON_OPT_ARG(arg);
> -	return subject_prefix_callback(opt, "RFC PATCH", unset);
> +
> +	free(prefix);
> +	prefix = xstrfmt("RFC %s", ((struct rev_info *)opt->value)->subject_prefix);
> +
> +	return subject_prefix_callback(opt, prefix, unset);
>  }
I like this better, thanks!
Previous: Jeff KingNext: Phillip Wood
Message 3 of 7 in “builtin/log.c: prepend "RFC" on --rfc”
  1. builtin/log.c: prepend "RFC" on --rfcDrew DeVault, Aug 28, 2023
  2. Jeff KingAug 28, 2023
  3. Drew DeVaultAug 28, 2023
  4. Phillip WoodAug 28, 2023
  5. Jeff KingAug 28, 2023
  6. Junio C HamanoAug 28, 2023
  7. Junio C HamanoAug 28, 2023

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.