From MAILER-DAEMON Thu Oct 06 15:51:07 2016
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1bsEh9-0001Hc-4J
	for mharc-bug-diffutils@gnu.org; Thu, 06 Oct 2016 15:51:07 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:37077)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bsEh6-0001EQ-GP
	for bug-diffutils@gnu.org; Thu, 06 Oct 2016 15:51:05 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bsEh4-0000j9-PV
	for bug-diffutils@gnu.org; Thu, 06 Oct 2016 15:51:03 -0400
Received: from debbugs.gnu.org ([208.118.235.43]:40714)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bsEh4-0000j5-Kf
	for bug-diffutils@gnu.org; Thu, 06 Oct 2016 15:51:02 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bsEh4-0001rF-GX
	for bug-diffutils@gnu.org; Thu, 06 Oct 2016 15:51:02 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Norbert Kiesel <nkiesel@gmail.com>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-diffutils@gnu.org
Resent-Date: Thu, 06 Oct 2016 19:51:02 +0000
Resent-Message-ID: <handler.24629.B.14757834287088@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: report 24629
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords: 
To: 24629@debbugs.gnu.org
X-Debbugs-Original-To: bug-diffutils@gnu.org
Received: via spool by submit@debbugs.gnu.org id=B.14757834287088
	(code B ref -1); Thu, 06 Oct 2016 19:51:02 +0000
Received: (at submit) by debbugs.gnu.org; 6 Oct 2016 19:50:28 +0000
Received: from localhost ([127.0.0.1]:46904 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1bsEgW-0001qG-IZ
	for submit@debbugs.gnu.org; Thu, 06 Oct 2016 15:50:28 -0400
Received: from eggs.gnu.org ([208.118.235.92]:45596)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <nkiesel@gmail.com>) id 1bsEf4-0001nO-90
	for submit@debbugs.gnu.org; Thu, 06 Oct 2016 15:48:58 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <nkiesel@gmail.com>) id 1bsEey-0000DN-B6
	for submit@debbugs.gnu.org; Thu, 06 Oct 2016 15:48:53 -0400
Received: from lists.gnu.org ([2001:4830:134:3::11]:42404)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <nkiesel@gmail.com>) id 1bsEey-0000DE-87
	for submit@debbugs.gnu.org; Thu, 06 Oct 2016 15:48:52 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:36560)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <nkiesel@gmail.com>) id 1bsEew-000891-1K
	for bug-diffutils@gnu.org; Thu, 06 Oct 2016 15:48:50 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <nkiesel@gmail.com>) id 1bsEeu-0000Cl-Ap
	for bug-diffutils@gnu.org; Thu, 06 Oct 2016 15:48:49 -0400
Received: from mail-io0-x22b.google.com ([2607:f8b0:4001:c06::22b]:36243)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <nkiesel@gmail.com>) id 1bsEeu-0000Cd-4V
	for bug-diffutils@gnu.org; Thu, 06 Oct 2016 15:48:48 -0400
Received: by mail-io0-x22b.google.com with SMTP id j37so26457247ioo.3
	for <bug-diffutils@gnu.org>; Thu, 06 Oct 2016 12:48:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; 
	h=mime-version:from:date:message-id:subject:to;
	bh=0MOQl4L3iCVI/alzt9WccDH56i08EfJ/mEFZQES7Af4=;
	b=z8PFP9f3qkOs+a8YJQZqkcAvi4ItYyg9Hw4LwYU7w2eK3EN5WM3QVUhanqcOUn8+Xi
	qzrX13RO7lcF89jCJ/ZtFvqE0+P+JaMw8eJaftpUUtrrXKcXd5s+vYaRmqG5dK8J1B/n
	gsoM4ovL1Bgnw1utMF4/37SWOJPbXp+eTgf8IcbAkLWW4cHwNwe6a7HElbqU6tDJMokd
	oGyff8QS4CqBNXXsPjrrsY/YXeSBUQmDGgyruaU2IcyFe9V+LNp795wc5latAE31bF8w
	y9/xsPLXeDA5SzW80p4EQR7OWFZrWswprUroz2eeRnliU6szQoROSCfPI9Ec11HAHiuB
	05ig==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20130820;
	h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
	bh=0MOQl4L3iCVI/alzt9WccDH56i08EfJ/mEFZQES7Af4=;
	b=do5DRZ1OU7mNvj4Owp5XkvjwNtemoqHUYKLxgI/wSWWSqBVDXU3L3AXBLfq6kFW5NR
	Tt+EX/Mt7UtDD3TxNLk7ftZpmmy8vm263wu0/M8DWLsBZ9yXzK/FNopnULKqzqYnrCA7
	3vL/jRxWminqHcijTAeRzWO37uKZ5Uhmhn7WTzIHwk0dF67TMpWGK/FVuaLznSYErG9n
	Qic+l416Rov7Zzav8sCDKkpDqkaLpfdlfaijk98aBC9BT4vGyWPTGpR1Vb2Kas+XJz+T
	FVJ75Lto77T1fPoe/S70WVna68sXQrqrXNVNGkEMNj39Va7DAr/lDxLLX34OQRFvRnrG
	Nt+Q==
X-Gm-Message-State: AA6/9Rn0bxwLj6Q/pWDMz6Eg+Ls0o7rSP7ZuRr8EP0Rg/D8Sszx770uyCqfhxu7+/0PWAns7mBDT3CZv/cviTQ==
X-Received: by 10.107.10.201 with SMTP id 70mr19720648iok.165.1475783326165;
	Thu, 06 Oct 2016 12:48:46 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.107.19.204 with HTTP; Thu, 6 Oct 2016 12:48:45 -0700 (PDT)
From: Norbert Kiesel <nkiesel@gmail.com>
Date: Thu, 6 Oct 2016 12:48:45 -0700
Message-ID: <CAM+g_NsE_B16qTDX0Kb0H0P9PRXPdJE_LhoToeGSjf0jcD=iFg@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Mailman-Approved-At: Thu, 06 Oct 2016 15:50:27 -0400
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 208.118.235.43
Subject: [bug-diffutils] bug#24629: Make unified diff configurable default
X-BeenThere: bug-diffutils@gnu.org
List-Id: "All diffutils discussion." <bug-diffutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-diffutils/>
List-Post: <mailto:bug-diffutils@gnu.org>
List-Help: <mailto:bug-diffutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 06 Oct 2016 19:51:05 -0000

Hi,

it's been ages that I actually wanted to produce a "classic" diff, and
I don't think I'm alone in that.  Yet, I still have to remember to add
`-u` every time I invoke `diff`.

I understand changing the default is controversial. But perhaps even
using "classic" as default unless POSIXLY_CORRECT is set.

But we should be able to support a GNU_DIFF_FORMAT environment
variable that sets the default format, no?

I could send a patch, but first want to understand if that would have
any chance of being applied.

</nk>

P.S.: I know I could write my own little wrapper script/alias/shell
function, but that all seems dirty in one way or another. --nk




From MAILER-DAEMON Thu Oct 06 16:19:10 2016
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1bsF8I-0007s9-C4
	for mharc-bug-diffutils@gnu.org; Thu, 06 Oct 2016 16:19:10 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:50540)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bsF8F-0007qi-Tm
	for bug-diffutils@gnu.org; Thu, 06 Oct 2016 16:19:08 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bsF8A-0007sv-Th
	for bug-diffutils@gnu.org; Thu, 06 Oct 2016 16:19:07 -0400
Received: from debbugs.gnu.org ([208.118.235.43]:40736)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bsF8A-0007sk-Pt
	for bug-diffutils@gnu.org; Thu, 06 Oct 2016 16:19:02 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bsF8A-0002X2-Lq
	for bug-diffutils@gnu.org; Thu, 06 Oct 2016 16:19:02 -0400
Resent-From: Eric Blake <eblake@redhat.com>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-To: bug-diffutils@gnu.org
Resent-Date: Thu, 06 Oct 2016 20:19:02 +0000
Resent-Message-ID: <handler.24629.D24629.14757851229689.done@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: cc-closed 24629
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords: notabug
To: Norbert Kiesel <nkiesel@gmail.com>, 24629-done@debbugs.gnu.org,
	GNU bug control <control@debbugs.gnu.org>
Mail-Followup-To: 24629@debbugs.gnu.org, eblake@redhat.com, nkiesel@gmail.com
Received: via spool by 24629-done@debbugs.gnu.org id=D24629.14757851229689
	(code D ref 24629); Thu, 06 Oct 2016 20:19:02 +0000
Received: (at 24629-done) by debbugs.gnu.org; 6 Oct 2016 20:18:42 +0000
Received: from localhost ([127.0.0.1]:46920 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1bsF7q-0002WB-1D
	for submit@debbugs.gnu.org; Thu, 06 Oct 2016 16:18:42 -0400
Received: from mx1.redhat.com ([209.132.183.28]:42066)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <eblake@redhat.com>)
	id 1bsF7n-0002Vv-76; Thu, 06 Oct 2016 16:18:39 -0400
