diff mbox series

[v2,04/11] checkout: avoid the_index when possible

Message ID 20190112021332.11066-5-pclouds@gmail.com (mailing list archive)
State New, archived
Headers show
Series Remove the_index, the final part | expand

Commit Message

Duy Nguyen Jan. 12, 2019, 2:13 a.m. UTC
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 builtin/checkout.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/builtin/checkout.c b/builtin/checkout.c
index 08b0ac48f3..1b672a9fd9 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -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"));