diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2018-08-13 18:14:32 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-08-13 14:14:43 -0700 |
commit | 74cfc0ee1d0b4e386b5a07f8b79fbcece94cdff8 (patch) | |
tree | d72727b10a63cbd35dd17bec03e3517d6cd9465c /builtin/checkout-index.c | |
parent | submodule.c: use the right index instead of the_index (diff) | |
download | tgif-74cfc0ee1d0b4e386b5a07f8b79fbcece94cdff8.tar.xz |
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.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/checkout-index.c b/builtin/checkout-index.c index a730f6a1aa..d92db62fbd 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; |