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

Function fsmonitor_refresh_callback

fsmonitor.c:435–467  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

433}
434
435static void fsmonitor_refresh_callback(struct index_state *istate, char *name)
436{
437 int len = strlen(name);
438 int pos = index_name_pos(istate, name, len);
439 size_t nr_in_cone;
440
441 trace_printf_key(&trace_fsmonitor,
442 "fsmonitor_refresh_callback '%s' (pos %d)",
443 name, pos);
444
445 if (name[len - 1] == '/')
446 nr_in_cone = handle_path_with_trailing_slash(istate, name, pos);
447 else
448 nr_in_cone = handle_path_without_trailing_slash(istate, name, pos);
449
450 /*
451 * If we did not find an exact match for this pathname or any
452 * cache-entries with this directory prefix and we're on a
453 * case-insensitive file system, try again using the name-hash
454 * and dir-name-hash.
455 */
456 if (!nr_in_cone && ignore_case) {
457 nr_in_cone = handle_using_name_hash_icase(istate, name);
458 if (!nr_in_cone)
459 nr_in_cone = handle_using_dir_name_hash_icase(
460 istate, name);
461 }
462
463 if (nr_in_cone)
464 trace_printf_key(&trace_fsmonitor,
465 "fsmonitor_refresh_callback CNT: %d",
466 (int)nr_in_cone);
467}
468
469/*
470 * The number of pathnames that we need to receive from FSMonitor

Callers 1

refresh_fsmonitorFunction · 0.85

Tested by

no test coverage detected