Received: from int-mx10.intmail.prod.int.phx2.redhat.com
	(int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by mx1.redhat.com (Postfix) with ESMTPS id E8BE461E66;
	Thu,  6 Oct 2016 20:18:36 +0000 (UTC)
Received: from [10.3.116.83] (ovpn-116-83.phx2.redhat.com [10.3.116.83])
	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id u96KIZGP015989; Thu, 6 Oct 2016 16:18:36 -0400
References: <CAM+g_NsE_B16qTDX0Kb0H0P9PRXPdJE_LhoToeGSjf0jcD=iFg@mail.gmail.com>
From: Eric Blake <eblake@redhat.com>
Openpgp: url=http://people.redhat.com/eblake/eblake.gpg
Organization: Red Hat, Inc.
Message-ID: <0cce8eb6-5558-65c7-3d6f-16f19d63ba04@redhat.com>
Date: Thu, 6 Oct 2016 15:18:34 -0500
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
	Thunderbird/45.3.0
MIME-Version: 1.0
In-Reply-To: <CAM+g_NsE_B16qTDX0Kb0H0P9PRXPdJE_LhoToeGSjf0jcD=iFg@mail.gmail.com>
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="xxPj3e9wdasxDr3hoW1M7sN8D7Xc1PhIP"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16
	(mx1.redhat.com [10.5.110.39]); Thu, 06 Oct 2016 20:18:37 +0000 (UTC)
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 208.118.235.43
Subject: [bug-diffutils] bug#24629: bug#24629: Make unified diff
 configurable default
X-BeenThere: bug-diffutils@gnu.org
List-Id: "All diffutils discussion." <bug-diffutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-diffutils/>
List-Post: <mailto:bug-diffutils@gnu.org>
List-Help: <mailto:bug-diffutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 06 Oct 2016 20:19:09 -0000

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--xxPj3e9wdasxDr3hoW1M7sN8D7Xc1PhIP
Content-Type: multipart/mixed; boundary="JKVLVGkpKQQvXaT57HXmuCl4PRLrtxX40";
 protected-headers="v1"
From: Eric Blake <eblake@redhat.com>
To: Norbert Kiesel <nkiesel@gmail.com>, 24629-done@debbugs.gnu.org,
 GNU bug control <control@debbugs.gnu.org>
Message-ID: <0cce8eb6-5558-65c7-3d6f-16f19d63ba04@redhat.com>
Subject: Re: [bug-diffutils] bug#24629: Make unified diff configurable default
References: <CAM+g_NsE_B16qTDX0Kb0H0P9PRXPdJE_LhoToeGSjf0jcD=iFg@mail.gmail.com>
In-Reply-To: <CAM+g_NsE_B16qTDX0Kb0H0P9PRXPdJE_LhoToeGSjf0jcD=iFg@mail.gmail.com>

--JKVLVGkpKQQvXaT57HXmuCl4PRLrtxX40
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

tag 24629 notabug
thanks

On 10/06/2016 02:48 PM, Norbert Kiesel wrote:
> Hi,
>=20
> it's been ages that I actually wanted to produce a "classic" diff, and
> I don't think I'm alone in that.  Yet, I still have to remember to add
> `-u` every time I invoke `diff`.
>=20
> I understand changing the default is controversial. But perhaps even
> using "classic" as default unless POSIXLY_CORRECT is set.

I think you said that backwards, and are proposing that diff would
output -u format by default, and ed script format if POSIXLY_CORRECT is
set.  At any rate, I'm not a big fan of the idea; POSIXLY_CORRECT should
control an absolute bare minimum of changes (only where we intentionally
differ from POSIX as in incompatible extension), as you still risk
breaking many scripts (most of which intentionally don't sent
POSIXLY_CORRECT).

>=20
> But we should be able to support a GNU_DIFF_FORMAT environment
> variable that sets the default format, no?

No. We've already learned, from sad experience, that environment
variables that affect default behavior are VERY prone to breaking
existing scripts that aren't aware of the new environment variable
needing to be removed before getting the output they are used to.  In
fact, existing GNU programs have been actively trying to move away from
this paradigm (observe the treatment of GREP_OPTIONS in grep).
Environment variables that affect non-default output, such as LS_COLORS,
are less problematic - except that then they aren't the default so it
still doesn't help your stated use case of getting the new behavior by
default.

>=20
> I could send a patch, but first want to understand if that would have
> any chance of being applied.

Probably not worth it.  As such, I'm tagging this as not a bug in the
database, although you should feel free to add further comments to the
thread.

>=20
> </nk>
>=20
> P.S.: I know I could write my own little wrapper script/alias/shell
> function, but that all seems dirty in one way or another. --nk

Actually, that IS what we recommend.  If you have a particular way that
a tool behaves best for you, then the BEST thing to do IS to write a
wrapper script which adds the appropriate options, and put that wrapper
script first on your PATH for interactive operation.

--=20
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


--JKVLVGkpKQQvXaT57HXmuCl4PRLrtxX40--

--xxPj3e9wdasxDr3hoW1M7sN8D7Xc1PhIP
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBCAAGBQJX9rGaAAoJEKeha0olJ0NqSFwH/RGNg4pJeBsZ0vWF1Dicg1R7
XyKFFv+J4m1NlgqHZ2so773GNxtLvMbf3df0CxyLeJ+8+PTcQBkon68Vxtq46uc/
OHMZPyZXKCcDOeBQI1Cy5E7zfcAUh20uLUDfSoM9McVaPlWMGR2d0bMaKrCxyPO1
JCV+o2ODAtQ7+0nld+nZax33jZdn2rTY2EdUlEGR8zNKoDLoRQh8je65VCAdaQql
jZkZaefMamPWz6sx+SvdgtM68y8uf/2Q81jNF9GDVxVDtGCdgYn+fMhY47jjoG5F
7ECAsC/TOcXILxdRnBZQu5WyF8Ehh7t23mIIbspq8nv2etVbR4ZdC+dSvvvx0/w=
=8If4
-----END PGP SIGNATURE-----

--xxPj3e9wdasxDr3hoW1M7sN8D7Xc1PhIP--




From MAILER-DAEMON Thu Oct 06 16:20:09 2016
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1bsF9F-0007yO-NO
	for mharc-bug-diffutils@gnu.org; Thu, 06 Oct 2016 16:20:09 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:50747)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bsF9D-0007wk-W9
	for bug-diffutils@gnu.org; Thu, 06 Oct 2016 16:20:08 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bsF97-0008Av-UZ
	for bug-diffutils@gnu.org; Thu, 06 Oct 2016 16:20:06 -0400
Received: from debbugs.gnu.org ([208.118.235.43]:40741)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bsF97-0008Aj-Qw
	for bug-diffutils@gnu.org; Thu, 06 Oct 2016 16:20:01 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bsF97-0002Z1-K0
	for bug-diffutils@gnu.org; Thu, 06 Oct 2016 16:20:01 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Paul Eggert <eggert@cs.ucla.edu>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-diffutils@gnu.org
Resent-Date: Thu, 06 Oct 2016 20:20:01 +0000
Resent-Message-ID: <handler.24629.B24629.14757851539791@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 24629
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords: notabug
To: Norbert Kiesel <nkiesel@gmail.com>, 24629@debbugs.gnu.org
Received: via spool by 24629-submit@debbugs.gnu.org id=B24629.14757851539791
	(code B ref 24629); Thu, 06 Oct 2016 20:20:01 +0000
Received: (at 24629) by debbugs.gnu.org; 6 Oct 2016 20:19:13 +0000
Received: from localhost ([127.0.0.1]:46931 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1bsF8L-0002Xr-15
	for submit@debbugs.gnu.org; Thu, 06 Oct 2016 16:19:13 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:59680)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <eggert@cs.ucla.edu>) id 1bsF8I-0002Xd-F6
	for 24629@debbugs.gnu.org; Thu, 06 Oct 2016 16:19:10 -0400
Received: from localhost (localhost [127.0.0.1])
	by zimbra.cs.ucla.edu (Postfix) with ESMTP id 9FCE21611E7;
	Thu,  6 Oct 2016 13:19:04 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
	by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
	with ESMTP id P4xdlApou8S2; Thu,  6 Oct 2016 13:19:04 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
	by zimbra.cs.ucla.edu (Postfix) with ESMTP id EA8F41611D8;
	Thu,  6 Oct 2016 13:19:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
	by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
	with ESMTP id P8dhgXSWUe5I; Thu,  6 Oct 2016 13:19:03 -0700 (PDT)
Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200])
	by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id D1AFA1601E5;
	Thu,  6 Oct 2016 13:19:03 -0700 (PDT)
References: <CAM+g_NsE_B16qTDX0Kb0H0P9PRXPdJE_LhoToeGSjf0jcD=iFg@mail.gmail.com>
From: Paul Eggert <eggert@cs.ucla.edu>
Organization: UCLA Computer Science Department
Message-ID: <65debb62-8ee0-f47d-b27e-d987222b82e5@cs.ucla.edu>
Date: Thu, 6 Oct 2016 13:19:03 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
	Thunderbird/45.3.0
MIME-Version: 1.0
In-Reply-To: <CAM+g_NsE_B16qTDX0Kb0H0P9PRXPdJE_LhoToeGSjf0jcD=iFg@mail.gmail.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 208.118.235.43
Subject: [bug-diffutils] bug#24629: bug#24629: Make unified diff
 configurable default
X-BeenThere: bug-diffutils@gnu.org
List-Id: "All diffutils discussion." <bug-diffutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-diffutils/>
List-Post: <mailto:bug-diffutils@gnu.org>
List-Help: <mailto:bug-diffutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 06 Oct 2016 20:20:09 -0000

On 10/06/2016 12:48 PM, Norbert Kiesel wrote:
> But we should be able to support a GNU_DIFF_FORMAT environment
> variable that sets the default format, no?

It might be a good idea to change the default output format. I expect 
the first step would be to change 'diff' to warn on stderr if no output 
format option is specified; you could silence the warning with the 
--normal option, or by setting POSIXLY_CORRECT. This step should also 
document the first step (and the intent to change the default) in the 
usual places. After some time in some later release we could then change 
the default.

I'd rather not have diff's behavior depend on a new environment 
variable. Environment variables are a pain to get right and something 
like this could break security-relevant code.





From MAILER-DAEMON Thu Oct 06 17:45:11 2016
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1bsGTX-0006Fh-OL
	for mharc-bug-diffutils@gnu.org; Thu, 06 Oct 2016 17:45:11 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:34002)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bsGTU-0006BN-MC
	for bug-diffutils@gnu.org; Thu, 06 Oct 2016 17:45:10 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bsGTO-0004Lo-Ou
	for bug-diffutils@gnu.org; Thu, 06 Oct 2016 17:45:07 -0400
Received: from debbugs.gnu.org ([208.118.235.43]:40794)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bsGTO-0004Lj-Ew
	for bug-diffutils@gnu.org; Thu, 06 Oct 2016 17:45:02 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bsGTO-0006DY-8i
	for bug-diffutils@gnu.org; Thu, 06 Oct 2016 17:45:02 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Norbert Kiesel <nkiesel@gmail.com>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-diffutils@gnu.org
Resent-Date: Thu, 06 Oct 2016 21:45:02 +0000
Resent-Message-ID: <handler.24629.D24629.147579028623841@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 24629
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords: notabug
To: Eric Blake <eblake@redhat.com>
Cc: 24629-done@debbugs.gnu.org, GNU bug control <control@debbugs.gnu.org>
Received: via spool by 24629-done@debbugs.gnu.org id=D24629.147579028623841
	(code D ref 24629); Thu, 06 Oct 2016 21:45:02 +0000
Received: (at 24629-done) by debbugs.gnu.org; 6 Oct 2016 21:44:46 +0000
Received: from localhost ([127.0.0.1]:46982 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1bsGT7-0006CS-SC
	for submit@debbugs.gnu.org; Thu, 06 Oct 2016 17:44:46 -0400
Received: from mail-io0-f172.google.com ([209.85.223.172]:36246)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <nkiesel@gmail.com>)
	id 1bsGT5-0006C8-1G; Thu, 06 Oct 2016 17:44:44 -0400
Received: by mail-io0-f172.google.com with SMTP id j37so29373349ioo.3;
	Thu, 06 Oct 2016 14:44:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; 
	h=mime-version:in-reply-to:references:from:date:message-id:subject:to
	:cc; bh=U7qejQ5so8NbVeC0HGXeNXEJfOGnyQ7doJ15Tx1B3RQ=;
	b=euyl4tvNF/PE3yLcKdn24H2JtpS+z9qdjmbxEZUUV/dSTOaFYiEsk1RdeAjRaBlD5i
	0U+f/hRaFhVWjFWG0tgoisKcSOiPpF3sNnS0wFadNpdn9gNVVdNoQsy0Q0pys47LIv0v
	g3gyPQbqy/ZDVNXDC6MYTW2/IHZABQrVfhkLMaroWV+st+WVoZkRnxKbBK80MKjc10rO
	LYXXhbcfu9EJVAI6mUh0Z/jLqVmI1RmiqBL6owSTDmdy562BTI3XSFEAyffr2wY97ptJ
	mMs2p4+Avc2DFX8wSHLJ+Y9pCU16ZdXA8CdLsOgT0Nhlqf7W70UBBJgKOkS6EW0Whnyv
	tuZQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20130820;
	h=x-gm-message-state:mime-version:in-reply-to:references:from:date
	:message-id:subject:to:cc;
	bh=U7qejQ5so8NbVeC0HGXeNXEJfOGnyQ7doJ15Tx1B3RQ=;
	b=E01/LYlTa411l0D/3NS6UBF3Vj/8DjUAn2ej1qZx+BZNViXnkoGAJH0RYhZRW60Dkm
	QSlVQivrMqahO965QXugOI4+f7xtXXjk5AiZHQ5urp8TrRmCxymwSHKRasaGE50RA32u
	Ww32haad2MfLJTJr4X3tjS7dfek4mup7uamvmEMwL64lbf9RaXfJ/oDHl2PQFFIYchAA
	4bYqYdv1FBCPCpG8eHldotPeuRDvZTmOO5k4tgU+7mKgf1UV177ZEwctlSNeO06qi8BO
	szBIo3UcCzyyVVuxExGotxyh6QoCDHsLXiESW5rEhDDb9NXCdOazQjFArDNEuAqBWBAO
	F+Vw==
X-Gm-Message-State: AA6/9RlzdT28dAv3Tm6KhaG+TStDDtjrsnHVMKIepceISN4p47JjB5I1Dx6YTkvAocA2G2/nrXBtnLaBu0FkNw==
X-Received: by 10.107.10.201 with SMTP id 70mr20245908iok.165.1475790276567;
	Thu, 06 Oct 2016 14:44:36 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.107.19.204 with HTTP; Thu, 6 Oct 2016 14:44:36 -0700 (PDT)
In-Reply-To: <0cce8eb6-5558-65c7-3d6f-16f19d63ba04@redhat.com>
References: <CAM+g_NsE_B16qTDX0Kb0H0P9PRXPdJE_LhoToeGSjf0jcD=iFg@mail.gmail.com>
	<0cce8eb6-5558-65c7-3d6f-16f19d63ba04@redhat.com>
From: Norbert Kiesel <nkiesel@gmail.com>
Date: Thu, 6 Oct 2016 14:44:36 -0700
Message-ID: <CAM+g_NvpgdFzENj2kMufnaBF1AnD2MBzp4xrMdenp3sTNuc=ng@mail.gmail.com>
Content-Type: multipart/alternative; boundary=001a113eeab032a6e0053e393309
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 208.118.235.43
Subject: [bug-diffutils] bug#24629: bug#24629: Make unified diff
 configurable default
X-BeenThere: bug-diffutils@gnu.org
List-Id: "All diffutils discussion." <bug-diffutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-diffutils/>
List-Post: <mailto:bug-diffutils@gnu.org>
List-Help: <mailto:bug-diffutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 06 Oct 2016 21:45:10 -0000

--001a113eeab032a6e0053e393309
Content-Type: text/plain; charset=UTF-8

Yeah, I got that POSIXLY_CORRECT idea backwards: I wanted to suggest to
keep the default as --normal when POSIXLY_CORRECT is set, and otherwise
switch to --unified.

I also understand the reluctance to add another environment variable that
changes behavior.

But: --normal is _really_ no longer what user normally want or use.  I
would even go so far to say that it's never used anymore. Yes, there might
be the one-off script that really expects the diff --normal output.  But
that most likely runs on a Solaris system that was not updated since 1995
and thus anyway will never encounter this change.


On Thu, Oct 6, 2016 at 1:18 PM, Eric Blake <eblake@redhat.com> wrote:

> tag 24629 notabug
> thanks
>
> On 10/06/2016 02:48 PM, Norbert Kiesel wrote:
> > Hi,
> >
> > it's been ages that I actually wanted to produce a "classic" diff, and
> > I don't think I'm alone in that.  Yet, I still have to remember to add
> > `-u` every time I invoke `diff`.
> >
> > I understand changing the default is controversial. But perhaps even
> > using "classic" as default unless POSIXLY_CORRECT is set.
>
> I think you said that backwards, and are proposing that diff would
> output -u format by default, and ed script format if POSIXLY_CORRECT is
> set.  At any rate, I'm not a big fan of the idea; POSIXLY_CORRECT should
> control an absolute bare minimum of changes (only where we intentionally
> differ from POSIX as in incompatible extension), as you still risk
> breaking many scripts (most of which intentionally don't sent
> POSIXLY_CORRECT).
>
> >
> > But we should be able to support a GNU_DIFF_FORMAT environment
> > variable that sets the default format, no?
>
> No. We've already learned, from sad experience, that environment
> variables that affect default behavior are VERY prone to breaking
> existing scripts that aren't aware of the new environment variable
> needing to be removed before getting the output they are used to.  In
> fact, existing GNU programs have been actively trying to move away from
> this paradigm (observe the treatment of GREP_OPTIONS in grep).
> Environment variables that affect non-default output, such as LS_COLORS,
> are less problematic - except that then they aren't the default so it
> still doesn't help your stated use case of getting the new behavior by
> default.
>
> >
> > I could send a patch, but first want to understand if that would have
> > any chance of being applied.
>
> Probably not worth it.  As such, I'm tagging this as not a bug in the
> database, although you should feel free to add further comments to the
> thread.
>
> >
> > </nk>
> >
> > P.S.: I know I could write my own little wrapper script/alias/shell
> > function, but that all seems dirty in one way or another. --nk
>
> Actually, that IS what we recommend.  If you have a particular way that
> a tool behaves best for you, then the BEST thing to do IS to write a
> wrapper script which adds the appropriate options, and put that wrapper
> script first on your PATH for interactive operation.
>
> --
> Eric Blake   eblake redhat com    +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
>
>

--001a113eeab032a6e0053e393309
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div>Yeah, I got that POSIXLY_CORRECT idea backwards:=
 I wanted to suggest to keep the default as --normal when POSIXLY_CORRECT i=
s set, and otherwise switch to --unified.<br><br></div>I also understand th=
e reluctance to add another environment variable that changes behavior.<br>=
<br></div>But: --normal is _really_ no longer what user normally want or us=
e.=C2=A0 I would even go so far to say that it&#39;s never used anymore. Ye=
s, there might be the one-off script that really expects the diff --normal =
output.=C2=A0 But that most likely runs on a Solaris system that was not up=
dated since 1995 and thus anyway will never encounter this change.<br><div>=
<div><br></div></div></div><div class=3D"gmail_extra"><br><div class=3D"gma=
il_quote">On Thu, Oct 6, 2016 at 1:18 PM, Eric Blake <span dir=3D"ltr">&lt;=
<a href=3D"mailto:eblake@redhat.com" target=3D"_blank">eblake@redhat.com</a=
>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 =
0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">tag 24629 notabug<br>
thanks<br>
<br>
On 10/06/2016 02:48 PM, Norbert Kiesel wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; it&#39;s been ages that I actually wanted to produce a &quot;classic&q=
uot; diff, and<br>
&gt; I don&#39;t think I&#39;m alone in that.=C2=A0 Yet, I still have to re=
member to add<br>
&gt; `-u` every time I invoke `diff`.<br>
&gt;<br>
&gt; I understand changing the default is controversial. But perhaps even<b=
r>
&gt; using &quot;classic&quot; as default unless POSIXLY_CORRECT is set.<br=
>
<br>
I think you said that backwards, and are proposing that diff would<br>
output -u format by default, and ed script format if POSIXLY_CORRECT is<br>
set.=C2=A0 At any rate, I&#39;m not a big fan of the idea; POSIXLY_CORRECT =
should<br>
control an absolute bare minimum of changes (only where we intentionally<br=
>
differ from POSIX as in incompatible extension), as you still risk<br>
breaking many scripts (most of which intentionally don&#39;t sent<br>
POSIXLY_CORRECT).<br>
<br>
&gt;<br>
&gt; But we should be able to support a GNU_DIFF_FORMAT environment<br>
&gt; variable that sets the default format, no?<br>
<br>
No. We&#39;ve already learned, from sad experience, that environment<br>
variables that affect default behavior are VERY prone to breaking<br>
existing scripts that aren&#39;t aware of the new environment variable<br>
needing to be removed before getting the output they are used to.=C2=A0 In<=
br>
fact, existing GNU programs have been actively trying to move away from<br>
this paradigm (observe the treatment of GREP_OPTIONS in grep).<br>
Environment variables that affect non-default output, such as LS_COLORS,<br=
>
are less problematic - except that then they aren&#39;t the default so it<b=
r>
still doesn&#39;t help your stated use case of getting the new behavior by<=
br>
default.<br>
<br>
&gt;<br>
&gt; I could send a patch, but first want to understand if that would have<=
br>
&gt; any chance of being applied.<br>
<br>
Probably not worth it.=C2=A0 As such, I&#39;m tagging this as not a bug in =
the<br>
database, although you should feel free to add further comments to the<br>
thread.<br>
<br>
&gt;<br>
&gt; &lt;/nk&gt;<br>
&gt;<br>
&gt; P.S.: I know I could write my own little wrapper script/alias/shell<br=
>
&gt; function, but that all seems dirty in one way or another. --nk<br>
<br>
Actually, that IS what we recommend.=C2=A0 If you have a particular way tha=
t<br>
a tool behaves best for you, then the BEST thing to do IS to write a<br>
wrapper script which adds the appropriate options, and put that wrapper<br>
script first on your PATH for interactive operation.<br>
<span class=3D"HOEnZb"><font color=3D"#888888"><br>
--<br>
Eric Blake=C2=A0 =C2=A0eblake redhat com=C2=A0 =C2=A0 <a href=3D"tel:%2B1-9=
19-301-3266" value=3D"+19193013266">+1-919-301-3266</a><br>
Libvirt virtualization library <a href=3D"http://libvirt.org" rel=3D"norefe=
rrer" target=3D"_blank">http://libvirt.org</a><br>
<br>
</font></span></blockquote></div><br></div>

--001a113eeab032a6e0053e393309--




From MAILER-DAEMON Thu Oct 06 17:47:09 2016
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1bsGVR-0006nR-QF
	for mharc-bug-diffutils@gnu.org; Thu, 06 Oct 2016 17:47:09 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:34526)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bsGVP-0006n5-Kf
	for bug-diffutils@gnu.org; Thu, 06 Oct 2016 17:47:08 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bsGVJ-0005H6-Rq
	for bug-diffutils@gnu.org; Thu, 06 Oct 2016 17:47:06 -0400
Received: from debbugs.gnu.org ([208.118.235.43]:40801)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bsGVJ-0005H0-Na
	for bug-diffutils@gnu.org; Thu, 06 Oct 2016 17:47:01 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bsGVJ-0006Gu-Kl
	for bug-diffutils@gnu.org; Thu, 06 Oct 2016 17:47:01 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Norbert Kiesel <nkiesel@gmail.com>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-diffutils@gnu.org
Resent-Date: Thu, 06 Oct 2016 21:47:01 +0000
Resent-Message-ID: <handler.24629.B24629.147579039824077@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 24629
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords: notabug
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: 24629@debbugs.gnu.org
Received: via spool by 24629-submit@debbugs.gnu.org id=B24629.147579039824077
	(code B ref 24629); Thu, 06 Oct 2016 21:47:01 +0000
Received: (at 24629) by debbugs.gnu.org; 6 Oct 2016 21:46:38 +0000
Received: from localhost ([127.0.0.1]:46991 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1bsGUv-0006GH-Qf
	for submit@debbugs.gnu.org; Thu, 06 Oct 2016 17:46:38 -0400
Received: from mail-it0-f66.google.com ([209.85.214.66]:34829)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <nkiesel@gmail.com>) id 1bsGUt-0006G0-Sh
	for 24629@debbugs.gnu.org; Thu, 06 Oct 2016 17:46:36 -0400
