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

Re: [PATCH] run-command: use strbuf_addstr() for adding a string to a strbuf

From
Duy Nguyen <pclouds@gmail.com>
Date
Mar 25, 2018, 16:49 UTC
Message-ID
<CACsJy8C+JDqfg2a3Ju-rb8n+ovUsoXsn0P7vqJZ71PQ38Fs8gg@mail.gmail.com>
In-Reply-To
<19c993cf-7220-42e1-6a76-d257d97d6f55@web.de>
On Sun, Mar 25, 2018 at 12:57 PM, René Scharfe <l.s.r@web.de> wrote:
Show 20 quoted lines
> Patch generated with Coccinelle and contrib/coccinelle/strbuf.cocci.
>
> Signed-off-by: Rene Scharfe <l.s.r@web.de>
> ---
> That line was added by e73dd78699 (run-command.c: introduce
> trace_run_command()).
>
>  run-command.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/run-command.c b/run-command.c
> index a483d5904a..84899e423f 100644
> --- a/run-command.c
> +++ b/run-command.c
> @@ -621,7 +621,7 @@ static void trace_run_command(const struct child_process *cp)
>         if (!trace_want(&trace_default_key))
>                 return;
>
> -       strbuf_addf(&buf, "trace: run_command:");
> +       strbuf_addstr(&buf, "trace: run_command:");
Obviously correct. Ack.
Show 5 quoted lines
>         if (cp->dir) {
>                 strbuf_addstr(&buf, " cd ");
>                 sq_quote_buf_pretty(&buf, cp->dir);
> --
> 2.16.3
-- 
Duy
Previous: Junio C Hamano
Message 3 of 3 in “run-command: use strbuf_addstr() for adding a string to a strbuf”
  1. run-command: use strbuf_addstr() for adding a string to a strbufRené Scharfe, Mar 25, 2018
  2. Junio C HamanoMar 25, 2018
  3. Duy NguyenMar 25, 2018

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.