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

Function run

builtin/grep.c:200–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198}
199
200static void *run(void *arg)
201{
202 int hit = 0;
203 struct grep_opt *opt = arg;
204
205 while (1) {
206 struct work_item *w = get_work();
207 if (!w)
208 break;
209
210 opt->output_priv = w;
211 hit |= grep_source(opt, &w->source);
212 grep_source_clear_data(&w->source);
213 work_done(w);
214 }
215 free_grep_patterns(opt);
216 free(opt);
217
218 return (void*) (intptr_t) hit;
219}
220
221static void strbuf_out(struct grep_opt *opt, const void *buf, size_t size)
222{

Callers

nothing calls this directly

Calls 5

get_workFunction · 0.85
grep_source_clear_dataFunction · 0.85
work_doneFunction · 0.85
free_grep_patternsFunction · 0.85
grep_sourceClass · 0.70

Tested by

no test coverage detected