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

Function notes_cache_init

notes-cache.c:41–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41void notes_cache_init(struct repository *r, struct notes_cache *c,
42 const char *name, const char *validity)
43{
44 struct strbuf ref = STRBUF_INIT;
45 int flags = NOTES_INIT_WRITABLE;
46
47 memset(c, 0, sizeof(*c));
48 c->validity = xstrdup(validity);
49
50 strbuf_addf(&ref, "refs/notes/%s", name);
51 if (!notes_cache_match_validity(r, ref.buf, validity))
52 flags |= NOTES_INIT_EMPTY;
53 init_notes(&c->tree, ref.buf, combine_notes_overwrite, flags);
54 strbuf_release(&ref);
55}
56
57int notes_cache_write(struct notes_cache *c)
58{

Callers 1

userdiff_get_textconvFunction · 0.85

Calls 5

xstrdupFunction · 0.85
strbuf_addfFunction · 0.85
init_notesFunction · 0.85
strbuf_releaseFunction · 0.85

Tested by

no test coverage detected