From: Junio C Hamano Date: Tue, 31 Jul 2007 04:43:19 GMT Subject: Re: [PATCH 5/5] Split out the actual commit creation from the option parsing etc. Message-ID: <7v8x8xgp3s.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <11858309332705-git-send-email-krh@redhat.com> Kristian Høgsberg writes: > @@ -85,40 +129,20 @@ int cmd_commit_tree(int argc, const char **argv, const char *prefix) > parents++; > } > > - /* Not having i18n.commitencoding is the same as having utf-8 */ > - encoding_is_utf8 = is_encoding_utf8(git_commit_encoding); > + buffer = NULL; > + if (read_fd(0, &buffer, &len)) > + die("Could not read commit message from standard input"); > > - strbuf_init(&sb); > - strbuf_printf(&sb, "tree %s\n", sha1_to_hex(tree_sha1)); > + commit_sha1 = create_commit(tree_sha1, > + parent_sha1, parents, > + xstrdup(git_author_info(1)), > + xstrdup(git_committer_info(1)), > + buffer, len); Hmph, the series was so nice so far, but here we have a few new leak, presumably so small per process invocation that we do not care about?