run-command: use strbuf_addstr() for adding a string to a strbuf
PATCH 1/1 run-command: use strbuf_addstr() for adding a string to a strbuf
Patch generated with Coccinelle and contrib/coccinelle/strbuf.cocci.
Signed-off-by Rene Scharfe <[email protected]>
---
That line was added by e73dd78699 (run-command.c: introduce trace_run_command()).
run-command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
run-command.c +1 -1
@@ -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);
Signature · 1 line
2.16.3
Quoted 6 lines · René Scharfe
Patch generated with Coccinelle and
contrib/coccinelle/strbuf.cocci.Signed-off-by Rene Scharfe <[email protected]>---
That line was added bye73dd78699(run-command.c: introducetrace_run_command()).
Thanks.
Quoted 17 lines
run-command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)run-command.c +1
-1@@ -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);
Quoted 15 lines · René Scharfe
Patch generated with Coccinelle and
contrib/coccinelle/strbuf.cocci.Signed-off-by Rene Scharfe <[email protected]>---
That line was added bye73dd78699(run-command.c: introducetrace_run_command()).run-command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)run-command.c +0
-0
run-command.c static void trace_run_command(const struct child_process *cp) · line 624
Quoted 5 lines
run-command.c +1
-1@@ -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.
Quoted 5 lines
run-command.c +0
-1if (cp->dir) {strbuf_addstr (&buf," cd " );sq_quote_buf_pretty (&buf, cp->dir); --2.16.3
Signature · 1 line
Duy