MCPcopy Index your code
hub / github.com/git/git / ce_mode_from_stat

Function ce_mode_from_stat

read-cache.h:8–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6#include "pathspec.h"
7
8static 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
23static inline int ce_to_dtype(const struct cache_entry *ce)
24{

Callers 5

run_diff_filesFunction · 0.85
get_stat_dataFunction · 0.85
check_preimageFunction · 0.85
add_to_indexFunction · 0.85
add_one_pathFunction · 0.85

Calls 1

create_ce_modeFunction · 0.85

Tested by

no test coverage detected