Documentation: help: explain 'man.viewer' multiple values
[gitweb.git] / builtin-commit.c
index 065e1f7b7fbf426210d08062800ed81448a30d4a..660a3458f7f4ef24dfa4fd5bdf902174da1eefb4 100644 (file)
@@ -198,6 +198,8 @@ static void create_base_index(void)
        opts.head_idx = 1;
        opts.index_only = 1;
        opts.merge = 1;
+       opts.src_index = &the_index;
+       opts.dst_index = &the_index;
 
        opts.fn = oneway_merge;
        tree = parse_tree_indirect(head_sha1);
@@ -205,7 +207,8 @@ static void create_base_index(void)
                die("failed to unpack HEAD tree object");
        parse_tree(tree);
        init_tree_desc(&t, tree->buffer, tree->size);
-       unpack_trees(1, &t, &opts);
+       if (unpack_trees(1, &t, &opts))
+               exit(128); /* We've already reported the error, finish dying */
 }
 
 static char *prepare_index(int argc, const char **argv, const char *prefix)