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

View File

@ -1063,7 +1063,7 @@ static void abbrev_sha1_in_line(struct strbuf *line)
strbuf_addf(split[1], "%s ", abbrev);
strbuf_reset(line);
for (i = 0; split[i]; i++)
strbuf_addf(line, "%s", split[i]->buf);
strbuf_addbuf(line, split[i]);
}
}
strbuf_list_free(split);