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

Function invalidate_directory

dir.c:1115–1135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1113}
1114
1115static void invalidate_directory(struct untracked_cache *uc,
1116 struct untracked_cache_dir *dir)
1117{
1118 int i;
1119
1120 /*
1121 * Invalidation increment here is just roughly correct. If
1122 * untracked_nr or any of dirs[].recurse is non-zero, we
1123 * should increment dir_invalidated too. But that's more
1124 * expensive to do.
1125 */
1126 if (dir->valid)
1127 uc->dir_invalidated++;
1128
1129 dir->valid = 0;
1130 for (size_t i = 0; i < dir->untracked_nr; i++)
1131 free(dir->untracked[i]);
1132 dir->untracked_nr = 0;
1133 for (i = 0; i < dir->dirs_nr; i++)
1134 dir->dirs[i]->recurse = 0;
1135}
1136
1137/* Flags for add_patterns() */
1138#define PATTERN_NOFOLLOW (1<<0)

Callers 1

open_cached_dirFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected