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

Function resolve_dtype

dir.c:2368–2387  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2366}
2367
2368static int resolve_dtype(int dtype, struct index_state *istate,
2369 const char *path, int len)
2370{
2371 struct stat st;
2372
2373 if (dtype != DT_UNKNOWN)
2374 return dtype;
2375 dtype = get_index_dtype(istate, path, len);
2376 if (dtype != DT_UNKNOWN)
2377 return dtype;
2378 if (lstat(path, &st))
2379 return dtype;
2380 if (S_ISREG(st.st_mode))
2381 return DT_REG;
2382 if (S_ISDIR(st.st_mode))
2383 return DT_DIR;
2384 if (S_ISLNK(st.st_mode))
2385 return DT_LNK;
2386 return dtype;
2387}
2388
2389static enum path_treatment treat_path_fast(struct dir_struct *dir,
2390 struct cached_dir *cdir,

Callers 2

treat_pathFunction · 0.85

Calls 1

get_index_dtypeFunction · 0.85

Tested by

no test coverage detected