Commits
- Commit:
dc306c6bd88271ab911e205539974da98be82d17
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
back out "improve accuracy of function prototype in hunk headers"
which was commit 8993f42562696079866fc2dec7191877b6cc1f18
This commit introduced a regression where hunk headers would contain
lines taken from below or within a change. Reported by tb@ and sthen@.
There is some confusion around how the -p feature was documented:
-p With unified and context diffs, show with each change the first
40 characters of the last line before the context beginning with
a letter, an underscore or a dollar sign. For C source code
following standard layout conventions, this will show the
prototype of the function the change applies to.
The original behaviour matches "the last line before the context beginning
with a letter ...".
The new (reverted) behaviour sometimes matches "will show the prototype of
the function the change applies to". This did always happen as intended,
as seen when some .c files in the OpenBSD src tree were changed.
The new behaviour was also worse for Makefiles in the OpenBSD ports tree.
Let's revert to the traditional -p behaviour until a better fix is found.
Details:
https://marc.gameoftrees.org/mail/1692696001.69872_0.html
https://marc.info/?l=gameoftrees&m=169269624516330&w=2
ok tb@
- Commit:
e1595dc1c75393361878450cc70fcefee131810a
- From:
- Tom Jones <thj@freebsd.org>
- Via:
- Mark Jamsek <mark@jamsek.dev>
- Date:
add regress test for function prototype in hunk header