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

Function userdiff_get_textconv

userdiff.c:548–566  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

546}
547
548struct userdiff_driver *userdiff_get_textconv(struct repository *r,
549 struct userdiff_driver *driver)
550{
551 if (!driver->textconv)
552 return NULL;
553
554 if (driver->textconv_want_cache && !driver->textconv_cache &&
555 have_git_dir()) {
556 struct notes_cache *c = xmalloc(sizeof(*c));
557 struct strbuf name = STRBUF_INIT;
558
559 strbuf_addf(&name, "textconv/%s", driver->name);
560 notes_cache_init(r, c, name.buf, driver->textconv);
561 driver->textconv_cache = c;
562 strbuf_release(&name);
563 }
564
565 return driver;
566}
567
568static int for_each_userdiff_driver_list(each_userdiff_driver_fn fn,
569 enum userdiff_driver_type type, void *cb_data,

Callers 3

grep_source_1Function · 0.85
show_patch_diffFunction · 0.85
get_textconvFunction · 0.85

Calls 5

have_git_dirFunction · 0.85
strbuf_addfFunction · 0.85
notes_cache_initFunction · 0.85
strbuf_releaseFunction · 0.85
xmallocFunction · 0.70

Tested by

no test coverage detected