Received: by mail-it0-f66.google.com with SMTP id l13so2493435itl.2
	for <24629@debbugs.gnu.org>; Thu, 06 Oct 2016 14:46:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; 
	h=mime-version:in-reply-to:references:from:date:message-id:subject:to
	:cc; bh=5dRHhvz3MVWoxqqt/fMnGP0uVfBtsd9aNMhH2x7fKN4=;
	b=cyRw7ExUawYDOZq1Un50a+yuOWGxwmhkVNIbPXKTmE28smby4I9WSsx5kGiINKWbU5
	Q+9cUSGSrL9xBirLHjkdFv88PYD6m3cC+SGR083cNJ2W8d1ofIpecorRh32gamY6XyJv
	B6BMtOEbHDHOm+nBaI+ArQsg5xa2HBE7SxBbrbCGAWhXWTnxeB+1deuQ1wT0JL68T3CK
	sJo5hzLsS2PaFeoCH0fEjtI8KKsJuvPGgmomCmRwSp5WmPjsDulVvRDIaOwufscSqwdi
	zDO45xwg7C8IPqsvRGIpcV9NB75RuxMonwiR/qAK8ifNtOAuGBn4i5AHmcV0taDN2k4o
	rF/Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20130820;
	h=x-gm-message-state:mime-version:in-reply-to:references:from:date
	:message-id:subject:to:cc;
	bh=5dRHhvz3MVWoxqqt/fMnGP0uVfBtsd9aNMhH2x7fKN4=;
	b=PAmHsk+GIJXseHRpvuHL1SU94wFtJcMtGBESnETcfMAc4NRATcAAwCcL023oZtUZ3U
	qjaLvogZ2uHBiuSSWN4rAnRy0HgZDyXqp879J5vhcx9S5AnqCIvTNnc/DxxFkpnHc4mf
	LOBYFZq+QaZuvk750KYi35zLPKaikpgE41q+lFPwcxVkvPUjWUYMZbpZpRd8LEvOpYCY
	wBM6ep4/+OeyEH4+yFF+wMxyxuITReiNbY+o76PBILc2GbITPDXE5NEnMESpseT+0v8F
	fYwV5Ya3jE+BQretCJxUXddxhuuive3quvkMa0edmYKO0AHA7wTtZG13j8R81XsGrAUa
	9oDw==
X-Gm-Message-State: AA6/9RlUMzS7xy6DYMDGs9i6mKtOgYddggo4BZeil0Oc36VWlv0RD6Kquus16uWClCCTSl5Klwq/qm8oOHVIAw==
X-Received: by 10.36.196.132 with SMTP id v126mr16582570itf.30.1475790390119; 
	Thu, 06 Oct 2016 14:46:30 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.107.19.204 with HTTP; Thu, 6 Oct 2016 14:46:29 -0700 (PDT)
In-Reply-To: <65debb62-8ee0-f47d-b27e-d987222b82e5@cs.ucla.edu>
References: <CAM+g_NsE_B16qTDX0Kb0H0P9PRXPdJE_LhoToeGSjf0jcD=iFg@mail.gmail.com>
	<65debb62-8ee0-f47d-b27e-d987222b82e5@cs.ucla.edu>
From: Norbert Kiesel <nkiesel@gmail.com>
Date: Thu, 6 Oct 2016 14:46:29 -0700
Message-ID: <CAM+g_Ntkf-342XcbJOMMH+0KgYc-Qe1QGRy-9es3=e7A2PjfXw@mail.gmail.com>
Content-Type: multipart/alternative; boundary=94eb2c0587def76149053e3939e8
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 208.118.235.43
Subject: [bug-diffutils] bug#24629: bug#24629: Make unified diff
 configurable default
X-BeenThere: bug-diffutils@gnu.org
List-Id: "All diffutils discussion." <bug-diffutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-diffutils/>
List-Post: <mailto:bug-diffutils@gnu.org>
List-Help: <mailto:bug-diffutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 06 Oct 2016 21:47:08 -0000

--94eb2c0587def76149053e3939e8
Content-Type: text/plain; charset=UTF-8

I like the two-step approach.  And this is clearly a feature that does not
need to be rushed.  You want me to send a patch for step#1?

On Thu, Oct 6, 2016 at 1:19 PM, Paul Eggert <eggert@cs.ucla.edu> wrote:

> On 10/06/2016 12:48 PM, Norbert Kiesel wrote:
>
>> But we should be able to support a GNU_DIFF_FORMAT environment
>> variable that sets the default format, no?
>>
>
> It might be a good idea to change the default output format. I expect the
> first step would be to change 'diff' to warn on stderr if no output format
> option is specified; you could silence the warning with the --normal
> option, or by setting POSIXLY_CORRECT. This step should also document the
> first step (and the intent to change the default) in the usual places.
> After some time in some later release we could then change the default.
>
> I'd rather not have diff's behavior depend on a new environment variable.
> Environment variables are a pain to get right and something like this could
> break security-relevant code.
>
>

--94eb2c0587def76149053e3939e8
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I like the two-step approach.=C2=A0 And this is clearly a =
feature that does not need to be rushed.=C2=A0 You want me to send a patch =
for step#1?<br></div><div class=3D"gmail_extra"><br><div class=3D"gmail_quo=
te">On Thu, Oct 6, 2016 at 1:19 PM, Paul Eggert <span dir=3D"ltr">&lt;<a hr=
ef=3D"mailto:eggert@cs.ucla.edu" target=3D"_blank">eggert@cs.ucla.edu</a>&g=
t;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0=
 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=3D"">On 10/0=
6/2016 12:48 PM, Norbert Kiesel wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
But we should be able to support a GNU_DIFF_FORMAT environment<br>
variable that sets the default format, no?<br>
</blockquote>
<br></span>
It might be a good idea to change the default output format. I expect the f=
irst step would be to change &#39;diff&#39; to warn on stderr if no output =
format option is specified; you could silence the warning with the --normal=
 option, or by setting POSIXLY_CORRECT. This step should also document the =
first step (and the intent to change the default) in the usual places. Afte=
r some time in some later release we could then change the default.<br>
<br>
I&#39;d rather not have diff&#39;s behavior depend on a new environment var=
iable. Environment variables are a pain to get right and something like thi=
s could break security-relevant code.<br>
<br>
</blockquote></div><br></div>

--94eb2c0587def76149053e3939e8--




From MAILER-DAEMON Thu Oct 06 18:45:10 2016
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1bsHPa-0007mN-43
	for mharc-bug-diffutils@gnu.org; Thu, 06 Oct 2016 18:45:10 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:57547)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bsHPY-0007iX-0m
	for bug-diffutils@gnu.org; Thu, 06 Oct 2016 18:45:09 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bsHPS-0004EO-Lx
	for bug-diffutils@gnu.org; Thu, 06 Oct 2016 18:45:06 -0400
Received: from debbugs.gnu.org ([208.118.235.43]:40831)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bsHPS-0004EI-Hc
	for bug-diffutils@gnu.org; Thu, 06 Oct 2016 18:45:02 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bsHPS-0000rQ-21
	for bug-diffutils@gnu.org; Thu, 06 Oct 2016 18:45:02 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Norbert Kiesel <nkiesel@gmail.com>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-diffutils@gnu.org
Resent-Date: Thu, 06 Oct 2016 22:45:02 +0000
Resent-Message-ID: <handler.24629.B24629.14757938843267@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 24629
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords: notabug
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: 24629@debbugs.gnu.org
Received: via spool by 24629-submit@debbugs.gnu.org id=B24629.14757938843267
	(code B ref 24629); Thu, 06 Oct 2016 22:45:02 +0000
Received: (at 24629) by debbugs.gnu.org; 6 Oct 2016 22:44:44 +0000
Received: from localhost ([127.0.0.1]:47021 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1bsHPA-0000qc-89
	for submit@debbugs.gnu.org; Thu, 06 Oct 2016 18:44:44 -0400
Received: from mail-io0-f170.google.com ([209.85.223.170]:32812)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <nkiesel@gmail.com>) id 1bsHP8-0000qQ-7v
	for 24629@debbugs.gnu.org; Thu, 06 Oct 2016 18:44:42 -0400
Received: by mail-io0-f170.google.com with SMTP id q192so30578187iod.0
	for <24629@debbugs.gnu.org>; Thu, 06 Oct 2016 15:44:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; 
	h=mime-version:in-reply-to:references:from:date:message-id:subject:to
	:cc; bh=3sLu3cU/AniK3i1LB8kn+qnftdlN4slWdlotwFt6vqg=;
	b=fXKvTIKcgNMef0d865eNbHfntdRhY90YezR2dtRybfokH4utJmZZWbghZoXAJ1C8fN
	4iVNDsuhU9Yf66CTAttHwicFrRsJim9AHd4peWZYUlOX3uNbT47jklLmSPGzWRjDwIvj
	0lfxQ9ukpQSZK+BrJkc5QTBi6j3+gu7+m1TxSSqn9yE/7kT4L+mQ/FVNO3e3aFskewE2
	VpyehW4Ur8BgD/oYkccM3XbqPbdCdwnulXrDRem67t2X8XX8EIDUUkDo2cMlQg+waCSG
	IfU94TfnkEfmdzZu4kWxPnLFbWvE3rL86coYGBfKl79GWiEc26FAOnkJ9U7FR0MrY4ev
	Sl2A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20130820;
	h=x-gm-message-state:mime-version:in-reply-to:references:from:date
	:message-id:subject:to:cc;
	bh=3sLu3cU/AniK3i1LB8kn+qnftdlN4slWdlotwFt6vqg=;
	b=EocwtBwj5kTlsO8lFNzWV0YSfznjdtBrDyXGYlbqx+NCD4L5rxriBv0rvj6Xrf/hNU
	87br8XHWFi5IJ8U5/ljTp0WMA2+rYA7JY77Lr7frRNuq2jVxK2pXPLpe3DNNJcevw2ac
	eEqJt3t//27whNByFWleMEkB3OpeMCANAOVFULDAWCNbHt/tikQZtsjorkhzLN46GIxs
	wpAgM5QcinYkrNvCq5FXb1AtWzrjsZZGMV7rsDsE2Mcu1fyO2RzTA/ihA3lxUX0hinaE
	q6AG6/8GaGhF7ZmQGzQxaqUu1mFdHkX7QMa4/l4t2uno8jW7DvfnoCuYvVPszR2Nc03P
	RvOQ==
X-Gm-Message-State: AA6/9Rl5+T94U/KBHFgB2jY4KaxeeyliUwzXy1sCU4URvZjiJ94HWRcXKCi+xoUi38WUKRb0u/YXDdOpzVcaSw==
X-Received: by 10.107.164.103 with SMTP id n100mr16933450ioe.35.1475793876557; 
	Thu, 06 Oct 2016 15:44:36 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.107.19.204 with HTTP; Thu, 6 Oct 2016 15:44:35 -0700 (PDT)
In-Reply-To: <CAM+g_Ntkf-342XcbJOMMH+0KgYc-Qe1QGRy-9es3=e7A2PjfXw@mail.gmail.com>
References: <CAM+g_NsE_B16qTDX0Kb0H0P9PRXPdJE_LhoToeGSjf0jcD=iFg@mail.gmail.com>
	<65debb62-8ee0-f47d-b27e-d987222b82e5@cs.ucla.edu>
	<CAM+g_Ntkf-342XcbJOMMH+0KgYc-Qe1QGRy-9es3=e7A2PjfXw@mail.gmail.com>
