mirror of
https://github.com/git/git
synced 2024-08-24 18:26:02 +00:00
checkout: avoid the_index when possible
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
3a95f31d1c
commit
fb4a8464a6
|
@ -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"));
|
||||
|
||||
|
|
Loading…
Reference in a new issue