summaryrefslogtreecommitdiff
path: root/http.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2016-08-05 20:37:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-08-05 22:09:25 (GMT)
commitbc57b9c0cc5a123365a922fa1831177e3fd607ed (patch)
tree520d65d7a99278bbec6e1b2e25e5e045d2ac28b0 /http.c
parent02962d36845b89145cd69f8bc65e015d78ae3434 (diff)
downloadgit-bc57b9c0cc5a123365a922fa1831177e3fd607ed.zip
git-bc57b9c0cc5a123365a922fa1831177e3fd607ed.tar.gz
git-bc57b9c0cc5a123365a922fa1831177e3fd607ed.tar.bz2
use strbuf_addstr() instead of strbuf_addf() with "%s"
Call strbuf_addstr() for adding a simple string to a strbuf instead of using the heavier strbuf_addf(). This is shorter and documents the intent more clearly. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http.c')
-rw-r--r--http.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/http.c b/http.c
index df6dd01..d8e427b 100644
--- a/http.c
+++ b/http.c
@@ -1105,7 +1105,7 @@ void append_remote_object_url(struct strbuf *buf, const char *url,
strbuf_addf(buf, "objects/%.*s/", 2, hex);
if (!only_two_digit_prefix)
- strbuf_addf(buf, "%s", hex+2);
+ strbuf_addstr(buf, hex + 2);
}
char *get_remote_object_url(const char *url, const char *hex,