From: Junio C Hamano Date: Thu, 10 Nov 2011 17:05:31 +0000 (-0800) Subject: Merge 'build-in git-mktree' X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=77f143bf3e218857ec8e5244d7e862e8e0c1a041;p=git.git Merge 'build-in git-mktree' * commit '633e3556ccbc': (5835 commits) build-in git-mktree allow -t abbreviation for --track in git branch gitweb: Remove function prototypes (cleanup) Documentation: cloning to empty directory is allowed Clarify kind of conflict in merge-one-file helper git config: clarify --add and --get-color archive-tar.c: squelch a type mismatch warning Start 1.6.4 development Start 1.6.3.1 maintenance series. GIT 1.6.3 t4029: use sh instead of bash t4200: convert sed expression which operates on non-text file to perl t4200: remove two unnecessary lines t/annotate-tests.sh: avoid passing a non-newline terminated file to sed t4118: avoid sed invocation on file without terminating newline t4118: add missing '&&' t8005: use egrep when extended regular expressions are required git-clean doc: the command only affects paths under $(cwd) improve error message in config.c t4018-diff-funcname: add cpp xfuncname pattern to syntax test ... --- 77f143bf3e218857ec8e5244d7e862e8e0c1a041 diff --cc builtin-mktree.c index bb23c4425b,3d054272d5..9ae7a77890 --- a/builtin-mktree.c +++ b/builtin-mktree.c @@@ -61,14 -59,14 +59,15 @@@ static void write_tree(unsigned char *s } write_sha1_file(buf.buf, buf.len, tree_type, sha1); + strbuf_release(&buf); } - static const char mktree_usage[] = "git-mktree [-z]"; + static const char mktree_usage[] = "git mktree [-z]"; - int main(int ac, char **av) + int cmd_mktree(int ac, const char **av, const char *prefix) { - struct strbuf sb; + struct strbuf sb = STRBUF_INIT; + struct strbuf p_uq = STRBUF_INIT; unsigned char sha1[20]; int line_termination = '\n';