diffutils.patch 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. Index: lib/c-stack.c
  2. --- lib/c-stack.c.orig 2004-03-08 00:51:09 +0100
  3. +++ lib/c-stack.c 2007-09-24 21:12:08 +0200
  4. @@ -63,6 +63,9 @@
  5. #include <stdlib.h>
  6. #include <string.h>
  7. +#if defined(__FreeBSD__)
  8. +#include <sys/types.h>
  9. +#endif
  10. #if HAVE_SYS_RESOURCE_H
  11. /* Include sys/time.h here, because...
  12. SunOS-4.1.x <sys/resource.h> fails to include <sys/time.h>.
  13. -----------------------------------------------------------------------------
  14. Add option "-O" to diff3(1) in order to allow one to display information
  15. about the 2nd file (the ancestor/older one) not just under option "-A",
  16. but also under "-E" and "-X". This way one especially can get the
  17. consise output of "-E" (where only "unmerged" conflicts and overlaps are
  18. shown), but still get the verbose information (introduced with "|||||||
  19. <older-name>") about the ancestor/older file in the flagged/marked
  20. output. This way "diff3 -m -E -O" gives one the best resolution chances
  21. on a 3-way merge without having to deal with the useless (already
  22. "merged") information one would get under "diff3 -m -A". --rse 20070924
  23. Index: man/diff3.1
  24. --- man/diff3.1.orig 2004-04-13 09:07:28 +0200
  25. +++ man/diff3.1 2007-09-24 21:42:43 +0200
  26. @@ -38,6 +38,9 @@
  27. \fB\-a\fR \fB\-\-text\fR
  28. Treat all files as text.
  29. .TP
  30. +\fB\-O\fR
  31. +Always show content of OLDFILE in bracketing output of unmerged changes. (OpenPKG only)
  32. +.TP
  33. \fB\-\-strip\-trailing\-cr\fR
  34. Strip trailing carriage return on input.
  35. .TP
  36. Index: src/diff3.c
  37. --- src/diff3.c.orig 2004-04-12 09:44:35 +0200
  38. +++ src/diff3.c 2007-09-24 21:21:38 +0200
  39. @@ -153,6 +153,9 @@
  40. /* If nonzero, show information for DIFF_2ND diffs. */
  41. static bool show_2nd;
  42. +/* If nonzero, show information for DIFF_2ND on overlaps, too. */
  43. +static bool show_2nd_on_overlap;
  44. +
  45. /* If nonzero, include `:wq' at the end of the script
  46. to write out the file being edited. */
  47. static bool finalwrite;
  48. @@ -234,7 +237,7 @@
  49. textdomain (PACKAGE);
  50. c_stack_action (0);
  51. - while ((c = getopt_long (argc, argv, "aeimvx3AEL:TX", longopts, 0)) != -1)
  52. + while ((c = getopt_long (argc, argv, "aeimvx3AEL:TXO", longopts, 0)) != -1)
  53. {
  54. switch (c)
  55. {
  56. @@ -269,6 +272,9 @@
  57. case 'e':
  58. incompat++;
  59. break;
  60. + case 'O':
  61. + show_2nd_on_overlap = true;
  62. + break;
  63. case 'T':
  64. initial_tab = true;
  65. break;
  66. @@ -1527,7 +1533,7 @@
  67. leading_dot = false;
  68. if (type == DIFF_ALL)
  69. {
  70. - if (show_2nd)
  71. + if (show_2nd || show_2nd_on_overlap)
  72. {
  73. /* Append lines from FILE1. */
  74. fprintf (outputfile, "||||||| %s\n", file1);
  75. @@ -1665,7 +1671,7 @@
  76. D_RELLEN (b, mapping[FILE0], i), outputfile);
  77. }
  78. - if (show_2nd)
  79. + if (show_2nd || show_2nd_on_overlap)
  80. {
  81. /* Put in lines from FILE1 with bracket. */
  82. fprintf (outputfile, format_2nd, file1);