unifiedDifffunctionfunction unifiedDiff(name: string, before: string, after: string): stringThe unified diff from before to after, headed by --- a/<name> and +++ b/<name>; an empty string where the texts are equal.
A unified diff of two texts (commons 0003-host FR-012, FR-019): what ergonex render --dry-run shows of a generated file that would change, and what ergonex shell install shows of the one block it would write, so that a person sees the exact change before it is made.
The lines are compared by a longest common subsequence, which is exact and, for the files of a workspace (a few hundred lines), small. The hunks carry three lines of context, as diff -u does, and a text with no difference gives no hunk and an empty string. Line endings are LF here; a caller normalizes first.
unifiedDifffunctionfunction unifiedDiff(name: string, before: string, after: string): stringThe unified diff from before to after, headed by --- a/<name> and +++ b/<name>; an empty string where the texts are equal.