diff options
Diffstat (limited to 'builtin/read-tree.c')
-rw-r--r-- | builtin/read-tree.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/builtin/read-tree.c b/builtin/read-tree.c index 24d6d156d3..6f89cec0fb 100644 --- a/builtin/read-tree.c +++ b/builtin/read-tree.c @@ -16,14 +16,12 @@ #include "tree-walk.h" #include "cache-tree.h" #include "unpack-trees.h" -#include "dir.h" #include "parse-options.h" #include "repository.h" #include "resolve-undo.h" #include "setup.h" #include "sparse-index.h" #include "submodule.h" -#include "submodule-config.h" static int nr_trees; static int read_empty; @@ -49,7 +47,7 @@ static const char * const read_tree_usage[] = { NULL }; -static int index_output_cb(const struct option *opt, const char *arg, +static int index_output_cb(const struct option *opt UNUSED, const char *arg, int unset) { BUG_ON_OPT_NEG(unset); @@ -263,7 +261,8 @@ int cmd_read_tree(int argc, const char **argv, const char *cmd_prefix) cache_tree_free(&the_index.cache_tree); for (i = 0; i < nr_trees; i++) { struct tree *tree = trees[i]; - parse_tree(tree); + if (parse_tree(tree) < 0) + return 128; init_tree_desc(t+i, &tree->object.oid, tree->buffer, tree->size); } if (unpack_trees(nr_trees, t, &opts)) |