From: Nguyễn Thái Ngọc Duy Date: Sat, 05 Jan 2019 05:51:46 GMT Subject: [PATCH 03/10] checkout: avoid the_index when possible Message-ID: <20190105055153.3256-4-pclouds@gmail.com> In-Reply-To: <20190105055153.3256-1-pclouds@gmail.com> Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/checkout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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")); -- 2.20.0.482.g66447595a7