aboutsummaryrefslogtreecommitdiff
path: root/path.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-07-25 14:13:47 -0700
committerJunio C Hamano <gitster@pobox.com>2016-07-25 14:13:47 -0700
commitb4e8a847ba4e775fb7d422b2daf18356db50eec8 (patch)
treeb7beddae0b6b9800c8a40dfc6b4be33764b6a4a6 /path.c
parent7b01ab562ae14f5e5aedf0c0e769c74925a19809 (diff)
parent31471ba21ee29886ab856981e52f723c913d7f40 (diff)
downloadgit-b4e8a847ba4e775fb7d422b2daf18356db50eec8.tar.gz
git-b4e8a847ba4e775fb7d422b2daf18356db50eec8.tar.xz
Merge branch 'rs/use-strbuf-addbuf'
Code cleanup. * rs/use-strbuf-addbuf: strbuf: avoid calling strbuf_grow() twice in strbuf_addbuf() use strbuf_addbuf() for appending a strbuf to another
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 259aeed84..17551c483 100644
--- a/path.c
+++ b/path.c
@@ -483,7 +483,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);