summaryrefslogtreecommitdiff
path: root/builtin/rev-parse.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2016-07-30 17:36:23 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-08-01 20:42:10 (GMT)
commit02962d36845b89145cd69f8bc65e015d78ae3434 (patch)
treef832d2d16e20f08f3f886ac7e6bc1b1bfb127524 /builtin/rev-parse.c
parent08df31eeccfe1576971ea4ba42570a424c3cfc41 (diff)
downloadgit-02962d36845b89145cd69f8bc65e015d78ae3434.zip
git-02962d36845b89145cd69f8bc65e015d78ae3434.tar.gz
git-02962d36845b89145cd69f8bc65e015d78ae3434.tar.bz2
use strbuf_addstr() for adding constant strings to a strbuf
Replace uses of strbuf_addf() for adding strings with more lightweight strbuf_addstr() calls. In http-push.c it becomes easier to see what's going on without having to verfiy that the definition of PROPFIND_ALL_REQUEST doesn't contain any format specifiers. Signed-off-by: Rene Scharfe <l.s.r@web.de> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/rev-parse.c')
-rw-r--r--builtin/rev-parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c
index c961b74..76cf05e 100644
--- a/builtin/rev-parse.c
+++ b/builtin/rev-parse.c
@@ -469,7 +469,7 @@ static int cmd_parseopt(int argc, const char **argv, const char *prefix)
(stop_at_non_option ? PARSE_OPT_STOP_AT_NON_OPTION : 0) |
PARSE_OPT_SHELL_EVAL);
- strbuf_addf(&parsed, " --");
+ strbuf_addstr(&parsed, " --");
sq_quote_argv(&parsed, argv, 0);
puts(parsed.buf);
return 0;