Commit 046ec3c9 by Edward Thomson

index_read_index: differentiate on mode

Treat index entries with different modes as different, which they
are, at least for the purposes of up-to-date calculations.
parent 93de20b8
......@@ -2987,7 +2987,8 @@ int git_index_read_index(
/* Path and stage are equal, if the OID is equal, keep it to
* keep the stat cache data.
*/
if (git_oid_equal(&old_entry->id, &new_entry->id)) {
if (git_oid_equal(&old_entry->id, &new_entry->id) &&
old_entry->mode == new_entry->mode) {
add_entry = (git_index_entry *)old_entry;
} else {
dup_entry = (git_index_entry *)new_entry;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment