Merge 'build-in git-mktree'
authorJunio C Hamano <gitster@pobox.com>
Thu, 10 Nov 2011 17:05:31 +0000 (09:05 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 10 Nov 2011 17:05:31 +0000 (09:05 -0800)
* 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
  ...

1  2 
builtin-mktree.c

index bb23c4425b483317c3cbe4775c10b967a2822af4,3d054272d5f34e310fa619f183e46ee3a91ede75..9ae7a77890c70ecdd66c2739df7c6d348f6f415c
@@@ -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';