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

Function grep_source_init_file

grep.c:1881–1891  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1879}
1880
1881void grep_source_init_file(struct grep_source *gs, const char *name,
1882 const char *path)
1883{
1884 gs->type = GREP_SOURCE_FILE;
1885 gs->name = xstrdup_or_null(name);
1886 gs->path = xstrdup_or_null(path);
1887 gs->buf = NULL;
1888 gs->size = 0;
1889 gs->driver = NULL;
1890 gs->identifier = xstrdup(path);
1891}
1892
1893void grep_source_init_oid(struct grep_source *gs, const char *name,
1894 const char *path, const struct object_id *oid,

Callers 1

grep_fileFunction · 0.85

Calls 2

xstrdup_or_nullFunction · 0.85
xstrdupFunction · 0.85

Tested by

no test coverage detected