Page MenuHomeFreeBSD

diff: Use change start when searching for function names
ClosedPublic

Authored by thj on Feb 21 2022, 11:19 AM.
Tags
None
Referenced Files
F103054935: D34328.id103024.diff
Wed, Nov 20, 8:32 AM
Unknown Object (File)
Oct 21 2024, 3:14 AM
Unknown Object (File)
Oct 3 2024, 6:32 AM
Unknown Object (File)
Oct 3 2024, 4:35 AM
Unknown Object (File)
Sep 24 2024, 9:25 AM
Unknown Object (File)
Sep 10 2024, 3:35 AM
Unknown Object (File)
Sep 6 2024, 12:04 PM
Unknown Object (File)
Sep 5 2024, 11:47 AM

Details

Summary

Use the start of change when searching for a function rather than the
start of the context. In short functions if this could result in search
for the function name starting from before the function definition.

This was exposed by
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262086

Test Plan

This fixes the previously failing diff functioname test, all other tests pass.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

thj requested review of this revision.Feb 21 2022, 11:19 AM

minor format question. Change looks correct.

usr.bin/diff/diffreg.c
1566

why add the extra blank line?

This revision is now accepted and ready to land.Feb 22 2022, 1:06 PM
mhorne added inline comments.
usr.bin/diff/diffreg.c
1465