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

Function patmatch

grep.c:908–923  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

906}
907
908static int patmatch(struct grep_pat *p,
909 const char *line, const char *eol,
910 regmatch_t *match, int eflags)
911{
912 if (p->pcre2_pattern)
913 return !pcre2match(p, line, eol, match, eflags);
914
915 switch (regexec_buf(&p->regexp, line, eol - line, 1, match, eflags)) {
916 case 0:
917 return 1;
918 case REG_NOMATCH:
919 return 0;
920 default:
921 return -1;
922 }
923}
924
925static void strip_timestamp(const char *bol, const char **eol_p)
926{

Callers 2

look_aheadFunction · 0.85

Calls 2

pcre2matchFunction · 0.85
regexec_bufFunction · 0.85

Tested by

no test coverage detected