t7610: run 'git reset --hard' after each test to clean up
[gitweb.git] / builtin / read-tree.c
index 8c693e756852ef2ec3aac3bfc77d71c6258a8306..fa6edb35b21cede4425746d84b41c8bd9e31e1dc 100644 (file)
@@ -78,7 +78,7 @@ static void debug_stage(const char *label, const struct cache_entry *ce,
        else
                printf("%06o #%d %s %.8s\n",
                       ce->ce_mode, ce_stage(ce), ce->name,
-                      sha1_to_hex(ce->sha1));
+                      oid_to_hex(&ce->oid));
 }
 
 static int debug_merge(const struct cache_entry * const *stages,
@@ -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)