Re: [PATCH 07/10] git-fmt-merge-msg: make it useable from other builtins
- From
Andreas Ericsson <ae@op5.se>
- Date
- Jun 9, 2008, 08:58 UTC
- Message-ID
- <484CF0B4.6000102@op5.se>
- In-Reply-To
- <2e4b20178405cf993ce9e0f1ffe4ac402a96fd03.1212698317.git.vmiklos@frugalware.org>
Miklos Vajna wrote:
Show 8 quoted lines
> Move all functionality (except config and option parsing) from > cmd_fmt_merge_msg() to fmt_merge_msg(), so that other builtins can use > it without a child process. > > All functions have been changed to use strbufs, and now only > cmd_fmt_merge_msg() reads directly from a file / writes anything to > stdout. >
I have a very nearly identical patch in an ancient offshoot branch since my attempt to make git-pull a builtin (which was stupid as it doesn't do anything CPU-intensive apart from merging).
I likes it. For bonus points you could replace some strbuf_addf() calls with strbuf_addstr() ones, but I don't think anyone really cares.
So, fwiw, Liked-by: Andreas Ericsson <ae@op5.se>
-- Andreas Ericsson andreas.ericsson@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231