Skip to content
  • Jeff King's avatar
    make commit_tree a library function · 40d52ff7
    Jeff King authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    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: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    40d52ff7