update-index: be specific what part of the index has changed

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Nguyễn Thái Ngọc Duy committed Jun 13, 2014 at 19:19 UTC 782a5ff9cec21b6a4f1f09c80d646b27fb100559
1 file changed +3 -3
builtin/update-index.c
+3 -3
@@ -56,7 +56,7 @@ static int mark_ce_flags(const char *path, int flag, int mark)
56 else
57 active_cache[pos]->ce_flags &= ~flag;
58 cache_tree_invalidate_path(active_cache_tree, path);
59 - active_cache_changed = SOMETHING_CHANGED;
59 + active_cache_changed |= CE_ENTRY_CHANGED;
60 return 0;
61 }
62 return -1;
@@ -268,7 +268,7 @@ static void chmod_path(int flip, const char *path)
268 goto fail;
269 }
270 cache_tree_invalidate_path(active_cache_tree, path);
271 - active_cache_changed = SOMETHING_CHANGED;
271 + active_cache_changed |= CE_ENTRY_CHANGED;
272 report("chmod %cx '%s'", flip, path);
273 return;
274 fail:
@@ -889,7 +889,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
889 INDEX_FORMAT_LB, INDEX_FORMAT_UB);
890
891 if (the_index.version != preferred_index_format)
892 - active_cache_changed = SOMETHING_CHANGED;
892 + active_cache_changed |= SOMETHING_CHANGED;
893 the_index.version = preferred_index_format;
894 }
895