202a504a3ba01962bca268dc423085293a02b71e
[platform/upstream/diffutils.git] / NEWS
1 GNU diffutils NEWS                                    -*- outline -*-
2
3 * Noteworthy changes in release 3.7 (2018-12-31) [stable]
4
5 ** Bug fixes
6
7   diff --strip-trailing-cr with a single CR byte in one input file
8   would provoke an uninitialized memory read, e.g.,
9     diff -a --strip-trailing-cr <(printf '\r') <(echo a)
10   [bug introduced in 2.8 with addition of the --strip-trailing-cr option]
11
12 ** Improvements
13
14   diff --color now produces output compatible with less -R.
15
16
17 * Noteworthy changes in release 3.6 (2017-05-21) [stable]
18
19 ** New features
20
21   When one file is a prefix of the other, cmp now appends the shorter
22   file's size to the EOF diagnostic.
23
24 ** Bug fixes
25
26   Using an invalid regular expression with --ignore-matching-lines=RE (-I)
27   no longer causes stack overflow.  Before, with an invocation like the
28   following, diff would diagnose the error, but would still proceed to
29   blow the stack: diff -Ia -I\\ <(echo) <(echo b)
30   [bug introduced in 2.9]
31
32   diff no longer mishandles line numbers exceeding 2**31 on Mingw-w64.
33
34   the ---presume-output-tty (ostensibly test-only) option would cause
35   diff --color to read an uninitialized variable
36   [bug introduced in 3.4]
37
38 ** Performance changes
39
40   diff's default algorithm has been tweaked to deal better with larger
41   files, reversing some of the changes made in diffutils-3.4.
42
43
44 * Noteworthy changes in release 3.5 (2016-08-20) [stable]
45
46 ** Bug fixes
47
48   diff3 no longer malfunctions due to use-after-free
49   [bug introduced in 3.4]
50
51   diff --color no longer colorizes when TERM=dumb
52
53
54 * Noteworthy changes in release 3.4 (2016-08-08) [stable]
55
56 ** New features
57
58    diff accepts two new options --color and --palette to generate
59    and configure colored output.  --color takes an optional argument
60    specifying when to colorize a line: --color=always, --color=auto,
61    --color=never.  --palette is used to configure which colors are used.
62
63 ** Bug fixes
64
65   When binary files differ, diff now exits with status 1 as POSIX requires.
66   Formerly it exited with status 2.
67
68   Unless the --ignore-file-name-case option is used, diff now
69   considers file names to be equal only if they are byte-for-byte
70   equivalent.  This fixes a bug where diff in an English locale might
71   consider two Asian file names to be the same merely because they
72   contain no English characters.
73
74   diff -B no longer generates incorrect output if the two inputs
75   each end with a one-byte incomplete line.
76
77   diff --brief no longer reports a difference for unusual identical files.
78   For example, when comparing a file like /proc/cmdline (for which the linux
79   kernel reports st_size of 0 even though it is not an empty file) to a
80   copy of that file's contents residing on a "normal" file system:
81     $ f=/proc/cmdline; cp $f k; diff --brief $f k
82     Files /proc/cmdline and k differ
83
84 ** Performance changes
85
86   diff's default algorithm has been adjusted to output higher-quality
87   results at somewhat greater computational cost, as CPUs have gotten
88   faster since the algorithm was last tweaked in diffutils-2.6 (1993).
89
90
91 * Noteworthy changes in release 3.3 (2013-03-24) [stable]
92
93 ** New features
94
95   diff accepts a new option, --no-dereference.  With this option, symbolic
96   links are treated specially: as a separate type of file that can compare
97   equal only to another symbolic link with the same value.  For example,
98   with --no-dereference, two symbolic links compare equal when they have
99   the same value, even when that value does not reference a readable file.
100
101   --new-file (-N) and --unidirectional-new-file now allow comparisons to "-".
102   A standard input that's closed acts like a nonexistent file.
103
104   A file name containing spaces, double quotes, backslashes or control
105   characters is now encoded in a diff header as a double-quoted C string
106   literal.  The escape sequences \\, \", \a, \b, \f, \n, \r, \t, \v and
107   \ooo (a three-digit octal number between 0 and 255) are used.
108
109 ** Packaging
110
111   diffutils is now designed to build with Cygwin or MinGW rather than DJGPP.
112   The ms subdirectory has been removed.
113
114
115 * Noteworthy changes in release 3.2 (2011-09-02) [stable]
116
117 ** Changes in behavior
118
119   --ignore-file-name-case now applies at the top level too.
120   For example, "diff dir inIt" might compare "dir/Init" to "inIt".
121
122 ** New features
123
124   diff and sdiff have a new option --ignore-trailing-space (-Z).
125
126 ** Packaging
127
128   The texinfo documentation no longer specifies "front-cover" or "back-cover"
129   texts, so that it may now be included in Debian's "main" section.
130
131
132 * Noteworthy changes in release 3.1 (2011-08-10) [stable]
133
134 ** Bug fixes
135
136   diff no longer reports spurious differences merely because two entries
137   in the same directory have names that compare equal in the current
138   locale, or compare equal because --ignore-file-name-case was given.
139
140 * Noteworthy changes in release 3.0 (2010-05-03) [stable]
141
142 ** Bug fixes
143
144   diff once again prints the required "\ No newline at end of file" line
145   when at least one input lacks a newline-at-EOF and the final hunk plus
146   context-length aligns exactly with the end of the newline-lacking file.
147   [bug introduced between 2.8.7 and 2.9]
148
149 ** Changes in behavior
150
151   In context-style diffs, diff prints a portion of a preceding "function"
152   line for each hunk, with --show-function-line=RE (-F) or
153   --show-c-function (-p).  Now, it trims leading blanks from such lines
154   before extracting a prefix.  This is useful especially when a function
155   line is so far indented that the name itself would be truncated or not
156   included in the limited-width substring that diff appends.
157
158   diff once again reports a difference with the diagnostic
159   "Binary files A and B differ" when at least one of the files
160   appears to be binary.  From 2.8.4 through diffutils-2.9, it printed
161   "Files A and B differ".
162
163
164 * Noteworthy changes in release 2.9 (2010-02-11) [stable]
165
166 ** New features
167
168   New diff option --suppress-blank-empty.
169
170   Bring back support for 'diff -NUM', where NUM is a number,
171   even when conforming to POSIX 1003.1-2001.  This change reverts to
172   the behavior of GNU diff 2.7 and earlier.  This is a change only
173   when conforming to POSIX 1003.1-2001; there is no effect when
174   conforming to older POSIX versions.
175
176   This change is in response to decisions taken in the January 2005
177   Austin Group standardization meeting.  For more details, please see
178   "Utility Syntax Guidelines" in the Minutes of the January 2005
179   Meeting <http://www.opengroup.org/austin/docs/austin_239.html>.
180
181   sdiff now understands '1' and '2' as synonyms for 'l' and 'r'.
182
183 ** Changes in behavior
184
185   sdiff and diff3 now invoke diff, not $(bindir)/diff
186
187 ** Administrivia
188
189   New discussion and bug-reporting address: bug-diffutils@gnu.org
190
191   updated gnulib support
192
193
194 * Noteworthy changes in release 2.8.7 (2004-04-13) [stable]
195
196   Version 2.8.7 contains no user-visible changes.
197
198 User-visible changes in version 2.8.6:
199
200 * New diff3 option --strip-trailing-cr.
201
202 * With -N and -P, inaccessible empty regular files (the kind of files
203   that 'patch' creates to indicate nonexistent backups) are now
204   treated as nonexistent when they are in the 'backup' file position.
205
206 * If multiple SKIP values are given to cmp, e.g., 'cmp -i 10 -i 20',
207   cmp now uses the maximal value instead of the last one.
208
209 * diff now omits the ".000000000" on hosts that do not support
210   fractional timestamps.
211
212 Version 2.8.5 was not publicly released.
213
214 User-visible changes in version 2.8.4:
215
216 * Diff now simply prints "Files A and B differ" instead of "Binary
217   files A and B differ".  The message is output if either A or B
218   appears to be a binary file, and the old wording was misleading
219   because it implied that both files are binary, which is not
220   necessarily the case.
221
222 User-visible changes in version 2.8.3:
223
224 * New locale: en_US.
225
226 User-visible changes in version 2.8.2:
227
228 * New diff and sdiff option:
229   --tabsize=COLUMNS
230 * If --ignore-space-change or --ignore-all-space is also specified,
231   --ignore-blank-lines now considers lines to be empty if they contain
232   only white space.
233 * More platforms now handle multibyte characters correctly when
234   excluding files by name (diff -x and -X).
235 * New locales: hu, pt_BR.
236
237 User-visible changes in version 2.8.1:
238
239 * Documentation fixes.
240
241 User-visible changes in version 2.8:
242
243 * cmp and diff now conform to POSIX 1003.1-2001 (IEEE Std 1003.1-2001)
244   if the underlying system conforms to POSIX and if the _POSIX2_VERSION
245   environment variable is set to 200112.  Conformance removes support
246   for 'diff -NUM', where NUM is a number.  Use -C NUM or -U NUM instead.
247 * cmp now supports trailing operands SKIP1 and SKIP2, like BSD cmp.
248 * cmp -i or --ignore-initial now accepts SKIP1:SKIP2 option value.
249 * New cmp option: -n or --bytes.
250 * cmp's old -c or --print-chars option has been renamed;
251   use -b or --print-bytes instead.
252 * cmp now outputs "byte" rather than "char" outside the POSIX locale.
253 * cmp -l's index column width now adjusts to fit larger (or smaller) files.
254 * cmp -l -s and cmp -s -l are not allowed.  Use cmp -s or cmp -l instead.
255 * diff uses ISO 8601 style timestamps for output times (e.g. "2001-11-23
256   16:44:36.875702460 -0800") unless in the C or POSIX locale and the
257   -c style is specified.
258 * diff's -I and -F options use the regexp syntax of grep, not of Emacs.
259 * diff now accepts multiple context arguments, and uses their maximum value.
260 * New diff and sdiff options:
261   -E  --ignore-tab-expansion
262   --strip-trailing-cr
263 * New diff options:
264   --from-file=FILE, --to-file=FILE
265   --ignore-file-name-case
266   --no-ignore-file-name-case
267 * New diff3 and sdiff option:
268   --diff-program=PROGRAM
269 * The following diff options are still accepted, but are no longer documented.
270   They may be withdrawn in future releases.
271   -h (omit; it has no effect)
272   -H (use --speed-large-files instead)
273   -L (use --label instead)
274   -P (use --unidirectional-new-file instead)
275   --inhibit-hunk-merge (omit; it has no effect)
276 * Recursive diffs now sort file names according to the LC_COLLATE locale
277   category if possible, instead of using native byte comparison.
278 * Recursive diffs now detect and report directory loops.
279 * Diff printf specs can now use the "0" and "'" flags.
280 * The new sdiff interactive command 'ed' precedes each version with a header.
281 * On 64-bit hosts, files larger than 2 GB can be compared.
282 * Some internationalization support has been added, but multibyte locales
283   are still not completely supported yet.
284 * Some diagnostics have been reworded slightly for consistency.
285   Also, 'diff -D FOO' now outputs '/* ! FOO */' instead of '/* not FOO */'.
286 * The 'patch' part of the manual now describes 'patch' version 2.5.4.
287 * Man pages are now distributed and installed.
288 * There is support for DJGPP; see the 'ms' subdirectory and the files
289   m4/dos.m4 and */setmode.*.
290
291
292 User-visible changes in version 2.7:
293
294 * New diff option: --binary (useful only on non-POSIX hosts)
295 * diff -b and -w now ignore line incompleteness; -B no longer does this.
296 * cmp -c now uses locale to decide which output characters to quote.
297 * Help and version messages are reorganized.
298
299
300 User-visible changes in version 2.6:
301
302 * New cmp, diff, diff3, sdiff option: --help
303 * A new heuristic for diff greatly reduces the time needed to compare
304   large input files that contain many differences.
305 * Partly as a result, GNU diff's output is not exactly the same as before.
306   Usually it is a bit smaller, but sometimes it is a bit larger.
307
308
309 User-visible changes in version 2.5:
310
311 * New cmp option: -v --version
312
313
314 User-visible changes in version 2.4:
315
316 * New cmp option: --ignore-initial=BYTES
317 * New diff3 option: -T --initial-tab
318 * New diff option: --line-format=FORMAT
319 * New diff group format specifications:
320   <PRINTF_SPEC>[eflmnEFLMN]
321       A printf spec followed by one of the following letters
322       causes the integer corresponding to that letter to be
323       printed according to the printf specification.
324       E.g. '%5df' prints the number of the first line in the
325       group in the old file using the "%5d" format.
326         e: line number just before the group in old file; equals f - 1
327         f: first line number in group in the old file
328         l: last line number in group in the old file
329         m: line number just after the group in old file; equals l + 1
330         n: number of lines in group in the old file; equals l - f + 1
331         E, F, L, M, N: likewise, for lines in the new file
332   %(A=B?T:E)
333       If A equals B then T else E.  A and B are each either a decimal
334       constant or a single letter interpreted as above.  T and E are
335       arbitrary format strings.  This format spec is equivalent to T if
336       A's value equals B's; otherwise it is equivalent to E.  For
337       example, '%(N=0?no:%dN) line%(N=1?:s)' is equivalent to 'no lines'
338       if N (the number of lines in the group in the new file) is 0,
339       to '1 line' if N is 1, and to '%dN lines' otherwise.
340   %c'C'
341       where C is a single character, stands for the character C.  C may not
342       be a backslash or an apostrophe.  E.g. %c':' stands for a colon.
343   %c'\O'
344       where O is a string of 1, 2, or 3 octal digits, stands for the
345       character with octal code O.  E.g. %c'\0' stands for a null character.
346 * New diff line format specifications:
347   <PRINTF_SPEC>n
348       The line number, printed with <PRINTF_SPEC>.
349       E.g. '%5dn' prints the line number with a "%5d" format.
350   %c'C'
351   %c'\O'
352       The character C, or with octal code O, as above.
353 * Supported <PRINTF_SPEC>s have the same meaning as with printf, but must
354   match the extended regular expression %-*[0-9]*(\.[0-9]*)?[doxX].
355 * The format spec %0 introduced in version 2.1 has been removed, since it
356   is incompatible with printf specs like %02d.  To represent a null char,
357   use %c'\0' instead.
358 * cmp and diff now conform to POSIX 1003.2-1992 (ISO/IEC 9945-2:1993)
359   if the underlying system conforms to POSIX:
360   - Some messages' wordings are changed in minor ways.
361   - "White space" is now whatever C's 'isspace' says it is.
362   - When comparing directories, if 'diff' finds a file that is not a regular
363     file or a directory, it reports the file's type instead of diffing it.
364     (As usual, it follows symbolic links first.)
365   - When signaled, sdiff exits with the signal's status, not with status 2.
366 * Now portable to hosts where int, long, pointer, etc. are not all the same
367   size.
368 * 'cmp - -' now works like 'diff - -'.
369
370
371 User-visible changes in version 2.3:
372
373 * New diff option: --horizon-lines=lines
374
375
376 User-visible changes in version 2.1:
377
378 * New diff options:
379   --{old,new,unchanged}-line-format='format'
380   --{old,new,unchanged,changed}-group-format='format'
381   -U
382 * New diff3 option:
383   -A --show-all
384 * diff3 -m now defaults to -A, not -E.
385 * diff3 now takes up to three -L or --label options, not just two.
386   If just two options are given, they refer to the first two input files,
387   not the first and third input files.
388 * sdiff and diff -y handle incomplete lines.
389
390
391 User-visible changes in version 2.0:
392
393 * Add sdiff and cmp programs.
394 * Add Texinfo documentation.
395 * Add configure script.
396 * Improve diff performance.
397 * New diff options:
398 -x --exclude
399 -X --exclude-from
400 -P --unidirectional-new-file
401 -W --width
402 -y --side-by-side
403 --left-column
404 --sdiff-merge-assist
405 --suppress-common-lines
406 * diff options renamed:
407 --label renamed from --file-label
408 --forward-ed renamed from --reversed-ed
409 --paginate renamed from --print
410 --entire-new-file renamed from --entire-new-files
411 --new-file renamed from --new-files
412 --all-text removed
413 * New diff3 options:
414 -v --version
415 * Add long-named equivalents for other diff3 options.
416 * diff options -F (--show-function-line) and -I (--ignore-matching-lines)
417   can now be given more than once.
418
419 \f
420
421 Copyright (C) 1993-1994, 1998, 2001-2002, 2004, 2006, 2009-2013, 2015-2018 Free
422 Software Foundation, Inc.
423
424 This file is part of GNU Diffutils.
425
426 This program is free software: you can redistribute it and/or modify
427 it under the terms of the GNU General Public License as published by
428 the Free Software Foundation, either version 3 of the License, or
429 (at your option) any later version.
430
431 This program is distributed in the hope that it will be useful,
432 but WITHOUT ANY WARRANTY; without even the implied warranty of
433 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
434 GNU General Public License for more details.
435
436 You should have received a copy of the GNU General Public License
437 along with this program.  If not, see <http://www.gnu.org/licenses/>.