From: Norbert Kiesel <nkiesel@gmail.com>
Date: Thu, 6 Oct 2016 15:44:35 -0700
Message-ID: <CAM+g_Nv6ZFabmau8UjWNx6OtikE+uFUNmUrGZHK=wJ_hqE-MUw@mail.gmail.com>
Content-Type: multipart/mixed; boundary=001a1141c956c642d3053e3a09ab
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 208.118.235.43
Subject: [bug-diffutils] bug#24629: bug#24629: Make unified diff
 configurable default
X-BeenThere: bug-diffutils@gnu.org
List-Id: "All diffutils discussion." <bug-diffutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-diffutils/>
List-Post: <mailto:bug-diffutils@gnu.org>
List-Help: <mailto:bug-diffutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 06 Oct 2016 22:45:09 -0000

--001a1141c956c642d3053e3a09ab
Content-Type: multipart/alternative; boundary=001a1141c956c642c9053e3a09a9

--001a1141c956c642c9053e3a09a9
Content-Type: text/plain; charset=UTF-8

Patch was dead simple, so I just created it just in case.

On Thu, Oct 6, 2016 at 2:46 PM, Norbert Kiesel <nkiesel@gmail.com> wrote:

> I like the two-step approach.  And this is clearly a feature that does not
> need to be rushed.  You want me to send a patch for step#1?
>
> On Thu, Oct 6, 2016 at 1:19 PM, Paul Eggert <eggert@cs.ucla.edu> wrote:
>
>> On 10/06/2016 12:48 PM, Norbert Kiesel wrote:
>>
>>> But we should be able to support a GNU_DIFF_FORMAT environment
>>> variable that sets the default format, no?
>>>
>>
>> It might be a good idea to change the default output format. I expect the
>> first step would be to change 'diff' to warn on stderr if no output format
>> option is specified; you could silence the warning with the --normal
>> option, or by setting POSIXLY_CORRECT. This step should also document the
>> first step (and the intent to change the default) in the usual places.
>> After some time in some later release we could then change the default.
>>
>> I'd rather not have diff's behavior depend on a new environment variable.
>> Environment variables are a pain to get right and something like this could
>> break security-relevant code.
>>
>>
>

--001a1141c956c642c9053e3a09a9
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Patch was dead simple, so I just created it just in case.<=
br></div><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On Thu, =
Oct 6, 2016 at 2:46 PM, Norbert Kiesel <span dir=3D"ltr">&lt;<a href=3D"mai=
lto:nkiesel@gmail.com" target=3D"_blank">nkiesel@gmail.com</a>&gt;</span> w=
rote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;borde=
r-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">I like the two-ste=
p approach.=C2=A0 And this is clearly a feature that does not need to be ru=
shed.=C2=A0 You want me to send a patch for step#1?<br></div><div class=3D"=
HOEnZb"><div class=3D"h5"><div class=3D"gmail_extra"><br><div class=3D"gmai=
l_quote">On Thu, Oct 6, 2016 at 1:19 PM, Paul Eggert <span dir=3D"ltr">&lt;=
<a href=3D"mailto:eggert@cs.ucla.edu" target=3D"_blank">eggert@cs.ucla.edu<=
/a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:=
0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On 10/06/2016=
 12:48 PM, Norbert Kiesel wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
But we should be able to support a GNU_DIFF_FORMAT environment<br>
variable that sets the default format, no?<br>
</blockquote>
<br></span>
It might be a good idea to change the default output format. I expect the f=
irst step would be to change &#39;diff&#39; to warn on stderr if no output =
format option is specified; you could silence the warning with the --normal=
 option, or by setting POSIXLY_CORRECT. This step should also document the =
first step (and the intent to change the default) in the usual places. Afte=
r some time in some later release we could then change the default.<br>
<br>
I&#39;d rather not have diff&#39;s behavior depend on a new environment var=
iable. Environment variables are a pain to get right and something like thi=
s could break security-relevant code.<br>
<br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>

--001a1141c956c642c9053e3a09a9--

--001a1141c956c642d3053e3a09ab
Content-Type: text/plain; charset=US-ASCII; name="unified_as_default.diff"
Content-Disposition: attachment; filename="unified_as_default.diff"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_ityxke1m0

RnJvbSA0Y2Q3Y2JjZmYzMzYxZjBiMTdkYjI2MjczMDFjZWJjMzU5ZTAyMTUwIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBOb3JiZXJ0IEtpZXNlbCA8bmtpZXNlbEBtZXRyaWNzdHJlYW0u
Y29tPgpEYXRlOiBUaHUsIDYgT2N0IDIwMTYgMTU6MzI6NTAgLTA3MDAKU3ViamVjdDogW1BBVENI
XSBkaWZmOiBXYXJuIGFib3V0IGZ1dHVyZSBjaGFuZ2UgdG8gZGVmYXVsdCBzdHlsZQoKZGlmZiBz
dGlsbCB1c2VzIC0tbm9ybWFsIGFzIGRlZmF1bHQgZGlmZiBzdHlsZSwgYWx0aG91Z2ggdGhpcwpp
cyBubyBsb25nZXIgcmVjb21tZW5kZWQgdG8gYmUgdXNlZCBhbmQgYWxzbyBhY3R1YWxseSBtb3N0
bHkKdW51c2VkLiAgVGh1cywgZnV0aXJlIHZlcnNpb25zIG9mIGRpZmYgd2lsbCBzd2l0Y2ggdG8g
LS11bmlmaWVkCmFzIG5ldyBkZWZhdWx0IHN0eWxlLgoKVGhpcyBjb21taXQgb25seSBhZGRzIGEg
d2FybmluZyBpbmZvcm1pbmcgdXNlcnMgb2YgdGhhdCBmdXR1cmUKY2hhbmdlLgotLS0KIE5FV1Mg
ICAgICAgfCA3ICsrKysrKysKIHNyYy9kaWZmLmMgfCA3ICsrKysrKy0KIDIgZmlsZXMgY2hhbmdl
ZCwgMTMgaW5zZXJ0aW9ucygrKSwgMSBkZWxldGlvbigtKQoKZGlmZiAtLWdpdCBhL05FV1MgYi9O
RVdTCmluZGV4IDQ3MzMzMmUuLmFiNjZmZmIgMTAwNjQ0Ci0tLSBhL05FV1MKKysrIGIvTkVXUwpA
QCAtMiw2ICsyLDEzIEBAIEdOVSBkaWZmdXRpbHMgTkVXUyAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgIC0qLSBvdXRsaW5lIC0qLQogCiAqIE5vdGV3b3J0aHkgY2hhbmdlcyBpbiBy
ZWxlYXNlID8uPyAoPz8/Py0/Py0/PykgWz9dCiAKKyoqIE5ldyBmZWF0dXJlcworCisgIElmIHRo
ZSBkaWZmIG91dHB1dCBzdHlsZSBpcyBub3Qgc2V0LCBkaWZmIHByaW50cyBhIHdhcm5pbmcgdGhh
dCBhIGZ1dHVyZQorICByZWxlYXNlIHdpbGwgc3dpdGNoIHRoZSBkZWZhdWx0IG91dHB1dCBzdHls
ZSBmcm9tIC0tbm9ybWFsIHRvIC0tdW5pZmllZC4gIFRoaXMKKyAgd2FybmluZyBjYW4gYmUgc3Vw
cHJlc3NlZCBieSBzZXR0aW5nIHRoZSBQT1NJWExZX0NPUlJFQ1QgZW52aXJvbm1lbnQgdmFyaWFi
bGUKKyAgKHRob3VnaCB0aGF0IGhhcyBzb21lIG90aGVyIHNpZGUgZWZmZWN0cyBhcyB3ZWxsKS4K
KwogKiogQnVnIGZpeGVzCiAKICAgZGlmZiBubyBsb25nZXIgbWlzaGFuZGxlcyBsaW5lIG51bWJl
cnMgZXhjZWVkaW5nIDIqKjMxIG9uIE1pbmd3LXc2NC4KZGlmZiAtLWdpdCBhL3NyYy9kaWZmLmMg
Yi9zcmMvZGlmZi5jCmluZGV4IDY4Njk0NWUuLjEyNzkyYTEgMTAwNjQ0Ci0tLSBhL3NyYy9kaWZm
LmMKKysrIGIvc3JjL2RpZmYuYwpAQCAtNjcyLDcgKzY3MiwxMiBAQCBtYWluIChpbnQgYXJnYywg
Y2hhciAqKmFyZ3YpCiAJICAgIGNvbnRleHQgPSAzOwogCX0KICAgICAgIGVsc2UKLQlzcGVjaWZ5
X3N0eWxlIChPVVRQVVRfTk9STUFMKTsKKwl7CisJICBjaGFyIGNvbnN0ICp0ID0gZ2V0ZW52ICgi
UE9TSVhMWV9DT1JSRUNUIik7CisJICBpZiAoIXQpCisJICAgICBlcnJvciAoMCwgMCwgXygiRnV0
dXJlIHZlcnNpb25zIG9mIGRpZmYgd2lsbCB1c2UgLS11bmlmaWVkIGluc3RlYWQgb2YgLS1ub3Jt
YWwgYXMgZGVmYXVsdCBzdHlsZSIpKTsKKwkgIHNwZWNpZnlfc3R5bGUgKE9VVFBVVF9OT1JNQUwp
OworCX0KICAgICB9CiAKICAgaWYgKG91dHB1dF9zdHlsZSAhPSBPVVRQVVRfQ09OVEVYVCB8fCBo
YXJkX2xvY2FsZSAoTENfVElNRSkpCi0tIAoyLjkuMwoK
--001a1141c956c642d3053e3a09ab--




From MAILER-DAEMON Thu Oct 06 19:50:07 2016
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1bsIQR-00056j-Cx
	for mharc-bug-diffutils@gnu.org; Thu, 06 Oct 2016 19:50:07 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:51648)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bsIQP-00055K-9t
	for bug-diffutils@gnu.org; Thu, 06 Oct 2016 19:50:06 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bsIQM-0001Na-5C
	for bug-diffutils@gnu.org; Thu, 06 Oct 2016 19:50:05 -0400
Received: from debbugs.gnu.org ([208.118.235.43]:40854)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bsIQM-0001NW-1H
	for bug-diffutils@gnu.org; Thu, 06 Oct 2016 19:50:02 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bsIQL-0002Tx-Or
	for bug-diffutils@gnu.org; Thu, 06 Oct 2016 19:50:01 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Paul Eggert <eggert@cs.ucla.edu>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-diffutils@gnu.org
Resent-Date: Thu, 06 Oct 2016 23:50:01 +0000
Resent-Message-ID: <handler.24629.B24629.14757977529465@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 24629
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords: notabug
To: Norbert Kiesel <nkiesel@gmail.com>
Cc: 24629@debbugs.gnu.org
Received: via spool by 24629-submit@debbugs.gnu.org id=B24629.14757977529465
	(code B ref 24629); Thu, 06 Oct 2016 23:50:01 +0000
Received: (at 24629) by debbugs.gnu.org; 6 Oct 2016 23:49:12 +0000
Received: from localhost ([127.0.0.1]:47044 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1bsIPX-0002Sb-UR
	for submit@debbugs.gnu.org; Thu, 06 Oct 2016 19:49:12 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:43812)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <eggert@cs.ucla.edu>) id 1bsIPV-0002SE-O0
	for 24629@debbugs.gnu.org; Thu, 06 Oct 2016 19:49:10 -0400
