Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
checkout: avoid the_index when possible
author
Nguyễn Thái Ngọc Duy
<pclouds@gmail.com>
Sat, 12 Jan 2019 02:13:25 +0000
(09:13 +0700)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 14 Jan 2019 20:13:04 +0000
(12:13 -0800)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/checkout.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
3a95f31
)
diff --git
a/builtin/checkout.c
b/builtin/checkout.c
index 08b0ac48f30fd952fe57376a8e8b0d61f8bc1ad6..1b672a9fd916f4271d644ed8d73c04c75b98aa4e 100644
(file)
--- 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"));