Merge branch 'rs/use-strbuf-addbuf' into maint
authorJunio C Hamano <gitster@pobox.com>
Mon, 8 Aug 2016 21:21:42 +0000 (14:21 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 8 Aug 2016 21:21:42 +0000 (14:21 -0700)
Code cleanup.

* rs/use-strbuf-addbuf:
strbuf: avoid calling strbuf_grow() twice in strbuf_addbuf()
use strbuf_addbuf() for appending a strbuf to another

1  2 
dir.c
path.c
strbuf.c
strbuf.h
wt-status.c
diff --cc dir.c
Simple merge
diff --cc path.c
Simple merge
diff --cc strbuf.c
Simple merge
diff --cc strbuf.h
Simple merge
diff --cc wt-status.c
index 4ce4e35ac3f3542c42c9f71e7bb3f0c5e2c67492,51c0d7fea745c05471527a0f28011c4db32dd822..617a28430449b8df19815c31f860338ec98f8c31
@@@ -1062,10 -1060,12 +1062,10 @@@ static void abbrev_sha1_in_line(struct 
                        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]);
                }
        }
 -      for (i = 0; split[i]; i++)
 -              strbuf_release(split[i]);
 -
 +      strbuf_list_free(split);
  }
  
  static void read_rebase_todolist(const char *fname, struct string_list *lines)