Date: Sat, 03 Oct 2020 20:08:35 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 250015] diff -purw fails with 'error: conflicting output format options.' Message-ID: <bug-250015-227-7bMcso3R97@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-250015-227@https.bugs.freebsd.org/bugzilla/> References: <bug-250015-227@https.bugs.freebsd.org/bugzilla/>
index | next in thread | previous in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=250015 Kyle Evans <kevans@freebsd.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bapt@FreeBSD.org --- Comment #1 from Kyle Evans <kevans@freebsd.org> --- (In reply to Ed Maste from comment #0) Hmm... this is unfortunate. -p sets the format to context, which is incompatible with -u. I note that the following is what GNU diff appears to do: kevans91:~/grep$ diff -p A B *** A 2020-10-03 15:02:53.072790765 -0500 --- B 2020-10-03 15:03:00.652785502 -0500 *************** *** 1,7 **** A B ! C ! D E F G --- 1,7 ---- A B ! X ! Y E F G kevans91:~/grep$ diff -pu A B --- A 2020-10-03 15:02:53.072790765 -0500 +++ B 2020-10-03 15:03:00.652785502 -0500 @@ -1,7 +1,7 @@ A B -C -D +X +Y E F G kevans91:~/grep$ diff -up A B --- A 2020-10-03 15:02:53.072790765 -0500 +++ B 2020-10-03 15:03:00.652785502 -0500 @@ -1,7 +1,7 @@ A B -C -D +X +Y E F G I suspect the answer here is that we should leave the diff_format as D_UNSET, then after all option processing default it to D_CONTEXT if it's still unset and D_PROTOTYPE is set. CC'ing bapt@ to get a second opinion. I also note that GNU diff doesn't appear to check the format at all for -p, so we should probably stop that as well: kevans91:~/grep$ diff -qp A B Files A and B differ kevans91:~/grep$ diff -pq A B Files A and B differ -- You are receiving this mail because: You are the assignee for the bug.help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-250015-227-7bMcso3R97>
