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

Function should_lookahead

grep.c:1441–1454  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1439}
1440
1441static int should_lookahead(struct grep_opt *opt)
1442{
1443 struct grep_pat *p;
1444
1445 if (opt->pattern_expression)
1446 return 0; /* punt for too complex stuff */
1447 if (opt->invert)
1448 return 0;
1449 for (p = opt->pattern_list; p; p = p->next) {
1450 if (p->token != GREP_PATTERN)
1451 return 0; /* punt for "header only" and stuff */
1452 }
1453 return 1;
1454}
1455
1456static int look_ahead(struct grep_opt *opt,
1457 unsigned long *left_p,

Callers 1

grep_source_1Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected