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

Function st_mode_from_ce

read-cache.c:206–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204}
205
206static unsigned int st_mode_from_ce(const struct cache_entry *ce)
207{
208 extern int trust_executable_bit, has_symlinks;
209
210 switch (ce->ce_mode & S_IFMT) {
211 case S_IFLNK:
212 return has_symlinks ? S_IFLNK : (S_IFREG | 0644);
213 case S_IFREG:
214 return (ce->ce_mode & (trust_executable_bit ? 0755 : 0644)) | S_IFREG;
215 case S_IFGITLINK:
216 return S_IFDIR | 0755;
217 case S_IFDIR:
218 return ce->ce_mode;
219 default:
220 BUG("unsupported ce_mode: %o", ce->ce_mode);
221 }
222}
223
224int fake_lstat(const struct cache_entry *ce, struct stat *st)
225{

Callers 1

fake_lstatFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected