Skip to content

Commit fb4a846

Browse files
pcloudsgitster
authored andcommitted
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>
1 parent 3a95f31 commit fb4a846

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/checkout.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ static int checkout_paths(const struct checkout_opts *opts,
284284
return run_add_interactive(revision, "--patch=checkout",
285285
&opts->pathspec);
286286

287-
hold_locked_index(&lock_file, LOCK_DIE_ON_ERROR);
287+
repo_hold_locked_index(the_repository, &lock_file, LOCK_DIE_ON_ERROR);
288288
if (read_cache_preload(&opts->pathspec) < 0)
289289
return error(_("index file corrupt"));
290290

0 commit comments

Comments
 (0)