diff options
| author | Junio C Hamano <junkio@cox.net> | 2005-10-30 18:06:39 -0800 |
|---|---|---|
| committer | Junio C Hamano <junkio@cox.net> | 2005-10-30 18:06:39 -0800 |
| commit | e634aec752642dcf86c3fc82025e43381d6768c2 (patch) | |
| tree | a589b6756894d18c841ac61499e5d2c9beda36fd /read-cache.c | |
| parent | GIT 0.99.8g (diff) | |
| parent | Work around an RPM build problem. (diff) | |
| download | git-0.99.9a.tar.gz git-0.99.9a.zip | |
GIT 0.99.9av0.99.9a
... to contain the RPM workaround.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'read-cache.c')
| -rw-r--r-- | read-cache.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/read-cache.c b/read-cache.c index d2aebdd6bc..6932736203 100644 --- a/read-cache.c +++ b/read-cache.c @@ -35,8 +35,11 @@ int ce_match_stat(struct cache_entry *ce, struct stat *st) switch (ntohl(ce->ce_mode) & S_IFMT) { case S_IFREG: changed |= !S_ISREG(st->st_mode) ? TYPE_CHANGED : 0; - /* We consider only the owner x bit to be relevant for "mode changes" */ - if (0100 & (ntohl(ce->ce_mode) ^ st->st_mode)) + /* We consider only the owner x bit to be relevant for + * "mode changes" + */ + if (trust_executable_bit && + (0100 & (ntohl(ce->ce_mode) ^ st->st_mode))) changed |= MODE_CHANGED; break; case S_IFLNK: @@ -392,7 +395,7 @@ int add_cache_entry(struct cache_entry *ce, int option) int skip_df_check = option & ADD_CACHE_SKIP_DFCHECK; pos = cache_name_pos(ce->name, ntohs(ce->ce_flags)); - /* existing match? Just replace it */ + /* existing match? Just replace it. */ if (pos >= 0) { active_cache_changed = 1; active_cache[pos] = ce; @@ -415,7 +418,8 @@ int add_cache_entry(struct cache_entry *ce, int option) if (!ok_to_add) return -1; - if (!skip_df_check && check_file_directory_conflict(ce, pos, ok_to_replace)) { + if (!skip_df_check && + check_file_directory_conflict(ce, pos, ok_to_replace)) { if (!ok_to_replace) return -1; pos = cache_name_pos(ce->name, ntohs(ce->ce_flags)); |
