sha1-name.c: remove implicit dependency on the_index
[gitweb.git] / builtin / checkout.c
index 08b0ac48f30fd952fe57376a8e8b0d61f8bc1ad6..1b672a9fd916f4271d644ed8d73c04c75b98aa4e 100644 (file)
@@ -284,7 +284,7 @@ static int checkout_paths(const struct checkout_opts *opts,
                return run_add_interactive(revision, "--patch=checkout",
                                           &opts->pathspec);
 
-       hold_locked_index(&lock_file, LOCK_DIE_ON_ERROR);
+       repo_hold_locked_index(the_repository, &lock_file, LOCK_DIE_ON_ERROR);
        if (read_cache_preload(&opts->pathspec) < 0)
                return error(_("index file corrupt"));