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