]> git.ipfire.org Git - thirdparty/git.git/commit - commit.c
make commit_tree a library function
authorJeff King <peff@peff.net>
Fri, 2 Apr 2010 00:05:23 +0000 (20:05 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 2 Apr 2010 06:53:54 +0000 (23:53 -0700)
commit40d52ff77b093fa48f58a168f4b0c4e65b862e56
tree6b425dfbcbdbe478604dadba8667e39d751f0ee3
parentb76c056b95ccb15ae3b0723da983914de88b4bae
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 <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin.h
builtin/commit-tree.c
cache.h
commit.c
commit.h
sha1_file.c