Received: from localhost (localhost [127.0.0.1])
	by zimbra.cs.ucla.edu (Postfix) with ESMTP id F37681601AA;
	Thu,  6 Oct 2016 16:49:03 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
	by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
	with ESMTP id 9CMjTgRkuFc3; Thu,  6 Oct 2016 16:49:03 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
	by zimbra.cs.ucla.edu (Postfix) with ESMTP id 3E1C8160D25;
	Thu,  6 Oct 2016 16:49:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
	by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
	with ESMTP id zQk1RuYgAvyR; Thu,  6 Oct 2016 16:49:03 -0700 (PDT)
Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200])
	by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 25EDF1601AA;
	Thu,  6 Oct 2016 16:49:03 -0700 (PDT)
References: <CAM+g_NsE_B16qTDX0Kb0H0P9PRXPdJE_LhoToeGSjf0jcD=iFg@mail.gmail.com>
	<65debb62-8ee0-f47d-b27e-d987222b82e5@cs.ucla.edu>
	<CAM+g_Ntkf-342XcbJOMMH+0KgYc-Qe1QGRy-9es3=e7A2PjfXw@mail.gmail.com>
	<CAM+g_Nv6ZFabmau8UjWNx6OtikE+uFUNmUrGZHK=wJ_hqE-MUw@mail.gmail.com>
From: Paul Eggert <eggert@cs.ucla.edu>
Organization: UCLA Computer Science Department
Message-ID: <97fd6587-2e2f-2004-a44d-13bb6ea49c9f@cs.ucla.edu>
Date: Thu, 6 Oct 2016 16:48:59 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
	Thunderbird/45.3.0
MIME-Version: 1.0
In-Reply-To: <CAM+g_Nv6ZFabmau8UjWNx6OtikE+uFUNmUrGZHK=wJ_hqE-MUw@mail.gmail.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 208.118.235.43
Subject: [bug-diffutils] bug#24629: bug#24629: Make unified diff
 configurable default
X-BeenThere: bug-diffutils@gnu.org
List-Id: "All diffutils discussion." <bug-diffutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-diffutils/>
List-Post: <mailto:bug-diffutils@gnu.org>
List-Help: <mailto:bug-diffutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 06 Oct 2016 23:50:06 -0000

I'm afraid it's not that simple. The patch will cause diff3 to output 
that warning, since diff3 uses diff without --normal, so diff3.c needs 
fixing. Also, the manual needs fixing (doc/diffutils.texi). And the 
output of "diff --help" (src/diff.c). And there should be a test case 
testing the new behavior.

More important. Suppose I want a program with GNU diff's traditional 
behavior and so use a shell script 'mydiff' like this:

   #!/bin/sh
   exec diff --normal "$@"

This won't work, because if I invoke the script like this:

   mydiff -c foo bar

diff will complain about --normal conflicting with -c. So I suppose diff 
needs to change so that later output specifiers override earlier. But 
here things are a bit tricky, e.g., right now '-C5 -c' is equivalent to 
'-c -C5' and I assume we don't want to change this.

One other idea. If the invoker uses any long option, or any option other 
than -b and -r, diff can default to the -u output format regardless of 
whether POSIXLY_CORRECT is set. This is because POSIX does not specify 
the behavior of these other options.

Plus, it would be nice if we could address Eric's concerns somehow.

I hope I haven't scared you away entirely....




From MAILER-DAEMON Thu Oct 06 20:31:08 2016
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1bsJ48-0001rM-Jm
	for mharc-bug-diffutils@gnu.org; Thu, 06 Oct 2016 20:31:08 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:40683)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bsJ46-0001qu-EL
	for bug-diffutils@gnu.org; Thu, 06 Oct 2016 20:31:07 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bsJ42-00075x-6O
	for bug-diffutils@gnu.org; Thu, 06 Oct 2016 20:31:05 -0400
Received: from debbugs.gnu.org ([208.118.235.43]:40859)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bsJ41-00075R-W8
	for bug-diffutils@gnu.org; Thu, 06 Oct 2016 20:31:02 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bsJ41-0003Xx-PT
	for bug-diffutils@gnu.org; Thu, 06 Oct 2016 20:31:01 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Norbert Kiesel <nkiesel@gmail.com>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-diffutils@gnu.org
Resent-Date: Fri, 07 Oct 2016 00:31:01 +0000
Resent-Message-ID: <handler.24629.B24629.147580022913590@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 24629
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords: notabug
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: 24629@debbugs.gnu.org
Received: via spool by 24629-submit@debbugs.gnu.org id=B24629.147580022913590
	(code B ref 24629); Fri, 07 Oct 2016 00:31:01 +0000
Received: (at 24629) by debbugs.gnu.org; 7 Oct 2016 00:30:29 +0000
Received: from localhost ([127.0.0.1]:47049 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1bsJ3V-0003X7-8N
	for submit@debbugs.gnu.org; Thu, 06 Oct 2016 20:30:29 -0400
Received: from mail-io0-f193.google.com ([209.85.223.193]:32924)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <nkiesel@gmail.com>) id 1bsJ3T-0003Wq-6C
	for 24629@debbugs.gnu.org; Thu, 06 Oct 2016 20:30:27 -0400
Received: by mail-io0-f193.google.com with SMTP id q192so1796533iod.0
	for <24629@debbugs.gnu.org>; Thu, 06 Oct 2016 17:30:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; 
	h=mime-version:in-reply-to:references:from:date:message-id:subject:to
	:cc; bh=BhAFAJiFbHKtnGvwev/KqcZOPQx8ffmeLRKjMG5gHNw=;
	b=q3VLDRfdUJRHKCRfs3KyF2FRTOVDcqW+pwofFdxLbIa0iiiSNFCNSm/Q4GIg0nitIj
	GEhFBFWq6e+3Gd0Six2uXANKwtZHh3XVncKuZMr8J3tf14jlyaouzG1GdYHj7qMIqQVE
	q0PEUKO8G18Rc9UVR9I1/lIUTCPXfOIOggEdMzpg0uTkjXML/peJoIED5ROXAi8KmTH1
	B/+phRtjfQprOkYtKOWKMa7nMx75MY0gdbgZWGbF2r+dj7nAFl9o5lLVF5nnzLumLYtk
	szYpDMuBK5TmJLnOzNVo1hNKudY213eFbSssNZzm7YbTKB1TeDKLFFOd1sULWnhEExFb
	ICXA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20130820;
	h=x-gm-message-state:mime-version:in-reply-to:references:from:date
	:message-id:subject:to:cc;
	bh=BhAFAJiFbHKtnGvwev/KqcZOPQx8ffmeLRKjMG5gHNw=;
	b=GyWSr8H71r98ceTY3RCzIFmbrSdtuN56u/pWU0cRcb6B1enQ+xVJdhPPdimwhtvOMj
	jA1hNQge8iol6bE0oNYSVvpvSh81gXZs42WuMgMVV1hR7wustV5FRBrwgSS9hbwS5Jfu
	CTS2ZsBq0FYwYzRjvyEYBqDIkdJwb+6bUNNPlNMZw7ePhW5RreiTeSo6eug+qxJPqTtE
	8Q1hYSG9JiROsu6+QToG35rtvDHLE+vRIw0vpsjITPaX+EszP1KTaHd2t4akHSaLgs20
	9IvP0g5BbISxBX1lj8rkDrD41d30JZ76jfzIv877MbbXLrQvK3jJamMRahFiLyHU9BBY
	GL5g==
X-Gm-Message-State: AA6/9RmTylQSwqWhlH4JpqZikisoL+W59FGUT1yDBCgSfIoiDFcStnmRmrpZe2mBRd8hSzlFSSvTARz0VDcjuw==
X-Received: by 10.107.10.201 with SMTP id 70mr20897565iok.165.1475800219082;
	Thu, 06 Oct 2016 17:30:19 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.107.19.204 with HTTP; Thu, 6 Oct 2016 17:30:18 -0700 (PDT)
In-Reply-To: <97fd6587-2e2f-2004-a44d-13bb6ea49c9f@cs.ucla.edu>
References: <CAM+g_NsE_B16qTDX0Kb0H0P9PRXPdJE_LhoToeGSjf0jcD=iFg@mail.gmail.com>
	<65debb62-8ee0-f47d-b27e-d987222b82e5@cs.ucla.edu>
	<CAM+g_Ntkf-342XcbJOMMH+0KgYc-Qe1QGRy-9es3=e7A2PjfXw@mail.gmail.com>
	<CAM+g_Nv6ZFabmau8UjWNx6OtikE+uFUNmUrGZHK=wJ_hqE-MUw@mail.gmail.com>
	<97fd6587-2e2f-2004-a44d-13bb6ea49c9f@cs.ucla.edu>
From: Norbert Kiesel <nkiesel@gmail.com>
Date: Thu, 6 Oct 2016 17:30:18 -0700
Message-ID: <CAM+g_Nv1W=UyR_cvO9PQQo=YRwU4uo6_YiS1YhkBPkAuDTiz9A@mail.gmail.com>
Content-Type: multipart/alternative; boundary=001a113eeab0d168c6053e3b83e0
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 208.118.235.43
Subject: [bug-diffutils] bug#24629: bug#24629: Make unified diff
 configurable default
X-BeenThere: bug-diffutils@gnu.org
List-Id: "All diffutils discussion." <bug-diffutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-diffutils/>
List-Post: <mailto:bug-diffutils@gnu.org>
List-Help: <mailto:bug-diffutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 07 Oct 2016 00:31:07 -0000

--001a113eeab0d168c6053e3b83e0
Content-Type: text/plain; charset=UTF-8

Nope, keep it coming!

All valid concerns. I will think about it a bit more and come back with a
revised patch.

One idea for your second point could be that only --normal can be
overwritten by later style options.
Your example is also showing why Eric's idea of a wrapper script is not
that simple: I sometimes do use `diff -U0`, and thus his recommended `exec
diff --unified "$@"` would suffer from the same problems.

Perhaps adding a new `--default-style` option which is only used when no
other style is specified is also an option.  That way, I could have my
local diff run `exec /usr/bin/diff --default-style=unified "$@"`.  And
still better than an environment variable.  One slight problem is the funky
way that --default-style=unified=7 would look like. And of course that this
has to be parsed again.  So perhaps we could get aways with only supporting
normal, unified, and context as values for default-style.


On Thu, Oct 6, 2016 at 4:48 PM, Paul Eggert <eggert@cs.ucla.edu> wrote:

> I'm afraid it's not that simple. The patch will cause diff3 to output that
> warning, since diff3 uses diff without --normal, so diff3.c needs fixing.
> Also, the manual needs fixing (doc/diffutils.texi). And the output of "diff
> --help" (src/diff.c). And there should be a test case testing the new
> behavior.
>
> More important. Suppose I want a program with GNU diff's traditional
> behavior and so use a shell script 'mydiff' like this:
>
>   #!/bin/sh
>   exec diff --normal "$@"
>
> This won't work, because if I invoke the script like this:
>
>   mydiff -c foo bar
>
> diff will complain about --normal conflicting with -c. So I suppose diff
> needs to change so that later output specifiers override earlier. But here
> things are a bit tricky, e.g., right now '-C5 -c' is equivalent to '-c -C5'
> and I assume we don't want to change this.
>
> One other idea. If the invoker uses any long option, or any option other
> than -b and -r, diff can default to the -u output format regardless of
> whether POSIXLY_CORRECT is set. This is because POSIX does not specify the
> behavior of these other options.
>
> Plus, it would be nice if we could address Eric's concerns somehow.
>
> I hope I haven't scared you away entirely....
>

