aboutsummaryrefslogtreecommitdiff
path: root/read-cache.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 22:26:31 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 22:26:31 -0700
commite44794706eeb57f2ee38ed1604821aa38b8ad9d2 (patch)
treec49cd3e4f1dfe4ccbf2b8d00188beaa251fee028 /read-cache.c
parent9fec8b26eff58e1f595e8619abf1e42c07645ff8 (diff)
downloadgit-e44794706eeb57f2ee38ed1604821aa38b8ad9d2.tar.gz
git-e44794706eeb57f2ee38ed1604821aa38b8ad9d2.tar.xz
Be much more liberal about the file mode bits.
We only really care about the difference between a file being executable or not (by its owner). Everything else we leave for the user umask to decide.
Diffstat (limited to 'read-cache.c')
-rw-r--r--read-cache.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/read-cache.c b/read-cache.c
index 5b4ab03d2..21f6e8e4d 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -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))