path: root/builtin.h
diff options
authorMiklos Vajna <>2008-06-27 16:21:59 (GMT)
committerJunio C Hamano <>2008-07-01 05:45:51 (GMT)
commit0b9a969e0fbb0a09e9de931cfe27005cbfd6cb7d (patch)
treef12d3e5c856a1242ebea94bb8cb0af8194809ecd /builtin.h
parente46bbcf6e89e4b1d3d8de1d20d836538ab0f0c85 (diff)
git-fmt-merge-msg: make it usable from other builtins
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. Signed-off-by: Miklos Vajna <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'builtin.h')
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin.h b/builtin.h
index b460b2d..2b01fea 100644
--- a/builtin.h
+++ b/builtin.h
@@ -2,6 +2,7 @@
#define BUILTIN_H
#include "git-compat-util.h"
+#include "strbuf.h"
extern const char git_version_string[];
extern const char git_usage_string[];
@@ -11,6 +12,8 @@ extern void list_common_cmds_help(void);
extern void help_unknown_cmd(const char *cmd);
extern void prune_packed_objects(int);
extern int read_line_with_nul(char *buf, int size, FILE *file);
+extern int fmt_merge_msg(int merge_summary, struct strbuf *in,
+ struct strbuf *out);
extern int cmd_add(int argc, const char **argv, const char *prefix);
extern int cmd_annotate(int argc, const char **argv, const char *prefix);