Signed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com>
---
 diff-lib.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/diff-lib.c b/diff-lib.c
index 104f954a25..56387e1f63 100644
--- a/diff-lib.c
+++ b/diff-lib.c
@@ -70,7 +70,7 @@ static int match_stat_with_submodule(struct diff_options 
*diffopt,
                                     struct stat *st, unsigned ce_option,
                                     unsigned *dirty_submodule)
 {
-       int changed = ce_match_stat(ce, st, ce_option);
+       int changed = ie_match_stat(&the_index, ce, st, ce_option);
        if (S_ISGITLINK(ce->ce_mode)) {
                struct diff_flags orig_flags = diffopt->flags;
                if (!diffopt->flags.override_submodule_config)
@@ -98,10 +98,10 @@ int run_diff_files(struct rev_info *revs, unsigned int 
option)
 
        if (diff_unmerged_stage < 0)
                diff_unmerged_stage = 2;
-       entries = active_nr;
+       entries = the_index.cache_nr;
        for (i = 0; i < entries; i++) {
                unsigned int oldmode, newmode;
-               struct cache_entry *ce = active_cache[i];
+               struct cache_entry *ce = the_index.cache[i];
                int changed;
                unsigned dirty_submodule = 0;
                const struct object_id *old_oid, *new_oid;
@@ -145,7 +145,7 @@ int run_diff_files(struct rev_info *revs, unsigned int 
option)
                        dpath->mode = wt_mode;
 
                        while (i < entries) {
-                               struct cache_entry *nce = active_cache[i];
+                               struct cache_entry *nce = the_index.cache[i];
                                int stage;
 
                                if (strcmp(ce->name, nce->name))
-- 
2.18.0.rc0.333.g22e6ee6cdf

Reply via email to