xref: /freebsd-src/contrib/diff/NEWS (revision f5e00e241f69c5c44f68f2a045204b0e3073d7c2)
1*f5e00e24SAndrey A. ChernovUser-visible changes in version 2.7:
2*f5e00e24SAndrey A. Chernov
3*f5e00e24SAndrey A. Chernov* New diff option: --binary (useful only on non-Posix hosts)
4*f5e00e24SAndrey A. Chernov* diff -b and -w now ignore line incompleteness; -B no longer does this.
5*f5e00e24SAndrey A. Chernov* cmp -c now uses locale to decide which output characters to quote.
6*f5e00e24SAndrey A. Chernov* Help and version messages are reorganized.
7*f5e00e24SAndrey A. Chernov
8*f5e00e24SAndrey A. Chernov
9*f5e00e24SAndrey A. ChernovUser-visible changes in version 2.6:
10*f5e00e24SAndrey A. Chernov
11*f5e00e24SAndrey A. Chernov* New cmp, diff, diff3, sdiff option: --help
12*f5e00e24SAndrey A. Chernov* A new heuristic for diff greatly reduces the time needed to compare
13*f5e00e24SAndrey A. Chernov  large input files that contain many differences.
14*f5e00e24SAndrey A. Chernov* Partly as a result, GNU diff's output is not exactly the same as before.
15*f5e00e24SAndrey A. Chernov  Usually it is a bit smaller, but sometimes it is a bit larger.
16*f5e00e24SAndrey A. Chernov
17*f5e00e24SAndrey A. Chernov
18*f5e00e24SAndrey A. ChernovUser-visible changes in version 2.5:
19*f5e00e24SAndrey A. Chernov
20*f5e00e24SAndrey A. Chernov* New cmp option: -v --version
21*f5e00e24SAndrey A. Chernov
22*f5e00e24SAndrey A. Chernov
23*f5e00e24SAndrey A. ChernovUser-visible changes in version 2.4:
24*f5e00e24SAndrey A. Chernov
25*f5e00e24SAndrey A. Chernov* New cmp option: --ignore-initial=BYTES
26*f5e00e24SAndrey A. Chernov* New diff3 option: -T --initial-tab
27*f5e00e24SAndrey A. Chernov* New diff option: --line-format=FORMAT
28*f5e00e24SAndrey A. Chernov* New diff group format specifications:
29*f5e00e24SAndrey A. Chernov  <PRINTF_SPEC>[eflmnEFLMN]
30*f5e00e24SAndrey A. Chernov      A printf spec followed by one of the following letters
31*f5e00e24SAndrey A. Chernov      causes the integer corresponding to that letter to be
32*f5e00e24SAndrey A. Chernov      printed according to the printf specification.
33*f5e00e24SAndrey A. Chernov      E.g. `%5df' prints the number of the first line in the
34*f5e00e24SAndrey A. Chernov      group in the old file using the "%5d" format.
35*f5e00e24SAndrey A. Chernov	e: line number just before the group in old file; equals f - 1
36*f5e00e24SAndrey A. Chernov	f: first line number in group in the old file
37*f5e00e24SAndrey A. Chernov	l: last line number in group in the old file
38*f5e00e24SAndrey A. Chernov	m: line number just after the group in old file; equals l + 1
39*f5e00e24SAndrey A. Chernov	n: number of lines in group in the old file; equals l - f + 1
40*f5e00e24SAndrey A. Chernov	E, F, L, M, N: likewise, for lines in the new file
41*f5e00e24SAndrey A. Chernov  %(A=B?T:E)
42*f5e00e24SAndrey A. Chernov      If A equals B then T else E.  A and B are each either a decimal
43*f5e00e24SAndrey A. Chernov      constant or a single letter interpreted as above.  T and E are
44*f5e00e24SAndrey A. Chernov      arbitrary format strings.  This format spec is equivalent to T if
45*f5e00e24SAndrey A. Chernov      A's value equals B's; otherwise it is equivalent to E.  For
46*f5e00e24SAndrey A. Chernov      example, `%(N=0?no:%dN) line%(N=1?:s)' is equivalent to `no lines'
47*f5e00e24SAndrey A. Chernov      if N (the number of lines in the group in the the new file) is 0,
48*f5e00e24SAndrey A. Chernov      to `1 line' if N is 1, and to `%dN lines' otherwise.
49*f5e00e24SAndrey A. Chernov  %c'C'
50*f5e00e24SAndrey A. Chernov      where C is a single character, stands for the character C.  C may not
51*f5e00e24SAndrey A. Chernov      be a backslash or an apostrophe.  E.g. %c':' stands for a colon.
52*f5e00e24SAndrey A. Chernov  %c'\O'
53*f5e00e24SAndrey A. Chernov      where O is a string of 1, 2, or 3 octal digits, stands for the
54*f5e00e24SAndrey A. Chernov      character with octal code O.  E.g. %c'\0' stands for a null character.
55*f5e00e24SAndrey A. Chernov* New diff line format specifications:
56*f5e00e24SAndrey A. Chernov  <PRINTF_SPEC>n
57*f5e00e24SAndrey A. Chernov      The line number, printed with <PRINTF_SPEC>.
58*f5e00e24SAndrey A. Chernov      E.g. `%5dn' prints the line number with a "%5d" format.
59*f5e00e24SAndrey A. Chernov  %c'C'
60*f5e00e24SAndrey A. Chernov  %c'\O'
61*f5e00e24SAndrey A. Chernov      The character C, or with octal code O, as above.
62*f5e00e24SAndrey A. Chernov* Supported <PRINTF_SPEC>s have the same meaning as with printf, but must
63*f5e00e24SAndrey A. Chernov  match the extended regular expression %-*[0-9]*(\.[0-9]*)?[doxX].
64*f5e00e24SAndrey A. Chernov* The format spec %0 introduced in version 2.1 has been removed, since it
65*f5e00e24SAndrey A. Chernov  is incompatible with printf specs like %02d.  To represent a null char,
66*f5e00e24SAndrey A. Chernov  use %c'\0' instead.
67*f5e00e24SAndrey A. Chernov* cmp and diff now conform to Posix.2 (ISO/IEC 9945-2:1993)
68*f5e00e24SAndrey A. Chernov  if the underlying system conforms to Posix:
69*f5e00e24SAndrey A. Chernov  - Some messages' wordings are changed in minor ways.
70*f5e00e24SAndrey A. Chernov  - ``White space'' is now whatever C's `isspace' says it is.
71*f5e00e24SAndrey A. Chernov  - When comparing directories, if `diff' finds a file that is not a regular
72*f5e00e24SAndrey A. Chernov    file or a directory, it reports the file's type instead of diffing it.
73*f5e00e24SAndrey A. Chernov    (As usual, it follows symbolic links first.)
74*f5e00e24SAndrey A. Chernov  - When signaled, sdiff exits with the signal's status, not with status 2.
75*f5e00e24SAndrey A. Chernov* Now portable to hosts where int, long, pointer, etc. are not all the same
76*f5e00e24SAndrey A. Chernov  size.
77*f5e00e24SAndrey A. Chernov* `cmp - -' now works like `diff - -'.
78*f5e00e24SAndrey A. Chernov
79*f5e00e24SAndrey A. Chernov
80*f5e00e24SAndrey A. ChernovUser-visible changes in version 2.3:
81*f5e00e24SAndrey A. Chernov
82*f5e00e24SAndrey A. Chernov* New diff option: --horizon-lines=lines
83*f5e00e24SAndrey A. Chernov
84*f5e00e24SAndrey A. Chernov
85*f5e00e24SAndrey A. ChernovUser-visible changes in version 2.1:
86*f5e00e24SAndrey A. Chernov
87*f5e00e24SAndrey A. Chernov* New diff options:
88*f5e00e24SAndrey A. Chernov  --{old,new,unchanged}-line-format='format'
89*f5e00e24SAndrey A. Chernov  --{old,new,unchanged,changed}-group-format='format'
90*f5e00e24SAndrey A. Chernov  -U
91*f5e00e24SAndrey A. Chernov* New diff3 option:
92*f5e00e24SAndrey A. Chernov  -A --show-all
93*f5e00e24SAndrey A. Chernov* diff3 -m now defaults to -A, not -E.
94*f5e00e24SAndrey A. Chernov* diff3 now takes up to three -L or --label options, not just two.
95*f5e00e24SAndrey A. Chernov  If just two options are given, they refer to the first two input files,
96*f5e00e24SAndrey A. Chernov  not the first and third input files.
97*f5e00e24SAndrey A. Chernov* sdiff and diff -y handle incomplete lines.
98*f5e00e24SAndrey A. Chernov
99*f5e00e24SAndrey A. Chernov
100*f5e00e24SAndrey A. ChernovUser-visible changes in version 2.0:
101*f5e00e24SAndrey A. Chernov
102*f5e00e24SAndrey A. Chernov* Add sdiff and cmp programs.
103*f5e00e24SAndrey A. Chernov* Add Texinfo documentation.
104*f5e00e24SAndrey A. Chernov* Add configure script.
105*f5e00e24SAndrey A. Chernov* Improve diff performance.
106*f5e00e24SAndrey A. Chernov* New diff options:
107*f5e00e24SAndrey A. Chernov-x --exclude
108*f5e00e24SAndrey A. Chernov-X --exclude-from
109*f5e00e24SAndrey A. Chernov-P --unidirectional-new-file
110*f5e00e24SAndrey A. Chernov-W --width
111*f5e00e24SAndrey A. Chernov-y --side-by-side
112*f5e00e24SAndrey A. Chernov--left-column
113*f5e00e24SAndrey A. Chernov--sdiff-merge-assist
114*f5e00e24SAndrey A. Chernov--suppress-common-lines
115*f5e00e24SAndrey A. Chernov* diff options renamed:
116*f5e00e24SAndrey A. Chernov--label renamed from --file-label
117*f5e00e24SAndrey A. Chernov--forward-ed renamed from --reversed-ed
118*f5e00e24SAndrey A. Chernov--paginate renamed from --print
119*f5e00e24SAndrey A. Chernov--entire-new-file renamed from --entire-new-files
120*f5e00e24SAndrey A. Chernov--new-file renamed from --new-files
121*f5e00e24SAndrey A. Chernov--all-text removed
122*f5e00e24SAndrey A. Chernov* New diff3 options:
123*f5e00e24SAndrey A. Chernov-v --version
124*f5e00e24SAndrey A. Chernov* Add long-named equivalents for other diff3 options.
125*f5e00e24SAndrey A. Chernov* diff options -F (--show-function-line) and -I (--ignore-matching-lines)
126*f5e00e24SAndrey A. Chernov  can now be given more than once.
127