summaryrefslogtreecommitdiff
path: root/path.c
diff options
context:
space:
mode:
authorLibravatar René Scharfe <l.s.r@web.de>2016-07-19 20:36:29 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-07-19 11:48:35 -0700
commit8109984d619467ad26c6a76d59b0a5de8a86e6d6 (patch)
treebf026f0165f1b8268089c4ec0e0bb402e3a6ee15 /path.c
parentGit 2.6.6 (diff)
downloadtgif-8109984d619467ad26c6a76d59b0a5de8a86e6d6.tar.xz
use strbuf_addbuf() for appending a strbuf to another
Use strbuf_addbuf() where possible; it's shorter and more efficient. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'path.c')
-rw-r--r--path.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/path.c b/path.c
index 38f2ebd6bf..e1bc8f04fe 100644
--- a/path.c
+++ b/path.c
@@ -246,7 +246,7 @@ static void do_submodule_path(struct strbuf *buf, const char *path,
strbuf_addstr(buf, git_dir);
}
strbuf_addch(buf, '/');
- strbuf_addstr(&git_submodule_dir, buf->buf);
+ strbuf_addbuf(&git_submodule_dir, buf);
strbuf_vaddf(buf, fmt, args);