--001a113eeab0d168c6053e3b83e0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div><div>Nope, keep it coming!<br><br></div>All vali=
d concerns. I will think about it a bit more and come back with a revised p=
atch.<br><br></div>One idea for your second point could be that only --norm=
al can be overwritten by later style options.<br></div>Your example is also=
 showing why Eric&#39;s idea of a wrapper script is not that simple: I some=
times do use `diff -U0`, and thus his recommended `exec diff --unified &quo=
t;$@&quot;` would suffer from the same problems.<br><br>Perhaps adding a ne=
w `--default-style` option which is only used when no other style is specif=
ied is also an option.=C2=A0 That way, I could have my local diff run `exec=
 /usr/bin/diff --default-style=3Dunified &quot;$@&quot;`.=C2=A0 And still b=
etter than an environment variable.=C2=A0 One slight problem is the funky w=
ay that --default-style=3Dunified=3D7 would look like. And of course that t=
his has to be parsed again.=C2=A0 So perhaps we could get aways with only s=
upporting normal, unified, and context as values for default-style.<br><br>=
</div><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On Thu, Oct=
 6, 2016 at 4:48 PM, Paul Eggert <span dir=3D"ltr">&lt;<a href=3D"mailto:eg=
gert@cs.ucla.edu" target=3D"_blank">eggert@cs.ucla.edu</a>&gt;</span> wrote=
:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-le=
ft:1px #ccc solid;padding-left:1ex">I&#39;m afraid it&#39;s not that simple=
. The patch will cause diff3 to output that warning, since diff3 uses diff =
without --normal, so diff3.c needs fixing. Also, the manual needs fixing (d=
oc/diffutils.texi). And the output of &quot;diff --help&quot; (src/diff.c).=
 And there should be a test case testing the new behavior.<br>
<br>
More important. Suppose I want a program with GNU diff&#39;s traditional be=
havior and so use a shell script &#39;mydiff&#39; like this:<br>
<br>
=C2=A0 #!/bin/sh<br>
=C2=A0 exec diff --normal &quot;$@&quot;<br>
<br>
This won&#39;t work, because if I invoke the script like this:<br>
<br>
=C2=A0 mydiff -c foo bar<br>
<br>
diff will complain about --normal conflicting with -c. So I suppose diff ne=
eds to change so that later output specifiers override earlier. But here th=
ings are a bit tricky, e.g., right now &#39;-C5 -c&#39; is equivalent to &#=
39;-c -C5&#39; and I assume we don&#39;t want to change this.<br>
<br>
One other idea. If the invoker uses any long option, or any option other th=
an -b and -r, diff can default to the -u output format regardless of whethe=
r POSIXLY_CORRECT is set. This is because POSIX does not specify the behavi=
or of these other options.<br>
<br>
Plus, it would be nice if we could address Eric&#39;s concerns somehow.<br>
<br>
I hope I haven&#39;t scared you away entirely....<br>
</blockquote></div><br></div>

--001a113eeab0d168c6053e3b83e0--




From MAILER-DAEMON Mon Oct 17 09:04:11 2016
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1bw7aN-0003TW-MN
	for mharc-bug-diffutils@gnu.org; Mon, 17 Oct 2016 09:04:11 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:33494)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bw7aH-0003Pb-7t
	for bug-diffutils@gnu.org; Mon, 17 Oct 2016 09:04:09 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bw7aE-0004A9-69
	for bug-diffutils@gnu.org; Mon, 17 Oct 2016 09:04:05 -0400
Received: from debbugs.gnu.org ([208.118.235.43]:58224)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
	id 1bw7aE-0004A1-3W
	for bug-diffutils@gnu.org; Mon, 17 Oct 2016 09:04:02 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bw7aD-0000VC-S7
	for bug-diffutils@gnu.org; Mon, 17 Oct 2016 09:04:01 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Andreas Schwab <schwab@suse.de>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-diffutils@gnu.org
Resent-Date: Mon, 17 Oct 2016 13:04:01 +0000
Resent-Message-ID: <handler.24715.B.14767094141885@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: report 24715
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords: 
To: 24715@debbugs.gnu.org
X-Debbugs-Original-To: bug-diffutils@gnu.org
Received: via spool by submit@debbugs.gnu.org id=B.14767094141885
	(code B ref -1); Mon, 17 Oct 2016 13:04:01 +0000
Received: (at submit) by debbugs.gnu.org; 17 Oct 2016 13:03:34 +0000
Received: from localhost ([127.0.0.1]:36181 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1bw7Zj-0000UD-5N
	for submit@debbugs.gnu.org; Mon, 17 Oct 2016 09:03:34 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42246)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <schwab@suse.de>) id 1bw7Ze-0000Tu-9h
	for submit@debbugs.gnu.org; Mon, 17 Oct 2016 09:03:29 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <schwab@suse.de>) id 1bw7ZU-0003sr-92
	for submit@debbugs.gnu.org; Mon, 17 Oct 2016 09:03:21 -0400
Received: from lists.gnu.org ([2001:4830:134:3::11]:47830)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <schwab@suse.de>) id 1bw7ZU-0003sa-5b
	for submit@debbugs.gnu.org; Mon, 17 Oct 2016 09:03:16 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:33160)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <schwab@suse.de>) id 1bw7ZQ-0002xj-1K
	for bug-diffutils@gnu.org; Mon, 17 Oct 2016 09:03:15 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <schwab@suse.de>) id 1bw7ZM-0003p9-8p
	for bug-diffutils@gnu.org; Mon, 17 Oct 2016 09:03:12 -0400
Received: from mx2.suse.de ([195.135.220.15]:60198)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <schwab@suse.de>) id 1bw7ZM-0003oG-2b
	for bug-diffutils@gnu.org; Mon, 17 Oct 2016 09:03:08 -0400
X-Virus-Scanned: by amavisd-new at test-mx.suse.de
Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254])
	by mx2.suse.de (Postfix) with ESMTP id 03495AAEF
	for <bug-diffutils@gnu.org>; Mon, 17 Oct 2016 13:03:05 +0000 (UTC)
From: Andreas Schwab <schwab@suse.de>
X-Yow: Did you move a lot of KOREAN STEAK KNIVES this trip, Dingy?
Date: Mon, 17 Oct 2016 15:03:05 +0200
Message-ID: <mvmbmyjruuu.fsf@hawking.suse.de>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no
	timestamps) [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 208.118.235.43
Subject: [bug-diffutils] bug#24715: Massive performance regression makes
 diff unusable
X-BeenThere: bug-diffutils@gnu.org
List-Id: "All diffutils discussion." <bug-diffutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-diffutils/>
List-Post: <mailto:bug-diffutils@gnu.org>
List-Help: <mailto:bug-diffutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 17 Oct 2016 13:04:09 -0000

$ wc tmp.*
  6712297  27215448 135217073 tmp.1
  6712247  27215244 135216202 tmp.2
 13424544  54430692 270433275 total

$ diff --version | head -1
diff (GNU diffutils) 3.3
$ time diff -u tmp.* > xx
17.023user 8.246system 0m25.335selapsed 99.74%CPU

$ diff --version | head -1
diff (GNU diffutils) 3.5
$ time diff -u tmp.* > yy
5020.640user 3.176system 83m50.461selapsed 99.86%CPU

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."




From MAILER-DAEMON Thu Oct 20 18:26:09 2016
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1bxLmq-0003mg-SQ
	for mharc-bug-diffutils@gnu.org; Thu, 20 Oct 2016 18:26:08 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:58079)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bxLmp-0003lK-LD
	for bug-diffutils@gnu.org; Thu, 20 Oct 2016 18:26:08 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bxLmk-0003Zv-Pe
	for bug-diffutils@gnu.org; Thu, 20 Oct 2016 18:26:07 -0400
Received: from debbugs.gnu.org ([208.118.235.43]:55384)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
	id 1bxLmk-0003ZS-M0
	for bug-diffutils@gnu.org; Thu, 20 Oct 2016 18:26:02 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bxLmk-0005LC-EF
	for bug-diffutils@gnu.org; Thu, 20 Oct 2016 18:26:02 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Paul Eggert <eggert@cs.ucla.edu>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-diffutils@gnu.org
Resent-Date: Thu, 20 Oct 2016 22:26:02 +0000
Resent-Message-ID: <handler.24715.B24715.147700233120492@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 24715
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords: 
To: Andreas Schwab <schwab@suse.de>, 24715@debbugs.gnu.org
Received: via spool by 24715-submit@debbugs.gnu.org id=B24715.147700233120492
	(code B ref 24715); Thu, 20 Oct 2016 22:26:02 +0000
Received: (at 24715) by debbugs.gnu.org; 20 Oct 2016 22:25:31 +0000
Received: from localhost ([127.0.0.1]:42550 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1bxLmF-0005KS-6Q
	for submit@debbugs.gnu.org; Thu, 20 Oct 2016 18:25:31 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:51242)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <eggert@cs.ucla.edu>) id 1bxLmE-0005KF-5n
	for 24715@debbugs.gnu.org; Thu, 20 Oct 2016 18:25:30 -0400
Received: from localhost (localhost [127.0.0.1])
	by zimbra.cs.ucla.edu (Postfix) with ESMTP id 68E501612B3;
	Thu, 20 Oct 2016 15:25:24 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
	by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
	with ESMTP id oRlFNYhrxXoA; Thu, 20 Oct 2016 15:25:23 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
	by zimbra.cs.ucla.edu (Postfix) with ESMTP id BB3551612B0;
	Thu, 20 Oct 2016 15:25:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
	by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
	with ESMTP id jZsrQPnBstLb; Thu, 20 Oct 2016 15:25:23 -0700 (PDT)
Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200])
	by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id A428B161298;
	Thu, 20 Oct 2016 15:25:23 -0700 (PDT)
References: <mvmbmyjruuu.fsf@hawking.suse.de>
From: Paul Eggert <eggert@cs.ucla.edu>
Organization: UCLA Computer Science Department
Message-ID: <bba7c016-d39e-d705-b79d-893a172b26c3@cs.ucla.edu>
Date: Thu, 20 Oct 2016 15:25:23 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
	Thunderbird/45.4.0
MIME-Version: 1.0
In-Reply-To: <mvmbmyjruuu.fsf@hawking.suse.de>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 208.118.235.43
Subject: [bug-diffutils] bug#24715: bug#24715: Massive performance
 regression makes diff unusable
X-BeenThere: bug-diffutils@gnu.org
List-Id: "All diffutils discussion." <bug-diffutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-diffutils/>
List-Post: <mailto:bug-diffutils@gnu.org>
List-Help: <mailto:bug-diffutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 20 Oct 2016 22:26:08 -0000

Thanks, can you make the data files available so we can reproduce the 
problem?




From MAILER-DAEMON Mon Oct 24 04:51:07 2016
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1byayJ-0006q5-31
	for mharc-bug-diffutils@gnu.org; Mon, 24 Oct 2016 04:51:07 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:33366)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1byayH-0006pL-6F
	for bug-diffutils@gnu.org; Mon, 24 Oct 2016 04:51:06 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1byayE-000213-46
	for bug-diffutils@gnu.org; Mon, 24 Oct 2016 04:51:05 -0400
