MCPcopy Create free account
hub / github.com/git/git / process_lstat_error

Function process_lstat_error

builtin/update-index.c:276–281  ·  view source on GitHub ↗

* Handle a path that couldn't be lstat'ed. It's either: * - missing file (ENOENT or ENOTDIR). That's ok if we're * supposed to be removing it and the removal actually * succeeds. * - permission error. That's never ok. */

Source from the content-addressed store, hash-verified

274 * - permission error. That's never ok.
275 */
276static int process_lstat_error(const char *path, int err)
277{
278 if (is_missing_file_error(err))
279 return remove_one_path(path);
280 return error("lstat(\"%s\"): %s", path, strerror(err));
281}
282
283static int add_one_path(const struct cache_entry *old, const char *path, int len, struct stat *st)
284{

Callers 1

process_pathFunction · 0.85

Calls 3

is_missing_file_errorFunction · 0.85
remove_one_pathFunction · 0.85
errorFunction · 0.85

Tested by

no test coverage detected