NEWS 4.7 KB

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