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

Function show_funcname_line

grep.c:1356–1374  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1354}
1355
1356static void show_funcname_line(struct grep_opt *opt, struct grep_source *gs,
1357 const char *bol, unsigned lno)
1358{
1359 while (bol > gs->buf) {
1360 const char *eol = --bol;
1361
1362 while (bol > gs->buf && bol[-1] != '\n')
1363 bol--;
1364 lno--;
1365
1366 if (lno <= opt->last_shown)
1367 break;
1368
1369 if (match_funcname(opt, gs, bol, eol)) {
1370 show_line(opt, bol, eol, gs->name, lno, 0, '=');
1371 break;
1372 }
1373 }
1374}
1375
1376static int is_empty_line(const char *bol, const char *eol);
1377

Callers 2

show_pre_contextFunction · 0.85
grep_source_1Function · 0.85

Calls 2

show_lineFunction · 0.85
match_funcnameFunction · 0.70

Tested by

no test coverage detected