diff --git a/builtin-commit-tree.c b/builtin-commit-tree.c
index bc9502c13525759f92c39e77f18edbb355305ab1..88b0ab36eba6ded8f1a39e0d4c83122b7e026874 100644 (file)
--- a/builtin-commit-tree.c
+++ b/builtin-commit-tree.c
#include "tree.h"
#include "builtin.h"
#include "utf8.h"
-#include "strbuf.h"
#define BLOCKING (1ul << 14)
/* Not having i18n.commitencoding is the same as having utf-8 */
encoding_is_utf8 = is_encoding_utf8(git_commit_encoding);
- strbuf_init(&buffer);
- strbuf_grow(&buffer, 8192); /* should avoid reallocs for the headers */
+ strbuf_init(&buffer, 8192); /* should avoid reallocs for the headers */
strbuf_addf(&buffer, "tree %s\n", sha1_to_hex(tree_sha1));
/*
strbuf_addch(&buffer, '\n');
/* And add the comment */
- if (strbuf_read(&buffer, 0) < 0)
+ if (strbuf_read(&buffer, 0, 0) < 0)
die("git-commit-tree: read returned %s", strerror(errno));
/* And check the encoding */