From: Nguyễn Thái Ngọc Duy Date: Fri, 19 Oct 2018 14:52:28 GMT Subject: [PATCH 10/19] checkout: avoid the_index when possible Message-ID: <20181019145237.16079-11-pclouds@gmail.com> In-Reply-To: <20181019145237.16079-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 acdafc6e4c..38b28c20e2 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.19.1.647.g708186aaf9