Skip to content

Commit 782a5ff

Browse files
pcloudsgitster
authored andcommitted
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>
1 parent e636a7b commit 782a5ff

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

builtin/update-index.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ static int mark_ce_flags(const char *path, int flag, int mark)
5656
else
5757
active_cache[pos]->ce_flags &= ~flag;
5858
cache_tree_invalidate_path(active_cache_tree, path);
59-
active_cache_changed = SOMETHING_CHANGED;
59+
active_cache_changed |= CE_ENTRY_CHANGED;
6060
return 0;
6161
}
6262
return -1;
@@ -268,7 +268,7 @@ static void chmod_path(int flip, const char *path)
268268
goto fail;
269269
}
270270
cache_tree_invalidate_path(active_cache_tree, path);
271-
active_cache_changed = SOMETHING_CHANGED;
271+
active_cache_changed |= CE_ENTRY_CHANGED;
272272
report("chmod %cx '%s'", flip, path);
273273
return;
274274
fail:
@@ -889,7 +889,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
889889
INDEX_FORMAT_LB, INDEX_FORMAT_UB);
890890

891891
if (the_index.version != preferred_index_format)
892-
active_cache_changed = SOMETHING_CHANGED;
892+
active_cache_changed |= SOMETHING_CHANGED;
893893
the_index.version = preferred_index_format;
894894
}
895895

0 commit comments

Comments
 (0)