t7610: run 'git reset --hard' after each test to clean up
[gitweb.git] / builtin / read-tree.c
index 9bd1fd755ef03824442f6c751a9603b95bfe66ee..fa6edb35b21cede4425746d84b41c8bd9e31e1dc 100644 (file)
@@ -150,7 +150,7 @@ int cmd_read_tree(int argc, const char **argv, const char *unused_prefix)
        argc = parse_options(argc, argv, unused_prefix, read_tree_options,
                             read_tree_usage, 0);
 
-       hold_locked_index(&lock_file, 1);
+       hold_locked_index(&lock_file, LOCK_DIE_ON_ERROR);
 
        prefix_set = opts.prefix ? 1 : 0;
        if (1 < opts.merge + opts.reset + prefix_set)