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

Function grep_source_clear_data

grep.c:1915–1929  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1913}
1914
1915void grep_source_clear_data(struct grep_source *gs)
1916{
1917 switch (gs->type) {
1918 case GREP_SOURCE_FILE:
1919 case GREP_SOURCE_OID:
1920 /* these types own the buffer */
1921 free((char *)gs->buf);
1922 gs->buf = NULL;
1923 gs->size = 0;
1924 break;
1925 case GREP_SOURCE_BUF:
1926 /* leave user-provided buf intact */
1927 break;
1928 }
1929}
1930
1931static int grep_source_load_oid(struct grep_source *gs)
1932{

Callers 3

fill_textconv_grepFunction · 0.85
grep_source_clearFunction · 0.85
runFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected