| 6 | #include "pathspec.h" |
| 7 | |
| 8 | static inline unsigned int ce_mode_from_stat(const struct cache_entry *ce, |
| 9 | unsigned int mode) |
| 10 | { |
| 11 | extern int trust_executable_bit, has_symlinks; |
| 12 | if (!has_symlinks && S_ISREG(mode) && |
| 13 | ce && S_ISLNK(ce->ce_mode)) |
| 14 | return ce->ce_mode; |
| 15 | if (!trust_executable_bit && S_ISREG(mode)) { |
| 16 | if (ce && S_ISREG(ce->ce_mode)) |
| 17 | return ce->ce_mode; |
| 18 | return create_ce_mode(0666); |
| 19 | } |
| 20 | return create_ce_mode(mode); |
| 21 | } |
| 22 | |
| 23 | static inline int ce_to_dtype(const struct cache_entry *ce) |
| 24 | { |
no test coverage detected