I noticed that diff truncates the "function name" if using -F (--show-function-line) option. I think this problem is similar to this stackoverflow question: https://stackoverflow.com/questions/11232461/unix-diff-show-function-line-truncates-output
Are any reason to truncate or can enlarge it (or maybe user-definied with an option)?
BSD diff(1) does not -F/--show-function-line option. This bug report GNU diff, which is available in ports now.
$ man /usr/share/man/man1/diff.1.gz | grep -- -F
-F RE --show-function-line=RE
N number of lines = L-F+1
As I see the man page in FreeBSD 11.3 and 11.4 contains it:
But the 12.0 doens't:
Yes, that's correct but this also supports my previous comment.
The BSD licensed diff utility was imported from OpenBSD with 11.2-RELEASE and there have been a few addition/improvements since then.
The manual page you display for 11.3-RELEASE and 11.4-RELEASE are for GNU diff utility (see the copyright section at the bottom of the manual pages).
I could not find it in the 12.0-RELEASE notes but I would assume the default diff utility was replaced with the BSD diff(1) in 12.0-RELEASE (needs confirmation).
After all, the current diff(1) utility in base is the modified/improved version of the diff program imported from OpenBSD.
At the moment, diff(1) does not implement -F/--show-function-line options. You may want to request somebody to close this bug report and open a new one to request -F/--show-function-line support to diff(1).
If you open a new bug report, it may be worthwhile to add it to this one.