path: root/builtin.h
diff options
authorJeff King <>2010-04-02 00:05:23 (GMT)
committerJunio C Hamano <>2010-04-02 06:53:54 (GMT)
commit40d52ff77b093fa48f58a168f4b0c4e65b862e56 (patch)
tree6b425dfbcbdbe478604dadba8667e39d751f0ee3 /builtin.h
parentb76c056b95ccb15ae3b0723da983914de88b4bae (diff)
make commit_tree a library function
Until now, this has been part of the commit-tree builtin. However, it is already used by other builtins (like commit, merge, and notes), and it would be useful to access it from library code. The check_valid helper has to come along, too, but is given a more library-ish name of "assert_sha1_type". Otherwise, the code is unchanged. There are still a few rough edges for a library function, like printing the utf8 warning to stderr, but we can address those if and when they come up as inappropriate. Signed-off-by: Jeff King <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'builtin.h')
1 files changed, 0 insertions, 3 deletions
diff --git a/builtin.h b/builtin.h
index 464588b..5c887ef 100644
--- a/builtin.h
+++ b/builtin.h
@@ -16,9 +16,6 @@ extern const char *help_unknown_cmd(const char *cmd);
extern void prune_packed_objects(int);
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,
- const char *author);
extern int commit_notes(struct notes_tree *t, const char *msg);
struct notes_rewrite_cfg {