Merge branch 'mv/commit-tree'
authorShawn O. Pearce <spearce@spearce.org>
Thu, 25 Sep 2008 16:16:33 +0000 (09:16 -0700)
committerShawn O. Pearce <spearce@spearce.org>
Thu, 25 Sep 2008 16:16:33 +0000 (09:16 -0700)
* mv/commit-tree:
t7603: add new testcases to ensure builtin-commit uses reduce_heads()
builtin-commit: use commit_tree()
commit_tree(): add a new author parameter

1  2 
builtin-merge.c
diff --combined builtin-merge.c
index 1094c5fd58bdd3a91ee8c9e76ebcadf72d66f726,4a8ec604d390d0b600ee7a6b3d5b74975dbf87d3..1942e72aaf20b10bd8069ef3a736fcc3c4732753
@@@ -476,8 -476,6 +476,8 @@@ static int git_merge_config(const char 
  
                buf = xstrdup(v);
                argc = split_cmdline(buf, &argv);
 +              if (argc < 0)
 +                      die("Bad branch.%s.mergeoptions string", branch);
                argv = xrealloc(argv, sizeof(*argv) * (argc + 2));
                memmove(argv + 1, argv, sizeof(*argv) * (argc + 1));
                argc++;
@@@ -693,7 -691,7 +693,7 @@@ static int merge_trivial(void
        parent->next = xmalloc(sizeof(struct commit_list *));
        parent->next->item = remoteheads->item;
        parent->next->next = NULL;
-       commit_tree(merge_msg.buf, result_tree, parent, result_commit);
+       commit_tree(merge_msg.buf, result_tree, parent, result_commit, NULL);
        finish(result_commit, "In-index merge");
        drop_save();
        return 0;
@@@ -722,7 -720,7 +722,7 @@@ static int finish_automerge(struct comm
        }
        free_commit_list(remoteheads);
        strbuf_addch(&merge_msg, '\n');
-       commit_tree(merge_msg.buf, result_tree, parents, result_commit);
+       commit_tree(merge_msg.buf, result_tree, parents, result_commit, NULL);
        strbuf_addf(&buf, "Merge made by %s.", wt_strategy);
        finish(result_commit, buf.buf);
        strbuf_release(&buf);