Add the simple scripts I used to do a merge with content conflicts.
[git.git] / read-cache.c
index 03d49e1..8571ba2 100644 (file)
@@ -304,7 +304,7 @@ int cache_match_stat(struct cache_entry *ce, struct stat *st)
            ce->ce_gid != htonl(st->st_gid))
                changed |= OWNER_CHANGED;
        /* We consider only the owner x bit to be relevant for "mode changes" */
-       if (0100 & (ntohs(ce->ce_mode) ^ st->st_mode))
+       if (0100 & (ntohl(ce->ce_mode) ^ st->st_mode))
                changed |= MODE_CHANGED;
        if (ce->ce_dev != htonl(st->st_dev) ||
            ce->ce_ino != htonl(st->st_ino))
@@ -402,7 +402,6 @@ int add_cache_entry(struct cache_entry *ce, int ok_to_add)
        if (pos < active_nr && ce_stage(ce) == 0) {
                while (same_name(active_cache[pos], ce)) {
                        ok_to_add = 1;
-                       active_nr--;
                        if (!remove_entry_at(pos))
                                break;
                }