summaryrefslogtreecommitdiff
path: root/builtin.h
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2008-07-01 04:37:49 +0200
committerJunio C Hamano <gitster@pobox.com>2008-07-06 19:23:00 -0700
commit7b9c0a69a5f64fffb5de8b49a96f41ac35b4a84f (patch)
tree8437d36713060c95c714ce8cce49d0e84ee2fa3f /builtin.h
parentc1fb35b98aa36ce789c60520028d95e5f9fee43c (diff)
downloadgit-7b9c0a69a5f64fffb5de8b49a96f41ac35b4a84f.tar.gz
git-commit-tree: make it usable from other builtins
Move all functionality (except option parsing) from cmd_commit_tree() to commit_tree(), so that other builtins can use it without a child process. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin.h')
-rw-r--r--builtin.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/builtin.h b/builtin.h
index 2b01feabcb..05ee56f21b 100644
--- a/builtin.h
+++ b/builtin.h
@@ -3,6 +3,8 @@
#include "git-compat-util.h"
#include "strbuf.h"
+#include "cache.h"
+#include "commit.h"
extern const char git_version_string[];
extern const char git_usage_string[];
@@ -14,6 +16,8 @@ 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 commit_tree(const char *msg, unsigned char *tree,
+ struct commit_list *parents, unsigned char *ret);
extern int cmd_add(int argc, const char **argv, const char *prefix);
extern int cmd_annotate(int argc, const char **argv, const char *prefix);