Bug 247804 - devel/viewvc: GNU diff is need for the side-by-side or full colored diff on FreeBSD 12 and later
Summary: devel/viewvc: GNU diff is need for the side-by-side or full colored diff on F...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Dan Langille
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-06 13:49 UTC by Yasuhito FUTATSUKI
Modified: 2020-11-25 19:35 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (ohauer)


Attachments
a patch to add a comment for FreeBSD diff in "diff" option in viewvc.conf.dist file (461 bytes, patch)
2020-07-06 13:49 UTC, Yasuhito FUTATSUKI
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yasuhito FUTATSUKI 2020-07-06 13:49:25 UTC
Created attachment 216253 [details]
a patch to add a comment for FreeBSD diff in "diff" option in viewvc.conf.dist file

Revision diff view on Side-By-Side style or Full Colored diff style on ViewVC depends on GNU diff. If "diff" option in [general] section in viewvc.conf is not specified on FreeBSD 12 or later, ViewVC uses /usr/bin/diff, which is incompatible with GNU diff, Side-By-Side diff view shows usage of diff and Full Colored diff view shows no diff.

So I think it is better to add textproc/diffutils to RUN_DEPENDS, or to show some message about it.

Here is a patch against conf/viewvc.conf.dist to add comment for it.
Comment 1 Li-Wen Hsu freebsd_committer freebsd_triage 2020-07-06 13:55:34 UTC
While mentioning GNU Diff is needed, it may also worth to check what's the feature required and implement in BSD diff.
Comment 2 Yasuhito FUTATSUKI 2020-07-06 14:04:20 UTC
(In reply to Li-Wen Hsu from comment #1)
I didn't see detailed in the code for Full Colored diff yet, however obviously it is need a feature of --side-by-side option for Side-By-Side view.

I'll check for the Full Colored diff later.
Comment 3 Yasuhito FUTATSUKI 2020-07-06 14:41:59 UTC
Full color diff depends on -C|--context option with option value "-1".

With this option, GNU diff acts as if larger number than number of lines in files has been passed.
Comment 4 Dan Langille freebsd_committer freebsd_triage 2020-11-25 19:35:57 UTC
Committed via https://svnweb.freebsd.org/ports?view=revision&revision=556303 as part of # 247161