X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=merge-recursive.c;h=0804eb44e7974462d9e5a84e708e23e406628399;hb=93f0d33818e94464a581209b4a102dac59db202a;hp=db9ba19ddf94fec3a5cfff450b35f5bb7b46c35e;hpb=cd145e72f3c1539e5817cfcf03a5f9fed3685f48;p=git.git diff --git a/merge-recursive.c b/merge-recursive.c index db9ba19dd..0804eb44e 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -1601,12 +1601,10 @@ int merge_recursive(struct merge_options *o, merged_common_ancestors = pop_commit(&ca); if (merged_common_ancestors == NULL) { - /* if there is no common ancestor, make an empty tree */ - struct tree *tree = xcalloc(1, sizeof(struct tree)); + /* if there is no common ancestor, use an empty tree */ + struct tree *tree; - tree->object.parsed = 1; - tree->object.type = OBJ_TREE; - pretend_sha1_file(NULL, 0, OBJ_TREE, tree->object.sha1); + tree = lookup_tree((const unsigned char *)EMPTY_TREE_SHA1_BIN); merged_common_ancestors = make_virtual_commit(tree, "ancestor"); } @@ -1759,6 +1757,8 @@ int parse_merge_opt(struct merge_options *o, const char *s) o->subtree_shift = s + strlen("subtree="); else if (!strcmp(s, "patience")) o->xdl_opts |= XDF_PATIENCE_DIFF; + else if (!strcmp(s, "histogram")) + o->xdl_opts |= XDF_HISTOGRAM_DIFF; else if (!strcmp(s, "ignore-space-change")) o->xdl_opts |= XDF_IGNORE_WHITESPACE_CHANGE; else if (!strcmp(s, "ignore-all-space"))