/
uis
/
git
/
x
/
uis
/
git
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3a95f31
)
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
|
blame
|
history
diff --git
a/builtin/checkout.c
b/builtin/checkout.c
index
08b0ac4
..
1b672a9
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"));