Be much more liberal about the file mode bits.
[gitweb.git] / read-cache.c
index 5b4ab03d27826445a7b02a89de9d5106619e713a..21f6e8e4d5350d405e210c42c6d005eb314275ba 100644 (file)
@@ -303,7 +303,8 @@ int cache_match_stat(struct cache_entry *ce, struct stat *st)
        if (ce->ce_uid != htonl(st->st_uid) ||
            ce->ce_gid != htonl(st->st_gid))
                changed |= OWNER_CHANGED;
-       if (ce->ce_mode != htonl(st->st_mode))
+       /* We consider only the owner x bit to be relevant for "mode changes" */
+       if (0100 & (ntohs(ce->ce_mode) ^ st->st_mode))
                changed |= MODE_CHANGED;
        if (ce->ce_dev != htonl(st->st_dev) ||
            ce->ce_ino != htonl(st->st_ino))