Received: from debbugs.gnu.org ([208.118.235.43]:36572)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
	id 1byayE-00020w-0a
	for bug-diffutils@gnu.org; Mon, 24 Oct 2016 04:51:02 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1byayD-0006bC-OT
	for bug-diffutils@gnu.org; Mon, 24 Oct 2016 04:51:01 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Andreas Schwab <schwab@suse.de>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-diffutils@gnu.org
Resent-Date: Mon, 24 Oct 2016 08:51:01 +0000
Resent-Message-ID: <handler.24715.B24715.147729904825342@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 24715
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords: 
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: 24715@debbugs.gnu.org
Received: via spool by 24715-submit@debbugs.gnu.org id=B24715.147729904825342
	(code B ref 24715); Mon, 24 Oct 2016 08:51:01 +0000
Received: (at 24715) by debbugs.gnu.org; 24 Oct 2016 08:50:48 +0000
Received: from localhost ([127.0.0.1]:51968 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1byay0-0006ag-IB
	for submit@debbugs.gnu.org; Mon, 24 Oct 2016 04:50:48 -0400
Received: from mx2.suse.de ([195.135.220.15]:52040)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <schwab@suse.de>) id 1byaxz-0006aY-3y
	for 24715@debbugs.gnu.org; Mon, 24 Oct 2016 04:50:47 -0400
X-Virus-Scanned: by amavisd-new at test-mx.suse.de
Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254])
	by mx2.suse.de (Postfix) with ESMTP id E23ACAB9D;
	Mon, 24 Oct 2016 08:50:45 +0000 (UTC)
From: Andreas Schwab <schwab@suse.de>
References: <mvmbmyjruuu.fsf@hawking.suse.de>
	<bba7c016-d39e-d705-b79d-893a172b26c3@cs.ucla.edu>
X-Yow: Did I SELL OUT yet??
Date: Mon, 24 Oct 2016 10:50:45 +0200
In-Reply-To: <bba7c016-d39e-d705-b79d-893a172b26c3@cs.ucla.edu> (Paul Eggert's
	message of "Thu, 20 Oct 2016 15:25:23 -0700")
Message-ID: <mvmshrmku56.fsf@hawking.suse.de>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 208.118.235.43
Subject: [bug-diffutils] bug#24715: bug#24715: Massive performance
 regression makes diff unusable
X-BeenThere: bug-diffutils@gnu.org
List-Id: "All diffutils discussion." <bug-diffutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-diffutils/>
List-Post: <mailto:bug-diffutils@gnu.org>
List-Help: <mailto:bug-diffutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 24 Oct 2016 08:51:06 -0000

https://bugzilla.opensuse.org/attachment.cgi?id=698854

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."




From MAILER-DAEMON Wed Oct 26 02:14:10 2016
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1bzHTW-0007w1-4W
	for mharc-bug-diffutils@gnu.org; Wed, 26 Oct 2016 02:14:10 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:33048)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bzHTS-0007tq-Dh
	for bug-diffutils@gnu.org; Wed, 26 Oct 2016 02:14:07 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bzHTO-0003pM-Dh
	for bug-diffutils@gnu.org; Wed, 26 Oct 2016 02:14:06 -0400
Received: from debbugs.gnu.org ([208.118.235.43]:41547)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
	id 1bzHTO-0003pG-96
	for bug-diffutils@gnu.org; Wed, 26 Oct 2016 02:14:02 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1bzHTO-00069Y-4H
	for bug-diffutils@gnu.org; Wed, 26 Oct 2016 02:14:02 -0400
Resent-From: Paul Eggert <eggert@cs.ucla.edu>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-To: bug-diffutils@gnu.org
Resent-Date: Wed, 26 Oct 2016 06:14:01 +0000
Resent-Message-ID: <handler.24715.D24715.147746241123600.done@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: cc-closed 24715
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords: 
To: Andreas Schwab <schwab@suse.de>
Cc: 24715-done@debbugs.gnu.org
Mail-Followup-To: 24715@debbugs.gnu.org, eggert@cs.ucla.edu, schwab@suse.de
Received: via spool by 24715-done@debbugs.gnu.org id=D24715.147746241123600
	(code D ref 24715); Wed, 26 Oct 2016 06:14:01 +0000
Received: (at 24715-done) by debbugs.gnu.org; 26 Oct 2016 06:13:31 +0000
Received: from localhost ([127.0.0.1]:56946 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1bzHSt-00068a-8j
	for submit@debbugs.gnu.org; Wed, 26 Oct 2016 02:13:31 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:47638)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <eggert@cs.ucla.edu>) id 1bzHSr-00068M-Jr
	for 24715-done@debbugs.gnu.org; Wed, 26 Oct 2016 02:13:30 -0400
Received: from localhost (localhost [127.0.0.1])
	by zimbra.cs.ucla.edu (Postfix) with ESMTP id C3B8D161297;
	Tue, 25 Oct 2016 23:13:23 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
	by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
	with ESMTP id rCj8k_O7DFIz; Tue, 25 Oct 2016 23:13:22 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
	by zimbra.cs.ucla.edu (Postfix) with ESMTP id 213FD16129D;
	Tue, 25 Oct 2016 23:13:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
	by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
	with ESMTP id 1PKjSOoDPPmQ; Tue, 25 Oct 2016 23:13:22 -0700 (PDT)
Received: from [192.168.1.9] (unknown [47.153.178.162])
	by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id EE01B161297;
	Tue, 25 Oct 2016 23:13:21 -0700 (PDT)
References: <mvmbmyjruuu.fsf@hawking.suse.de>
	<bba7c016-d39e-d705-b79d-893a172b26c3@cs.ucla.edu>
	<mvmshrmku56.fsf@hawking.suse.de>
From: Paul Eggert <eggert@cs.ucla.edu>
Organization: UCLA Computer Science Department
Message-ID: <4b24a328-3563-5441-939d-f6e87552cc2d@cs.ucla.edu>
Date: Tue, 25 Oct 2016 23:13:21 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
	Thunderbird/45.3.0
MIME-Version: 1.0
In-Reply-To: <mvmshrmku56.fsf@hawking.suse.de>
Content-Type: multipart/mixed; boundary="------------F6A67579D3B67A8A82A6101C"
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 208.118.235.43
Subject: [bug-diffutils] bug#24715: bug#24715: Massive performance
 regression makes diff unusable
X-BeenThere: bug-diffutils@gnu.org
List-Id: "All diffutils discussion." <bug-diffutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-diffutils/>
List-Post: <mailto:bug-diffutils@gnu.org>
List-Help: <mailto:bug-diffutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 26 Oct 2016 06:14:07 -0000

This is a multi-part message in MIME format.
--------------F6A67579D3B67A8A82A6101C
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit

Thanks for the test data. I installed a Gnulib patch, noted here:

http://lists.gnu.org/archive/html/bug-gnulib/2016-10/msg00157.html

along with the attached diffutils patches. This fixed the problem for me, so I 
am closing the bug report.

--------------F6A67579D3B67A8A82A6101C
Content-Type: text/x-diff;
 name="0001-build-update-gnulib-submodule-to-latest.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="0001-build-update-gnulib-submodule-to-latest.patch"

>From 571f01c069dfc7f860e5500a5d08ebfdaf9c3068 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Tue, 25 Oct 2016 21:52:31 -0700
Subject: [PATCH 1/2] build: update gnulib submodule to latest

---
 gnulib | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnulib b/gnulib
index e63f5eb..d55ed06 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit e63f5eb55570a1ea3e51ce47df33689785e085c1
+Subproject commit d55ed0636eefeb43ad1aa8123416c33839652646
-- 
2.7.4


--------------F6A67579D3B67A8A82A6101C
Content-Type: text/x-diff;
 name="0002-diff-fix-big-performance-degradation-in-3.4.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="0002-diff-fix-big-performance-degradation-in-3.4.patch"

>From 68b82f6f8419a815cfcf962b3061352d414dc606 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Tue, 25 Oct 2016 21:57:56 -0700
Subject: [PATCH 2/2] diff: fix big performance degradation in 3.4

* NEWS, doc/diffutils.texi (Overview): Document this.
* src/analyze.c (diff_2_files): Restore too_expensive heuristic,
but this time with a floor that is 16 times the old floor.  This
should fix Bug#16848, by generating good-quality output for its
test case, while not introducing Bug#24715, by running nearly as
fast as diff-3.3 for that test case.
---
 NEWS               |  5 +++++
 doc/diffutils.texi |  5 ++++-
 src/analyze.c      | 11 ++++++++++-
 3 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index 473332e..88f5d2b 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,11 @@ GNU diffutils NEWS                                    -*- outline -*-
 
   diff no longer mishandles line numbers exceeding 2**31 on Mingw-w64.
 
+** Performance changes
+
+  diff's default algorithm has been tweaked to deal better with larger
+  files, reversing some of the changes made in diffutils-3.4.
+
 
 * Noteworthy changes in release 3.5 (2016-08-20) [stable]
 
diff --git a/doc/diffutils.texi b/doc/diffutils.texi
index b478380..ceaf557 100644
--- a/doc/diffutils.texi
+++ b/doc/diffutils.texi
@@ -161,7 +161,10 @@ The algorithm was independently discovered as described by Esko Ukkonen in
 @c Date: Wed, 29 Sep 1993 08:27:55 MST
 @c Ukkonen should be given credit for also discovering the algorithm used
 @c in GNU diff.
-Related algorithms are surveyed by Alfred V. Aho in
+Unless the @option{--minimal} option is used, @command{diff} uses a
+heuristic by Paul Eggert that limits the cost to @math{O(N^1.5 log N)}
+at the price of producing suboptimal output for large inputs with many
+differences.  Related algorithms are surveyed by Alfred V. Aho in
 section 6.3 of ``Algorithms for Finding Patterns in Strings'',
 @cite{Handbook of Theoretical Computer Science} (Jan Van Leeuwen,
 ed.), Vol.@: A, @cite{Algorithms and Complexity}, Elsevier/MIT Press,
diff --git a/src/analyze.c b/src/analyze.c
index 3981872..847b8b0 100644
--- a/src/analyze.c
+++ b/src/analyze.c
@@ -534,6 +534,7 @@ diff_2_files (struct comparison *cmp)
     {
       struct context ctxt;
       lin diags;
+      lin too_expensive;
 
       /* Allocate vectors for the results of comparison:
 	 a flag for each line of each file, saying whether that line
@@ -565,11 +566,19 @@ diff_2_files (struct comparison *cmp)
 
       ctxt.heuristic = speed_large_files;
 
+      /* Set TOO_EXPENSIVE to be the approximate square root of the
+	 input size, bounded below by 4096.  4096 seems to be good for
+	 circa-2016 CPUs; see Bug#16848 and Bug#24715.  */
+      too_expensive = 1;
+      for (;  diags != 0;  diags >>= 2)
+	too_expensive <<= 1;
+      ctxt.too_expensive = MAX (4096, too_expensive);
+
       files[0] = cmp->file[0];
       files[1] = cmp->file[1];
 
       compareseq (0, cmp->file[0].nondiscarded_lines,
-		  0, cmp->file[1].nondiscarded_lines, &ctxt);
+		  0, cmp->file[1].nondiscarded_lines, minimal, &ctxt);
 
       free (ctxt.fdiag - (cmp->file[1].nondiscarded_lines + 1));
 
-- 
2.7.4


--------------F6A67579D3B67A8A82A6101C--




