summaryrefslogtreecommitdiff
path: root/builtin/checkout-index.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-08-13 16:14:32 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-08-13 21:14:43 (GMT)
commit74cfc0ee1d0b4e386b5a07f8b79fbcece94cdff8 (patch)
treed72727b10a63cbd35dd17bec03e3517d6cd9465c /builtin/checkout-index.c
parent68f08b4b235d09a95604c6bc8349208b37a2f41e (diff)
downloadgit-74cfc0ee1d0b4e386b5a07f8b79fbcece94cdff8.zip
git-74cfc0ee1d0b4e386b5a07f8b79fbcece94cdff8.tar.gz
git-74cfc0ee1d0b4e386b5a07f8b79fbcece94cdff8.tar.bz2
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 a730f6a..d92db62 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;