git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] run-command: use strbuf_addstr() for adding a string to a strbuf
@ 2018-03-25 10:57 René Scharfe
  2018-03-25 16:49 ` Junio C Hamano
  2018-03-25 16:49 ` Duy Nguyen
  0 siblings, 2 replies; 3+ messages in thread
From: René Scharfe @ 2018-03-25 10:57 UTC (permalink / raw)
  To: Git List; +Cc: Nguyễn Thái Ngọc Duy, Junio C Hamano

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:");
 	if (cp->dir) {
 		strbuf_addstr(&buf, " cd ");
 		sq_quote_buf_pretty(&buf, cp->dir);
-- 
2.16.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] run-command: use strbuf_addstr() for adding a string to a strbuf
  2018-03-25 10:57 [PATCH] run-command: use strbuf_addstr() for adding a string to a strbuf René Scharfe
@ 2018-03-25 16:49 ` Junio C Hamano
  2018-03-25 16:49 ` Duy Nguyen
  1 sibling, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2018-03-25 16:49 UTC (permalink / raw)
  To: René Scharfe; +Cc: Git List, Nguyễn Thái Ngọc Duy

René Scharfe <l.s.r@web.de> writes:

> 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()).

Thanks.

>
>  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:");
>  	if (cp->dir) {
>  		strbuf_addstr(&buf, " cd ");
>  		sq_quote_buf_pretty(&buf, cp->dir);

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] run-command: use strbuf_addstr() for adding a string to a strbuf
  2018-03-25 10:57 [PATCH] run-command: use strbuf_addstr() for adding a string to a strbuf René Scharfe
  2018-03-25 16:49 ` Junio C Hamano
@ 2018-03-25 16:49 ` Duy Nguyen
  1 sibling, 0 replies; 3+ messages in thread
From: Duy Nguyen @ 2018-03-25 16:49 UTC (permalink / raw)
  To: René Scharfe; +Cc: Git List, Junio C Hamano

On Sun, Mar 25, 2018 at 12:57 PM, René Scharfe <l.s.r@web.de> wrote:
> 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.

>         if (cp->dir) {
>                 strbuf_addstr(&buf, " cd ");
>                 sq_quote_buf_pretty(&buf, cp->dir);
> --
> 2.16.3



-- 
Duy

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-03-25 16:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-25 10:57 [PATCH] run-command: use strbuf_addstr() for adding a string to a strbuf René Scharfe
2018-03-25 16:49 ` Junio C Hamano
2018-03-25 16:49 ` Duy Nguyen

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).