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
This commit is contained in:
Junio C Hamano
2016-07-25 14:13:47 -07:00
5 changed files with 11 additions and 8 deletions

2
path.c
View File

@ -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);