unpack-objects: fix --strict handling
[gitweb.git] / builtin-commit.c
index 065e1f7b7fbf426210d08062800ed81448a30d4a..f49c22e64255225e492614bb628c1d1776521424 100644 (file)
@@ -205,7 +205,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)