head 1.4; access; symbols OPENPKG_E1_MP_HEAD:1.1 OPENPKG_E1_MP:1.1 OPENPKG_E1_MP_2_STABLE:1.1 OPENPKG_E1_FP:1.1 OPENPKG_2_STABLE_MP:1.1 OPENPKG_2_STABLE_20061018:1.1 OPENPKG_2_STABLE_20060622:1.1 OPENPKG_2_STABLE:1.1.0.20 OPENPKG_2_STABLE_BP:1.1 OPENPKG_2_5_RELEASE:1.1 OPENPKG_2_5_SOLID:1.1.0.18 OPENPKG_2_5_SOLID_BP:1.1 OPENPKG_2_4_RELEASE:1.1 OPENPKG_2_4_SOLID:1.1.0.16 OPENPKG_2_4_SOLID_BP:1.1 OPENPKG_CW_FP:1.1 OPENPKG_2_3_RELEASE:1.1 OPENPKG_2_3_SOLID:1.1.0.14 OPENPKG_2_3_SOLID_BP:1.1 OPENPKG_2_2_RELEASE:1.1 OPENPKG_2_2_SOLID:1.1.0.12 OPENPKG_2_2_SOLID_BP:1.1 OPENPKG_2_1_RELEASE:1.1 OPENPKG_2_1_SOLID:1.1.0.10 OPENPKG_2_1_SOLID_BP:1.1 OPENPKG_2_0_RELEASE:1.1 OPENPKG_2_0_SOLID:1.1.0.8 OPENPKG_2_0_SOLID_BP:1.1 OPENPKG_1_3_RELEASE:1.1 OPENPKG_1_3_SOLID:1.1.0.6 OPENPKG_1_3_SOLID_BP:1.1 OPENPKG_1_STABLE_MP:1.1 OPENPKG_1_2_RELEASE:1.1 OPENPKG_1_2_SOLID:1.1.0.4 OPENPKG_1_2_SOLID_BP:1.1 OPENPKG_1_STABLE:1.1.0.2 OPENPKG_1_STABLE_BP:1.1; locks; strict; comment @# @; 1.4 date 2007.10.05.18.50.18; author rse; state Exp; branches; next 1.3; commitid SdKO8ty3zx2GXqAs; 1.3 date 2007.09.24.19.44.05; author rse; state Exp; branches; next 1.2; commitid luUriKZANAS2C1zs; 1.2 date 2007.09.24.19.30.50; author rse; state Exp; branches; next 1.1; commitid LnCamrqLwNuux1zs; 1.1 date 2003.01.12.12.37.14; author rse; state Exp; branches; next ; desc @@ 1.4 log @do not confuse people with this additional option which is provided by OpenPKG only @ text @Index: lib/c-stack.c --- lib/c-stack.c.orig 2004-03-08 00:51:09 +0100 +++ lib/c-stack.c 2007-09-24 21:12:08 +0200 @@@@ -63,6 +63,9 @@@@ #include #include +#if defined(__FreeBSD__) +#include +#endif #if HAVE_SYS_RESOURCE_H /* Include sys/time.h here, because... SunOS-4.1.x fails to include . ----------------------------------------------------------------------------- Add option "-O" to diff3(1) in order to allow one to display information about the 2nd file (the ancestor/older one) not just under option "-A", but also under "-E" and "-X". This way one especially can get the consise output of "-E" (where only "unmerged" conflicts and overlaps are shown), but still get the verbose information (introduced with "||||||| ") about the ancestor/older file in the flagged/marked output. This way "diff3 -m -E -O" gives one the best resolution chances on a 3-way merge without having to deal with the useless (already "merged") information one would get under "diff3 -m -A". --rse 20070924 Index: man/diff3.1 --- man/diff3.1.orig 2004-04-13 09:07:28 +0200 +++ man/diff3.1 2007-09-24 21:42:43 +0200 @@@@ -38,6 +38,9 @@@@ \fB\-a\fR \fB\-\-text\fR Treat all files as text. .TP +\fB\-O\fR +Always show content of OLDFILE in bracketing output of unmerged changes. (OpenPKG only) +.TP \fB\-\-strip\-trailing\-cr\fR Strip trailing carriage return on input. .TP Index: src/diff3.c --- src/diff3.c.orig 2004-04-12 09:44:35 +0200 +++ src/diff3.c 2007-09-24 21:21:38 +0200 @@@@ -153,6 +153,9 @@@@ /* If nonzero, show information for DIFF_2ND diffs. */ static bool show_2nd; +/* If nonzero, show information for DIFF_2ND on overlaps, too. */ +static bool show_2nd_on_overlap; + /* If nonzero, include `:wq' at the end of the script to write out the file being edited. */ static bool finalwrite; @@@@ -234,7 +237,7 @@@@ textdomain (PACKAGE); c_stack_action (0); - while ((c = getopt_long (argc, argv, "aeimvx3AEL:TX", longopts, 0)) != -1) + while ((c = getopt_long (argc, argv, "aeimvx3AEL:TXO", longopts, 0)) != -1) { switch (c) { @@@@ -269,6 +272,9 @@@@ case 'e': incompat++; break; + case 'O': + show_2nd_on_overlap = true; + break; case 'T': initial_tab = true; break; @@@@ -1527,7 +1533,7 @@@@ leading_dot = false; if (type == DIFF_ALL) { - if (show_2nd) + if (show_2nd || show_2nd_on_overlap) { /* Append lines from FILE1. */ fprintf (outputfile, "||||||| %s\n", file1); @@@@ -1665,7 +1671,7 @@@@ D_RELLEN (b, mapping[FILE0], i), outputfile); } - if (show_2nd) + if (show_2nd || show_2nd_on_overlap) { /* Put in lines from FILE1 with bracket. */ fprintf (outputfile, format_2nd, file1); @ 1.3 log @document -O option, too @ text @d35 1 a35 1 +Always show content of OLDFILE in bracketing output of unmerged changes. @ 1.2 log @Add option "-O" to diff3(1) in order to allow one to display information about the 2nd file (the ancestor/older one) not just under option "-A", but also under "-E" and "-X". This way one especially can get the consise output of "-E" (where only "unmerged" conflicts and overlaps are shown), but still get the verbose information (introduced with "||||||| ") about the ancestor/older file in the flagged/marked output. This way "diff3 -m -E -O" gives one the best resolution chances on a 3-way merge without having to deal with the useless (already "merged") information one would get under "diff3 -m -A". @ text @d27 13 @ 1.1 log @port to FreeBSD 5.0 @ text @d1 4 a4 3 --- lib/c-stack.c.orig Sat Jun 22 15:25:12 2002 +++ lib/c-stack.c Sun Jan 12 13:35:17 2003 @@@@ -67,6 +67,9 @@@@ d12 66 a77 2 # include #endif @