Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-08-13 19:14:32 +0300
committerJunio C Hamano <gitster@pobox.com>2018-08-14 00:14:43 +0300
commit74cfc0ee1d0b4e386b5a07f8b79fbcece94cdff8 (patch)
treed72727b10a63cbd35dd17bec03e3517d6cd9465c /builtin/checkout-index.c
parent68f08b4b235d09a95604c6bc8349208b37a2f41e (diff)
entry.c: use the right index instead of the_index
checkout-index.c needs update because if checkout->istate is NULL, ie_match_stat() will crash. Previously this is ie_match_stat(&the_index, ..) so it will not crash, but it is not technically correct either. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/checkout-index.c')
-rw-r--r--builtin/checkout-index.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/checkout-index.c b/builtin/checkout-index.c
index a730f6a1aa4..d92db62fbdf 100644
--- a/builtin/checkout-index.c
+++ b/builtin/checkout-index.c
@@ -190,6 +190,7 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix)
argc = parse_options(argc, argv, prefix, builtin_checkout_index_options,
builtin_checkout_index_usage, 0);
+ state.istate = &the_index;
state.force = force;
state.quiet = quiet;
state.not_new = not_new;