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

Function untracked_cache_invalidate_trimmed_path

dir.c:4026–4044  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4024}
4025
4026void untracked_cache_invalidate_trimmed_path(struct index_state *istate,
4027 const char *path,
4028 int safe_path)
4029{
4030 size_t len = strlen(path);
4031
4032 if (!len)
4033 BUG("untracked_cache_invalidate_trimmed_path given zero length path");
4034
4035 if (path[len - 1] != '/') {
4036 untracked_cache_invalidate_path(istate, path, safe_path);
4037 } else {
4038 struct strbuf tmp = STRBUF_INIT;
4039
4040 strbuf_add(&tmp, path, len - 1);
4041 untracked_cache_invalidate_path(istate, tmp.buf, safe_path);
4042 strbuf_release(&tmp);
4043 }
4044}
4045
4046void untracked_cache_remove_from_index(struct index_state *istate,
4047 const char *path)

Calls 3

strbuf_addFunction · 0.85
strbuf_releaseFunction · 0.85

Tested by

no test coverage detected