From e44794706eeb57f2ee38ed1604821aa38b8ad9d2 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sat, 16 Apr 2005 22:26:31 -0700 Subject: 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. --- read-cache.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'read-cache.c') diff --git a/read-cache.c b/read-cache.c index 5b4ab03d27..21f6e8e4d5 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)) -- cgit v1.2.1