From MAILER-DAEMON Tue Sep 01 02:15:13 2015
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1ZWeqe-0005ic-VM
	for mharc-bug-diffutils@gnu.org; Tue, 01 Sep 2015 02:15:12 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:37832)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZWeqZ-0005eQ-04
	for bug-diffutils@gnu.org; Tue, 01 Sep 2015 02:15:11 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZWeqV-0000Rw-MP
	for bug-diffutils@gnu.org; Tue, 01 Sep 2015 02:15:06 -0400
Received: from debbugs.gnu.org ([208.118.235.43]:52381)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZWeqV-0000Rk-IQ
	for bug-diffutils@gnu.org; Tue, 01 Sep 2015 02:15:03 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZWeqU-0007KM-Tx
	for bug-diffutils@gnu.org; Tue, 01 Sep 2015 02:15:03 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Jim Meyering <jim@meyering.net>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-diffutils@gnu.org
Resent-Date: Tue, 01 Sep 2015 06:15:02 +0000
Resent-Message-ID: <handler.21023.B21023.144108806628108@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 21023
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords: 
To: Rodrigo =?UTF-8?Q?Vali=C3=B1a_?= =?UTF-8?Q?Guti=C3=A9rrez?=
	<rodrivg@gmail.com>
Received: via spool by 21023-submit@debbugs.gnu.org id=B21023.144108806628108
	(code B ref 21023); Tue, 01 Sep 2015 06:15:02 +0000
Received: (at 21023) by debbugs.gnu.org; 1 Sep 2015 06:14:26 +0000
Received: from localhost ([127.0.0.1]:44591 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1ZWepu-0007JH-9d
	for submit@debbugs.gnu.org; Tue, 01 Sep 2015 02:14:26 -0400
Received: from mail-vk0-f43.google.com ([209.85.213.43]:35495)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <meyering@gmail.com>) id 1ZWepr-0007J8-GL
	for 21023@debbugs.gnu.org; Tue, 01 Sep 2015 02:14:24 -0400
Received: by vkaw128 with SMTP id w128so50749830vka.2
	for <21023@debbugs.gnu.org>; Mon, 31 Aug 2015 23:14:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; 
	h=mime-version:sender:in-reply-to:references:from:date:message-id
	:subject:to:cc:content-type;
	bh=D9tiMzw6FwfCfu3CAc/AOL0fqRp8n+W9jM1ei+RKIUY=;
	b=QzmQ/tX69R6FNnFE1ubJwg9b+4qfFYk0IOn2sqKf5Xb2e8HBac7UxW+AQfjK5h9Sm3
	bZBUacw0ubRjUb1dJ/Dc1sqoeka6MHlOLnZ+oLo4cltxTleijGS+oUacheevJ20by4Jm
	LJgft6ucUk7CAfCp/vkZ7/X0O2nPnr6kkkoF6g2ZoGJWHJaBc2KybDKbFxUUqGRe/buf
	e9Vgabv85O2MTAquAyTF+LBB8m8eW4smLFLakiSKekC+kfwe070ws4FzkWA4Te0KhmHw
	WhSD0NwFq0ughfnA5HtyJTNUU1/OrFZKGDfpFVl2HH7EeMv3GbmEk6SZQJlPgwsCSO/H
	WDgg==
X-Received: by 10.52.12.34 with SMTP id v2mr11020318vdb.38.1441088062671; Mon,
	31 Aug 2015 23:14:22 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.31.61.8 with HTTP; Mon, 31 Aug 2015 23:14:02 -0700 (PDT)
In-Reply-To: <CA+8g5KG6mVhFTgVYfKDSQBd4M9Ov_rT+QpFYrEUutZ1j+j9F1A@mail.gmail.com>
References: <1436488977.5743.13.camel@scientia.net>
	<CAEL0GgqjbeoKS3-OBrh=ELQFjYQzzcD_oB3UJph0Ts9trHrMAw@mail.gmail.com>
	<CA+8g5KEWFr2_=0J+Tj5N+jQWnMZduUjOgAR4XehV0n=db6Yshw@mail.gmail.com>
	<CAEL0Ggrfm1AyQyAb3+75sNNpVj7-z-wRxwKwW5z7FUUPJ=DqsA@mail.gmail.com>
	<CA+8g5KG6mVhFTgVYfKDSQBd4M9Ov_rT+QpFYrEUutZ1j+j9F1A@mail.gmail.com>
From: Jim Meyering <jim@meyering.net>
Date: Mon, 31 Aug 2015 23:14:02 -0700
X-Google-Sender-Auth: pSA_ZmNUAIqihG6lA74076Sj1GY
Message-ID: <CA+8g5KGW5s-8cWY7bfAgjjtv0hTAq=LvQEFOTO60C8B9Ov0QoA@mail.gmail.com>
Content-Type: multipart/mixed; boundary=20cf303635e910e878051ea97694
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.15
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 3.x
X-Received-From: 208.118.235.43
Cc: 21023@debbugs.gnu.org
Subject: [bug-diffutils] bug#21023: bug#21023: bug#21023: --no-dereference
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: Tue, 01 Sep 2015 06:15:11 -0000

--20cf303635e910e878051ea97694
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Mon, Aug 31, 2015 at 1:42 PM, Jim Meyering <jim@meyering.net> wrote:
> reopen 21023
> tags 21023 -notabug
> thanks
>
> On Mon, Aug 31, 2015 at 1:04 PM, Rodrigo Vali=C3=B1a Guti=C3=A9rrez
> <rodrivg@gmail.com> wrote:
>> On 8/31/15, Jim Meyering <jim@meyering.net> wrote:
>>> tags 21023 notabug
>>> thanks
>>>
>>> On Mon, Aug 31, 2015 at 9:59 AM, Rodrigo Vali=C3=B1a Guti=C3=A9rrez
>>> <rodrivg@gmail.com> wrote:
>>>> --no-dereference appears in 'diff --help' and 'info diffutils', but
>>>> not in 'man diff'.
>>>
>>> Thanks for the report, but that is unlikely to be a problem with this
>>> upstream diffutils package, since the man page (diff.1) is
>>> automatically generated from the output of diff --help, and the build
>>> machinery to do that has been in place for over a decade. I would
>>> suspect whatever installed your diff man pages or the configuration of
>>> your "man(1)" program -- maybe it is searching in the wrong place.
>>
>> Thanks for the reply.
>> I downloaded diffutils-3.3.tar.xz and in diffutils-3.3/man/diff.1 does
>> not appear the --no-dereference option. I don't know whether it is
>> re-generated at compile or install time... but at the moment that file
>> does not have the said option.
>
> Oh, I see that you are right! So this *is* a bug. Reopening and untagging=
.
> It looks like I managed to include a stale diff.1 (not including the
> then-new --no-dereference description) in the distribution tarball.
> That makes me think there is or was a missing dependency.  I'll
> investigate and report back here.

Found the bug. Here's the fix:

--20cf303635e910e878051ea97694
Content-Type: text/x-patch; charset=UTF-8; 
	name="0001-build-correct-man-page-generation-rule.patch"
Content-Disposition: attachment; 
	filename="0001-build-correct-man-page-generation-rule.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_ie0yly8k0

RnJvbSA2YmVmM2YxNjQ0MGQ4MzExOTI0NDExMTI1ZGI4ZWU1ZDRkNTZlMjg3IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBKaW0gTWV5ZXJpbmcgPG1leWVyaW5nQGZiLmNvbT4KRGF0ZTog
TW9uLCAzMSBBdWcgMjAxNSAyMzoxMjo0MyAtMDcwMApTdWJqZWN0OiBbUEFUQ0hdIGJ1aWxkOiBj
b3JyZWN0IG1hbi1wYWdlIGdlbmVyYXRpb24gcnVsZQpNSU1FLVZlcnNpb246IDEuMApDb250ZW50
LVR5cGU6IHRleHQvcGxhaW47IGNoYXJzZXQ9VVRGLTgKQ29udGVudC1UcmFuc2Zlci1FbmNvZGlu
ZzogOGJpdAoKVGhlIFBBVEggd2FzIHNldCBpbmNvcnJlY3RseSwgc28gdGhhdCB0aGUgZGlmZiB1
c2VkIGJ5CmhlbHAybWFuIHdhcyB0aGUgb25lIGZyb20gJFBBVEgsIHJhdGhlciB0aGFuIHRoZSBq
dXN0LWJ1aWx0Cm9uZS4KKiBtYW4vTWFrZWZpbGUuYW0gKGRpc3RfbWFuMV9NQU5TKTogUHJlcGVu
ZCAuLi9zcmMgdG8gUEFUSCwKbm90IGp1c3QgIi4uIi4gIEluIGh0dHA6Ly9kZWJidWdzLmdudS5v
cmcvMjEwMjMsIFJvZHJpZ28gVmFsacOxYQpHdXRpw6lycmV6IHJlcG9ydGVkIHRoYXQgZGlmZi4x
IGZyb20gdGhlIGRpZmZ1dGlscy0zLjMgdGFyYmFsbApjb250YWluZWQgbm8gZGVzY3JpcHRpb24g
b2YgdGhlIHRoZW4tbmV3IC0tbm8tZGVyZWZlcmVuY2Ugb3B0aW9uLgotLS0KIG1hbi9NYWtlZmls
ZS5hbSB8IDIgKy0KIDEgZmlsZSBjaGFuZ2VkLCAxIGluc2VydGlvbigrKSwgMSBkZWxldGlvbigt
KQoKZGlmZiAtLWdpdCBhL21hbi9NYWtlZmlsZS5hbSBiL21hbi9NYWtlZmlsZS5hbQppbmRleCBm
ZDEzNmQyLi5iZDE4ODA4IDEwMDY0NAotLS0gYS9tYW4vTWFrZWZpbGUuYW0KKysrIGIvbWFuL01h
a2VmaWxlLmFtCkBAIC0yOSw2ICsyOSw2IEBAIHNkaWZmLjE6ICRTL3NkaWZmLmMgc2RpZmYueAog
JChkaXN0X21hbjFfTUFOUyk6ICQoU1JDX1ZFUlNJT05fQykgaGVscDJtYW4KIAkkKEFNX1ZfR0VO
KWJhc2U9YGV4cHIgJEAgOiAnXCguKlwpLjEnYAkJCQlcCiAJICAmJiAoZWNobyAnW05BTUVdJyAm
JiBzZWQgJ3NAL1wqICpAQDsgcy8tL1xcLS87IHEnICRTLyQkYmFzZS5jKSBcCi0JICAgICB8IFBB
VEg9Ii4uJChQQVRIX1NFUEFSQVRPUikkJFBBVEgiCQkJCVwKKwkgICAgIHwgUEFUSD0iLi4vc3Jj
JChQQVRIX1NFUEFSQVRPUikkJFBBVEgiCQkJXAogCSAgICAgICAkKHNyY2RpcikvaGVscDJtYW4g
LWkgLSAtaSAkKHNyY2RpcikvJCRiYXNlLngJCVwKIAkJIC1TICckKFBBQ0tBR0UpICQoVkVSU0lP
TiknICQkYmFzZSA+ICRALXQgJiYgbXYgJEAtdCAkQAotLSAKMi4zLjcKCg==
--20cf303635e910e878051ea97694--




From MAILER-DAEMON Wed Sep 02 00:20:11 2015
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1ZWzWt-0000in-4S
	for mharc-bug-diffutils@gnu.org; Wed, 02 Sep 2015 00:20:11 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:52827)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZWzWq-0000fJ-7I
	for bug-diffutils@gnu.org; Wed, 02 Sep 2015 00:20:09 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZWzWn-0000Iu-3s
	for bug-diffutils@gnu.org; Wed, 02 Sep 2015 00:20:08 -0400
Received: from debbugs.gnu.org ([208.118.235.43]:53552)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZWzWn-0000Hy-13
	for bug-diffutils@gnu.org; Wed, 02 Sep 2015 00:20:05 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZWzWm-0003Yx-07
	for bug-diffutils@gnu.org; Wed, 02 Sep 2015 00:20:04 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Jim Meyering <jim@meyering.net>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-diffutils@gnu.org
Resent-Date: Wed, 02 Sep 2015 04:20:03 +0000
Resent-Message-ID: <handler.21023.D21023.144116755013622@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 21023
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords: 
To: Rodrigo =?UTF-8?Q?Vali=C3=B1a_?= =?UTF-8?Q?Guti=C3=A9rrez?=
	<rodrivg@gmail.com>
Received: via spool by 21023-done@debbugs.gnu.org id=D21023.144116755013622
	(code D ref 21023); Wed, 02 Sep 2015 04:20:03 +0000
Received: (at 21023-done) by debbugs.gnu.org; 2 Sep 2015 04:19:10 +0000
Received: from localhost ([127.0.0.1]:45762 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1ZWzVu-0003Xe-7h
	for submit@debbugs.gnu.org; Wed, 02 Sep 2015 00:19:10 -0400
Received: from mail-vk0-f44.google.com ([209.85.213.44]:34057)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <meyering@gmail.com>) id 1ZWzVr-0003XV-5o
	for 21023-done@debbugs.gnu.org; Wed, 02 Sep 2015 00:19:07 -0400
Received: by vkhf67 with SMTP id f67so69358647vkh.1
	for <21023-done@debbugs.gnu.org>; Tue, 01 Sep 2015 21:19:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; 
	h=mime-version:sender:in-reply-to:references:from:date:message-id
	:subject:to:cc:content-type;
	bh=K+kdMuRGy/4wv0zyxcvY0SVzgJCagabFoTkKQ0H8v44=;
	b=QrkWxkeycr7eAJnuriIghzNmlXZ3Jw2PqwpmHlNrHeaaicTCgbg91+m7H3AXybalq4
	ATjYLs3tjtvFtE+jSDzzTlTs7fbzSPOrEfJUggypz32b4qXj/rZKSf6ygEYrhI7tpH7Y
	hBoyEN3fHYAwWqa8ea7nk4kbq4pQVHkVj5vvwnkQrQk7lRPJlUo+JUC3fu0uxlRfzivf
	bf/Kpc4kXF9FyVj5EBMQBchmN6h2pSHe2YCiMG2as7NsB9FCY6qVppNr7reCQOtJUQyf
	ElkRsgzYI7P38LRTAAHusvM8QytprAbXB+kTwS9UcUBoWNZE+++JYM1Tj4hC53lHKg1H
	6OTQ==
X-Received: by 10.52.186.10 with SMTP id fg10mr36020788vdc.84.1441167546441;
	Tue, 01 Sep 2015 21:19:06 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.31.61.8 with HTTP; Tue, 1 Sep 2015 21:18:46 -0700 (PDT)
In-Reply-To: <CA+8g5KGW5s-8cWY7bfAgjjtv0hTAq=LvQEFOTO60C8B9Ov0QoA@mail.gmail.com>
References: <1436488977.5743.13.camel@scientia.net>
	<CAEL0GgqjbeoKS3-OBrh=ELQFjYQzzcD_oB3UJph0Ts9trHrMAw@mail.gmail.com>
	<CA+8g5KEWFr2_=0J+Tj5N+jQWnMZduUjOgAR4XehV0n=db6Yshw@mail.gmail.com>
	<CAEL0Ggrfm1AyQyAb3+75sNNpVj7-z-wRxwKwW5z7FUUPJ=DqsA@mail.gmail.com>
	<CA+8g5KG6mVhFTgVYfKDSQBd4M9Ov_rT+QpFYrEUutZ1j+j9F1A@mail.gmail.com>
	<CA+8g5KGW5s-8cWY7bfAgjjtv0hTAq=LvQEFOTO60C8B9Ov0QoA@mail.gmail.com>
From: Jim Meyering <jim@meyering.net>
Date: Tue, 1 Sep 2015 21:18:46 -0700
X-Google-Sender-Auth: A9jiQ1MOMCsJ2tYtXFoYBkBDGAU
Message-ID: <CA+8g5KEH1obs4pJo46JLXQQdQuNOsp67fZS2-PO9PyqoaDRq5A@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.15
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 3.x
X-Received-From: 208.118.235.43
Cc: 21023-done@debbugs.gnu.org
Subject: [bug-diffutils] bug#21023: bug#21023: bug#21023: bug#21023:
	--no-dereference
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, 02 Sep 2015 04:20:09 -0000

On Mon, Aug 31, 2015 at 11:14 PM, Jim Meyering <jim@meyering.net> wrote:
> Found the bug. Here's the fix:

Thanks again, Rodrigo.

I've pushed that with a small improvement to help prevent
a repeat of that problem:

  http://git.savannah.gnu.org/cgit/diffutils.git/commit/?id=2cd4ff3a5ff52d89

At the same time, I pushed a documentation-improving patch that
had been collecting dust:

  http://git.savannah.gnu.org/cgit/diffutils.git/commit/?id=5801f8add854c84




From MAILER-DAEMON Fri Sep 11 03:03:08 2015
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1ZaIMW-0006xa-IN
	for mharc-bug-diffutils@gnu.org; Fri, 11 Sep 2015 03:03:08 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:60035)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZaIMT-0006rA-6M
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 03:03:05 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZaIMQ-0007Nf-CK
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 03:03:05 -0400
Received: from debbugs.gnu.org ([208.118.235.43]:35635)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZaIMQ-0007Nb-9k
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 03:03:02 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZaIMP-0005YU-UV
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 03:03:02 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Giuseppe Scrivano <gscrivan@redhat.com>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-diffutils@gnu.org
Resent-Date: Fri, 11 Sep 2015 07:03:01 +0000
Resent-Message-ID: <handler.20062.B20062.144195496221328@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 20062
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords: patch
To: 20062@debbugs.gnu.org
Received: via spool by 20062-submit@debbugs.gnu.org id=B20062.144195496221328
	(code B ref 20062); Fri, 11 Sep 2015 07:03:01 +0000
Received: (at 20062) by debbugs.gnu.org; 11 Sep 2015 07:02:42 +0000
Received: from localhost ([127.0.0.1]:56078 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1ZaIM5-0005Xv-Iq
	for submit@debbugs.gnu.org; Fri, 11 Sep 2015 03:02:41 -0400
Received: from mx1.redhat.com ([209.132.183.28]:41942)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <gscrivan@redhat.com>) id 1ZaIM3-0005Xn-2B
	for 20062@debbugs.gnu.org; Fri, 11 Sep 2015 03:02:40 -0400
Received: from int-mx11.intmail.prod.int.phx2.redhat.com
	(int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24])
	by mx1.redhat.com (Postfix) with ESMTPS id 4B8BBC0A15EA;
	Fri, 11 Sep 2015 07:02:38 +0000 (UTC)
Received: from foo.bar.baz (vpn1-5-93.ams2.redhat.com [10.36.5.93])
	by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id t8B72Z9X025056
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256
	verify=NO); Fri, 11 Sep 2015 03:02:37 -0400
From: Giuseppe Scrivano <gscrivan@redhat.com>
References: <1425851791-29188-1-git-send-email-gscrivan@redhat.com>
	<5500CD49.1060505@cs.ucla.edu> <87twxqa884.fsf@redhat.com>
	<5501A668.5050104@cs.ucla.edu> <87pp8d9ap1.fsf@redhat.com>
	<55020934.8080505@cs.ucla.edu> <87h9tp91uy.fsf@redhat.com>
	<55023863.6000407@cs.ucla.edu> <87wq2l6u7s.fsf@redhat.com>
	<87oanw7otj.fsf@redhat.com>
	<CAHpGcMJ3em9Ld0cjXfNYWX0uF+2V_nyJxY+oo4KSUgrJ7LAWvg@mail.gmail.com>
	<87wq2i3tf9.fsf@redhat.com> <87wq2duba0.fsf_-_@redhat.com>
	<87d23t1lbk.fsf@redhat.com> <5517574A.2020508@cs.ucla.edu>
	<87fv7uleyp.fsf@redhat.com> <55358394.5040809@cs.ucla.edu>
	<87r3rbg9qc.fsf@redhat.com> <55382807.3020408@cs.ucla.edu>
	<87y4jf24w8.fsf@foo.bar.baz> <5584B2CB.7040104@cs.ucla.edu>
Date: Fri, 11 Sep 2015 09:02:34 +0200
In-Reply-To: <5584B2CB.7040104@cs.ucla.edu> (Paul Eggert's message of "Fri, 19
	Jun 2015 17:24:43 -0700")
Message-ID: <87bnd9sak5.fsf@foo.bar.baz>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.15
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 3.x
X-Received-From: 208.118.235.43
Subject: [bug-diffutils] bug#20062: bug#20062: [PATCH] diff: add support for
	--color
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, 11 Sep 2015 07:03:06 -0000

Paul Eggert <eggert@cs.ucla.edu> writes:

> Giuseppe Scrivano wrote:
>> Is there any hope that this patch is going to be reviewed?
>
> Yes, though not right now.  My schedule doesn't free up for at least a week.

Can someone please review this patch?  It has been waiting for 6 months now...

Thanks,
Giuseppe




From MAILER-DAEMON Fri Sep 11 03:34:07 2015
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1ZaIqV-0000vB-K2
	for mharc-bug-diffutils@gnu.org; Fri, 11 Sep 2015 03:34:07 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:40426)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZaIqT-0000tu-SO
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 03:34:06 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZaIqQ-0005i2-KC
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 03:34:05 -0400
Received: from debbugs.gnu.org ([208.118.235.43]:35662)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZaIqQ-0005hy-Gq
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 03:34:02 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZaIqP-0006IU-Ru
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 03:34: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: Fri, 11 Sep 2015 07:34:01 +0000
Resent-Message-ID: <handler.20062.B20062.144195678724133@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 20062
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords: patch
To: Giuseppe Scrivano <gscrivan@redhat.com>, 20062@debbugs.gnu.org
Received: via spool by 20062-submit@debbugs.gnu.org id=B20062.144195678724133
	(code B ref 20062); Fri, 11 Sep 2015 07:34:01 +0000
Received: (at 20062) by debbugs.gnu.org; 11 Sep 2015 07:33:07 +0000
Received: from localhost ([127.0.0.1]:56105 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1ZaIpW-0006HA-O5
	for submit@debbugs.gnu.org; Fri, 11 Sep 2015 03:33:07 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:59020)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <eggert@cs.ucla.edu>) id 1ZaIpS-0006Gn-2E
	for 20062@debbugs.gnu.org; Fri, 11 Sep 2015 03:33:02 -0400
Received: from localhost (localhost [127.0.0.1])
	by zimbra.cs.ucla.edu (Postfix) with ESMTP id 168541601BD;
	Fri, 11 Sep 2015 00:33:01 -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 dsp3Y4oTdPDa; Fri, 11 Sep 2015 00:33:00 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
	by zimbra.cs.ucla.edu (Postfix) with ESMTP id 5F193161072;
	Fri, 11 Sep 2015 00:33:00 -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 8a2RiOOzbhwU; Fri, 11 Sep 2015 00:33:00 -0700 (PDT)
Received: from [192.168.1.9] (pool-100-32-155-148.lsanca.fios.verizon.net
	[100.32.155.148])
	by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 42F311601BD;
	Fri, 11 Sep 2015 00:33:00 -0700 (PDT)
References: <1425851791-29188-1-git-send-email-gscrivan@redhat.com>
	<5500CD49.1060505@cs.ucla.edu> <87twxqa884.fsf@redhat.com>
	<5501A668.5050104@cs.ucla.edu> <87pp8d9ap1.fsf@redhat.com>
	<55020934.8080505@cs.ucla.edu> <87h9tp91uy.fsf@redhat.com>
	<55023863.6000407@cs.ucla.edu> <87wq2l6u7s.fsf@redhat.com>
	<87oanw7otj.fsf@redhat.com>
	<CAHpGcMJ3em9Ld0cjXfNYWX0uF+2V_nyJxY+oo4KSUgrJ7LAWvg@mail.gmail.com>
	<87wq2i3tf9.fsf@redhat.com> <87wq2duba0.fsf_-_@redhat.com>
	<87d23t1lbk.fsf@redhat.com> <5517574A.2020508@cs.ucla.edu>
	<87fv7uleyp.fsf@redhat.com> <55358394.5040809@cs.ucla.edu>
	<87r3rbg9qc.fsf@redhat.com> <55382807.3020408@cs.ucla.edu>
	<87y4jf24w8.fsf@foo.bar.baz> <5584B2CB.7040104@cs.ucla.edu>
	<87bnd9sak5.fsf@foo.bar.baz>
From: Paul Eggert <eggert@cs.ucla.edu>
Organization: UCLA Computer Science Department
Message-ID: <55F283AC.9030704@cs.ucla.edu>
Date: Fri, 11 Sep 2015 00:33:00 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101
	Thunderbird/38.2.0
MIME-Version: 1.0
In-Reply-To: <87bnd9sak5.fsf@foo.bar.baz>
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.15
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 3.x
X-Received-From: 208.118.235.43
Subject: [bug-diffutils] bug#20062: bug#20062: [PATCH] diff: add support for
	--color
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, 11 Sep 2015 07:34:06 -0000

I finally got around to looking at it.  Doesn't it have the problem that if you 
type Control-C while it is in the middle of outputting a change-color sequence, 
your terminal may end up in a strange state?  I thought there was a standard way 
in other GNU programs to deal with this, but am not familiar with the topic.




From MAILER-DAEMON Fri Sep 11 05:27:10 2015
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1ZaKbu-0000Nl-1D
	for mharc-bug-diffutils@gnu.org; Fri, 11 Sep 2015 05:27:10 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:55961)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZaKbr-0000N4-4x
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 05:27:07 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZaKbm-0005NU-6n
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 05:27:07 -0400
Received: from debbugs.gnu.org ([208.118.235.43]:35720)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZaKbm-0005NQ-49
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 05:27:02 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZaKbl-0000SZ-TE
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 05:27:01 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Gisle Vanem <gvanem@yahoo.no>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-diffutils@gnu.org
Resent-Date: Fri, 11 Sep 2015 09:27:01 +0000
Resent-Message-ID: <handler.20062.B.14419635801720@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 20062
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords: patch
To: 20062@debbugs.gnu.org
X-Debbugs-Original-To: bug-diffutils@gnu.org
Received: via spool by submit@debbugs.gnu.org id=B.14419635801720
	(code B ref -1); Fri, 11 Sep 2015 09:27:01 +0000
Received: (at submit) by debbugs.gnu.org; 11 Sep 2015 09:26:20 +0000
Received: from localhost ([127.0.0.1]:56163 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1ZaKb5-0000Rf-9H
	for submit@debbugs.gnu.org; Fri, 11 Sep 2015 05:26:19 -0400
Received: from eggs.gnu.org ([208.118.235.92]:45587)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <gvanem@yahoo.no>) id 1ZaKb3-0000RW-3F
	for submit@debbugs.gnu.org; Fri, 11 Sep 2015 05:26:17 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gvanem@yahoo.no>) id 1ZaKb2-0004gs-62
	for submit@debbugs.gnu.org; Fri, 11 Sep 2015 05:26:16 -0400
Received: from lists.gnu.org ([2001:4830:134:3::11]:47190)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gvanem@yahoo.no>) id 1ZaKb2-0004gk-3y
	for submit@debbugs.gnu.org; Fri, 11 Sep 2015 05:26:16 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:55574)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gvanem@yahoo.no>) id 1ZaKb1-0008Jr-5l
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 05:26:16 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gvanem@yahoo.no>) id 1ZaKaw-0004cZ-8I
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 05:26:15 -0400
Received: from nm2-vm2.bullet.mail.ir2.yahoo.com ([212.82.96.82]:58129)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gvanem@yahoo.no>) id 1ZaKav-0004bz-U1
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 05:26:10 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.no; s=s2048;
	t=1441963568; bh=vvfxcBevzIMf+m9Cev/ZP+Vdevdi6vHTJ+wlQ9ngoec=;
	h=Subject:To:References:From:Date:In-Reply-To:From:Subject;
	b=fcwITCPan6hzMHO/X4Jeq+Z3UU/LU/2lLjIFYYLRG+5wzxL/TW3Rv0mIw7xpIJaXOBo4MrGnHqhpiQY9Ghs8TzJc3UpmHqrCCXJi76fgms6zNFy5dmjIWOQRkJVO8sG1OX2shGSjHu3a+L0VXHtUTxeN1Ej1T+KBdV6tZEuyjkwPI5toHKNVsFSQJ1FSOjb1zivCvua4XsobrWN+ZSsLQUgy2qjQHuA6qo5EHq7pPpYscInYLJhjftnvPeZC98w5TH9AtXlzFyrbbOTqI0N2j9RZcmk4mq465GmzXMR5eYEY8cvPFJQWgqm0yzKCbevDmSCRLt/xdBN0gyUQmZo3kA==
Received: from [212.82.98.49] by nm2.bullet.mail.ir2.yahoo.com with NNFMP;
	11 Sep 2015 09:26:08 -0000
Received: from [46.228.39.86] by tm2.bullet.mail.ir2.yahoo.com with NNFMP;
	11 Sep 2015 09:26:08 -0000
Received: from [127.0.0.1] by smtp123.mail.ir2.yahoo.com with NNFMP;
	11 Sep 2015 09:26:08 -0000
X-Yahoo-Newman-Id: 443157.84840.bm@smtp123.mail.ir2.yahoo.com
X-Yahoo-Newman-Property: ymail-3
X-YMail-OSG: vQBZxa4VM1nd6fW6pCcHeJESuF8Qj5Z38MKLXqkrvOc4w7N
	PkClyyg9wIzLM0fCLZydxnokuKUilBPobf9BFgxOTLuSTZUFQz8elXe_7Ia.
	mw1km54qT9.92oweJgRHHNylEdNzRf.lopEyIfs1eqNIgXtnMZpgrJNCySsc
	E2IKIECEANbvq1jZpOOy5p6Cxvg3.GFj4GJ1xln_6KXlQJmsbU2sWhd6BpWa
	Po8xetskWePfHIDx3pNJcLGXGZEjHJ3fzLJgye6JJM_pemon9ZiDl3CYDGz1
	gtwN04mrCRJHjCL84.1tj8f6GBZ5u8svSF3oKlqY9EtvrOhpK8Wt6AXdqbnK
	TqF5dyNL8Na0FTpSp0Q8AvA52BXvLnVCyR.8aYXjd2_Se2CKvZh7u29cyozq
	qZbA0OxYsaijIHfuZ8_ar1soT9krpTObQpTKc_YfA.r_ijyYgX6oedBAW22h
	E9efgPaYK6IqMUUrQd6lP43lLfJgG8XMWMWARLyOLXAQcH3CnxohvcGYi0u6
	PaALeqIiRhBnbPT7nFqoyL34-
X-Yahoo-SMTP: 8zhYLGyswBB3AGU8c4pvFIFOfA--
References: <1425851791-29188-1-git-send-email-gscrivan@redhat.com>
	<5500CD49.1060505@cs.ucla.edu> <87twxqa884.fsf@redhat.com>
	<5501A668.5050104@cs.ucla.edu> <87pp8d9ap1.fsf@redhat.com>
	<55020934.8080505@cs.ucla.edu> <87h9tp91uy.fsf@redhat.com>
	<55023863.6000407@cs.ucla.edu> <87wq2l6u7s.fsf@redhat.com>
	<87oanw7otj.fsf@redhat.com>
	<CAHpGcMJ3em9Ld0cjXfNYWX0uF+2V_nyJxY+oo4KSUgrJ7LAWvg@mail.gmail.com>
	<87wq2i3tf9.fsf@redhat.com> <87wq2duba0.fsf_-_@redhat.com>
	<87d23t1lbk.fsf@redhat.com> <5517574A.2020508@cs.ucla.edu>
	<87fv7uleyp.fsf@redhat.com> <55358394.5040809@cs.ucla.edu>
	<87r3rbg9qc.fsf@redhat.com> <55382807.3020408@cs.ucla.edu>
	<87y4jf24w8.fsf@foo.bar.baz> <5584B2CB.7040104@cs.ucla.edu>
	<87bnd9sak5.fsf@foo.bar.baz> <55F283AC.9030704@cs.ucla.edu>
From: Gisle Vanem <gvanem@yahoo.no>
Message-ID: <55F29E35.50808@yahoo.no>
Date: Fri, 11 Sep 2015 11:26:13 +0200
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101
	Firefox/38.0 SeaMonkey/2.35
MIME-Version: 1.0
In-Reply-To: <55F283AC.9030704@cs.ucla.edu>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
	(bad octet value).
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.15
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 3.x
X-Received-From: 208.118.235.43
Subject: [bug-diffutils] bug#20062: bug#20062: bug#20062: [PATCH] diff: add
	support for --color
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, 11 Sep 2015 09:27:07 -0000

Paul Eggert wrote:

> I finally got around to looking at it.  Doesn't it have the problem that if you type Control-C while it is in the middle
> of outputting a change-color sequence, your terminal may end up in a strange state?

No. He added a 'reset_color_context (true);' inside
'signal_handler()'. I've applied the colour-patches + my own WinCon
patches to get colours on Windows. It has worked fine for 5 mounths.

Reading diff-output with colours if so much more plesant than
moin-chrome. Please add the patches ASAP.

-- 
--gv




From MAILER-DAEMON Fri Sep 11 11:39:10 2015
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1ZaQPu-0000dF-1J
	for mharc-bug-diffutils@gnu.org; Fri, 11 Sep 2015 11:39:10 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:48536)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZaQPr-0000YD-Bx
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 11:39:08 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZaQPn-0004k7-6j
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 11:39:07 -0400
Received: from debbugs.gnu.org ([208.118.235.43]:36667)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZaQPn-0004jp-4F
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 11:39:03 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZaQG5-0002JE-JX
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 11:29: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: Fri, 11 Sep 2015 15:29:01 +0000
Resent-Message-ID: <handler.20062.B20062.14419852948815@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 20062
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords: patch
To: Gisle Vanem <gvanem@yahoo.no>, 20062@debbugs.gnu.org
Received: via spool by 20062-submit@debbugs.gnu.org id=B20062.14419852948815
	(code B ref 20062); Fri, 11 Sep 2015 15:29:01 +0000
Received: (at 20062) by debbugs.gnu.org; 11 Sep 2015 15:28:14 +0000
Received: from localhost ([127.0.0.1]:57108 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1ZaQFJ-0002I7-Nv
	for submit@debbugs.gnu.org; Fri, 11 Sep 2015 11:28:13 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:41595)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <eggert@cs.ucla.edu>) id 1ZaQFH-0002Hy-7o
	for 20062@debbugs.gnu.org; Fri, 11 Sep 2015 11:28:11 -0400
Received: from localhost (localhost [127.0.0.1])
	by zimbra.cs.ucla.edu (Postfix) with ESMTP id 335A01601BA;
	Fri, 11 Sep 2015 08:28:10 -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 8pHXM7RnKeSK; Fri, 11 Sep 2015 08:28:09 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
	by zimbra.cs.ucla.edu (Postfix) with ESMTP id 18C6B16106F;
	Fri, 11 Sep 2015 08:28:09 -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 CGEzBCMd7ZP1; Fri, 11 Sep 2015 08:28:09 -0700 (PDT)
Received: from [192.168.1.9] (pool-100-32-155-148.lsanca.fios.verizon.net
	[100.32.155.148])
	by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id E5FAF1601BA;
	Fri, 11 Sep 2015 08:28:08 -0700 (PDT)
References: <1425851791-29188-1-git-send-email-gscrivan@redhat.com>
	<5500CD49.1060505@cs.ucla.edu> <87twxqa884.fsf@redhat.com>
	<5501A668.5050104@cs.ucla.edu> <87pp8d9ap1.fsf@redhat.com>
	<55020934.8080505@cs.ucla.edu> <87h9tp91uy.fsf@redhat.com>
	<55023863.6000407@cs.ucla.edu> <87wq2l6u7s.fsf@redhat.com>
	<87oanw7otj.fsf@redhat.com>
	<CAHpGcMJ3em9Ld0cjXfNYWX0uF+2V_nyJxY+oo4KSUgrJ7LAWvg@mail.gmail.com>
	<87wq2i3tf9.fsf@redhat.com> <87wq2duba0.fsf_-_@redhat.com>
	<87d23t1lbk.fsf@redhat.com> <5517574A.2020508@cs.ucla.edu>
	<87fv7uleyp.fsf@redhat.com> <55358394.5040809@cs.ucla.edu>
	<87r3rbg9qc.fsf@redhat.com> <55382807.3020408@cs.ucla.edu>
	<87y4jf24w8.fsf@foo.bar.baz> <5584B2CB.7040104@cs.ucla.edu>
	<87bnd9sak5.fsf@foo.bar.baz> <55F283AC.9030704@cs.ucla.edu>
	<55F29E35.50808@yahoo.no>
From: Paul Eggert <eggert@cs.ucla.edu>
Organization: UCLA Computer Science Department
Message-ID: <55F2F304.2070808@cs.ucla.edu>
Date: Fri, 11 Sep 2015 08:28:04 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101
	Thunderbird/38.2.0
MIME-Version: 1.0
In-Reply-To: <55F29E35.50808@yahoo.no>
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.15
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 3.x
X-Received-From: 208.118.235.43
Cc: Giuseppe Scrivano <gscrivan@redhat.com>
Subject: [bug-diffutils] bug#20062: bug#20062: bug#20062: bug#20062: [PATCH]
	diff: add support for --color
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, 11 Sep 2015 15:39:08 -0000

Gisle Vanem wrote:
> No. He added a 'reset_color_context (true);' inside
> 'signal_handler()'.

Ah, sorry, I was looking at the original edition of the patch.

I just now looked at <http://bugs.gnu.org/20062#101> and still see some 
problems.  Mainly, it doesn't handle SIGTSTP properly.  With SIGTSTP an 
application is supposed to reset the terminal and then resignal itself with 
SIGSTOP before really stopping.  When restarting the application then needs to 
restore the terminal to the current state, if the current state is not the 
default.  This is nearly impossible to do correctly with the proposed design.  I 
suggest looking at how GNU ls does it: the signal handler merely sets a flag, 
and the application checks occasionally at safe places whether a signal has arrived.

A nit: when installing signals via 'signal', don't install a handler if 'signal' 
says the signal is being ignored.

Also, copyright papers need to be filed for diffutils before a nontrivial patch 
like this can be installed.




From MAILER-DAEMON Fri Sep 11 12:42:08 2015
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1ZaROq-0007zd-Si
	for mharc-bug-diffutils@gnu.org; Fri, 11 Sep 2015 12:42:08 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:42745)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZaROn-0007wZ-Rg
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 12:42:06 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZaROk-0006FC-KV
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 12:42:05 -0400
Received: from debbugs.gnu.org ([208.118.235.43]:36700)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZaROk-0006F5-Gj
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 12:42:02 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZaROk-0005d8-5U
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 12:42:02 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Giuseppe Scrivano <gscrivan@redhat.com>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-diffutils@gnu.org
Resent-Date: Fri, 11 Sep 2015 16:42:02 +0000
Resent-Message-ID: <handler.20062.B20062.144198966921580@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 20062
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords: patch
To: Paul Eggert <eggert@cs.ucla.edu>
Received: via spool by 20062-submit@debbugs.gnu.org id=B20062.144198966921580
	(code B ref 20062); Fri, 11 Sep 2015 16:42:02 +0000
Received: (at 20062) by debbugs.gnu.org; 11 Sep 2015 16:41:09 +0000
Received: from localhost ([127.0.0.1]:57143 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1ZaRNs-0005bz-FR
	for submit@debbugs.gnu.org; Fri, 11 Sep 2015 12:41:08 -0400
Received: from mx1.redhat.com ([209.132.183.28]:33224)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <gscrivan@redhat.com>) id 1ZaRNp-0005bq-IX
	for 20062@debbugs.gnu.org; Fri, 11 Sep 2015 12:41:06 -0400
Received: from int-mx13.intmail.prod.int.phx2.redhat.com
	(int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26])
	by mx1.redhat.com (Postfix) with ESMTPS id C29A691DAA;
	Fri, 11 Sep 2015 16:41:04 +0000 (UTC)
Received: from foo.bar.baz (vpn1-5-93.ams2.redhat.com [10.36.5.93])
	by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id t8BGf1Bb007505
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256
	verify=NO); Fri, 11 Sep 2015 12:41:03 -0400
From: Giuseppe Scrivano <gscrivan@redhat.com>
References: <1425851791-29188-1-git-send-email-gscrivan@redhat.com>
	<5501A668.5050104@cs.ucla.edu> <87pp8d9ap1.fsf@redhat.com>
	<55020934.8080505@cs.ucla.edu> <87h9tp91uy.fsf@redhat.com>
	<55023863.6000407@cs.ucla.edu> <87wq2l6u7s.fsf@redhat.com>
	<87oanw7otj.fsf@redhat.com>
	<CAHpGcMJ3em9Ld0cjXfNYWX0uF+2V_nyJxY+oo4KSUgrJ7LAWvg@mail.gmail.com>
	<87wq2i3tf9.fsf@redhat.com> <87wq2duba0.fsf_-_@redhat.com>
	<87d23t1lbk.fsf@redhat.com> <5517574A.2020508@cs.ucla.edu>
	<87fv7uleyp.fsf@redhat.com> <55358394.5040809@cs.ucla.edu>
	<87r3rbg9qc.fsf@redhat.com> <55382807.3020408@cs.ucla.edu>
	<87y4jf24w8.fsf@foo.bar.baz> <5584B2CB.7040104@cs.ucla.edu>
	<87bnd9sak5.fsf@foo.bar.baz> <55F283AC.9030704@cs.ucla.edu>
Date: Fri, 11 Sep 2015 18:41:01 +0200
In-Reply-To: <55F283AC.9030704@cs.ucla.edu> (Paul Eggert's message of "Fri, 11
	Sep 2015 00:33:00 -0700")
Message-ID: <877fnwsyci.fsf@foo.bar.baz>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.15
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 3.x
X-Received-From: 208.118.235.43
Cc: 20062@debbugs.gnu.org
Subject: [bug-diffutils] bug#20062: bug#20062: [PATCH] diff: add support for
	--color
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, 11 Sep 2015 16:42:06 -0000

Hi Paul,

Paul Eggert <eggert@cs.ucla.edu> writes:

> I finally got around to looking at it.  Doesn't it have the problem
> that if you type Control-C while it is in the middle of outputting a
> change-color sequence, your terminal may end up in a strange state?  I
> thought there was a standard way in other GNU programs to deal with
> this, but am not familiar with the topic.

we are dealing with the issue in the last version of the patch, and that
was the main issue reported and that took a while to get addressed :)

No, unfortunately there is not a standard way to deal with it.  Last
time I looked at it, grep was suffering from this issue (Ctrl-C in the
middle of a color sequence) would leave the terminal in a funny state.

Thanks,
Giuseppe




From MAILER-DAEMON Fri Sep 11 12:57:09 2015
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1ZaRdN-0008PO-IY
	for mharc-bug-diffutils@gnu.org; Fri, 11 Sep 2015 12:57:09 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:46808)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZaRdM-0008PA-0V
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 12:57:08 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZaRdG-0006rL-U4
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 12:57:07 -0400
Received: from debbugs.gnu.org ([208.118.235.43]:36731)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZaRdG-0006r7-PE
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 12:57:02 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZaRdG-0005zK-GF
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 12:57: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: Fri, 11 Sep 2015 16:57:02 +0000
Resent-Message-ID: <handler.20062.B20062.144199059122969@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 20062
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords: patch
To: Giuseppe Scrivano <gscrivan@redhat.com>
Received: via spool by 20062-submit@debbugs.gnu.org id=B20062.144199059122969
	(code B ref 20062); Fri, 11 Sep 2015 16:57:02 +0000
Received: (at 20062) by debbugs.gnu.org; 11 Sep 2015 16:56:31 +0000
Received: from localhost ([127.0.0.1]:57171 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1ZaRck-0005yP-UX
	for submit@debbugs.gnu.org; Fri, 11 Sep 2015 12:56:31 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:45083)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <eggert@cs.ucla.edu>) id 1ZaRci-0005yF-CX
	for 20062@debbugs.gnu.org; Fri, 11 Sep 2015 12:56:28 -0400
Received: from localhost (localhost [127.0.0.1])
	by zimbra.cs.ucla.edu (Postfix) with ESMTP id 11F61161075;
	Fri, 11 Sep 2015 09:56:27 -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 rHJtDVQ92AEh; Fri, 11 Sep 2015 09:56:26 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
	by zimbra.cs.ucla.edu (Postfix) with ESMTP id 165F4161076;
	Fri, 11 Sep 2015 09:56:26 -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 GyNRceVBbXsj; Fri, 11 Sep 2015 09:56:26 -0700 (PDT)
Received: from [192.168.1.9] (pool-100-32-155-148.lsanca.fios.verizon.net
	[100.32.155.148])
	by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id EA8DD1601BA;
	Fri, 11 Sep 2015 09:56:25 -0700 (PDT)
References: <1425851791-29188-1-git-send-email-gscrivan@redhat.com>
	<5501A668.5050104@cs.ucla.edu> <87pp8d9ap1.fsf@redhat.com>
	<55020934.8080505@cs.ucla.edu> <87h9tp91uy.fsf@redhat.com>
	<55023863.6000407@cs.ucla.edu> <87wq2l6u7s.fsf@redhat.com>
	<87oanw7otj.fsf@redhat.com>
	<CAHpGcMJ3em9Ld0cjXfNYWX0uF+2V_nyJxY+oo4KSUgrJ7LAWvg@mail.gmail.com>
	<87wq2i3tf9.fsf@redhat.com> <87wq2duba0.fsf_-_@redhat.com>
	<87d23t1lbk.fsf@redhat.com> <5517574A.2020508@cs.ucla.edu>
	<87fv7uleyp.fsf@redhat.com> <55358394.5040809@cs.ucla.edu>
	<87r3rbg9qc.fsf@redhat.com> <55382807.3020408@cs.ucla.edu>
	<87y4jf24w8.fsf@foo.bar.baz> <5584B2CB.7040104@cs.ucla.edu>
	<87bnd9sak5.fsf@foo.bar.baz> <55F283AC.9030704@cs.ucla.edu>
	<877fnwsyci.fsf@foo.bar.baz>
From: Paul Eggert <eggert@cs.ucla.edu>
Organization: UCLA Computer Science Department
Message-ID: <55F307B9.80303@cs.ucla.edu>
Date: Fri, 11 Sep 2015 09:56:25 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101
	Thunderbird/38.2.0
MIME-Version: 1.0
In-Reply-To: <877fnwsyci.fsf@foo.bar.baz>
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.15
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 3.x
X-Received-From: 208.118.235.43
Cc: 20062@debbugs.gnu.org
Subject: [bug-diffutils] bug#20062: bug#20062: [PATCH] diff: add support for
	--color
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, 11 Sep 2015 16:57:09 -0000

Giuseppe Scrivano wrote:
> unfortunately there is not a standard way to deal with it.  Last
> time I looked at it, grep was suffering from this issue (Ctrl-C in the
> middle of a color sequence) would leave the terminal in a funny state.

That's a bug in grep, and I just now filed a bug report for it here:

http://bugs.gnu.org/21461

Admittedly it is a pain to handle signals correctly, but as long as we're adding 
the feature to diff we should do it right.  I suggest looking at how GNU 'ls' 
does it; 'ls' is reasonably bullet-proof against the problem.




From MAILER-DAEMON Fri Sep 11 17:48:08 2015
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1ZaWAy-0002H8-1g
	for mharc-bug-diffutils@gnu.org; Fri, 11 Sep 2015 17:48:08 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:55428)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZaWAv-0002G6-Ob
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 17:48:07 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZaWAs-0007ag-HV
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 17:48:05 -0400
Received: from debbugs.gnu.org ([208.118.235.43]:37003)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZaWAs-0007ac-Dj
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 17:48:02 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZaWAs-0005L3-2i
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 17:48:02 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Giuseppe Scrivano <gscrivan@redhat.com>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-diffutils@gnu.org
Resent-Date: Fri, 11 Sep 2015 21:48:02 +0000
Resent-Message-ID: <handler.20062.B20062.144200807520509@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 20062
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords: patch
To: Paul Eggert <eggert@cs.ucla.edu>
Received: via spool by 20062-submit@debbugs.gnu.org id=B20062.144200807520509
	(code B ref 20062); Fri, 11 Sep 2015 21:48:02 +0000
Received: (at 20062) by debbugs.gnu.org; 11 Sep 2015 21:47:55 +0000
Received: from localhost ([127.0.0.1]:57446 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1ZaWAk-0005Kj-Oe
	for submit@debbugs.gnu.org; Fri, 11 Sep 2015 17:47:55 -0400
Received: from mx1.redhat.com ([209.132.183.28]:43861)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <gscrivan@redhat.com>) id 1ZaWAh-0005KY-Au
	for 20062@debbugs.gnu.org; Fri, 11 Sep 2015 17:47:52 -0400
Received: from int-mx13.intmail.prod.int.phx2.redhat.com
	(int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26])
	by mx1.redhat.com (Postfix) with ESMTPS id 2ED83AB134;
	Fri, 11 Sep 2015 21:47:50 +0000 (UTC)
Received: from foo.bar.baz (vpn1-4-227.ams2.redhat.com [10.36.4.227])
	by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id t8BLlkw1014642
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256
	verify=NO); Fri, 11 Sep 2015 17:47:48 -0400
From: Giuseppe Scrivano <gscrivan@redhat.com>
References: <1425851791-29188-1-git-send-email-gscrivan@redhat.com>
	<55020934.8080505@cs.ucla.edu> <87h9tp91uy.fsf@redhat.com>
	<55023863.6000407@cs.ucla.edu> <87wq2l6u7s.fsf@redhat.com>
	<87oanw7otj.fsf@redhat.com>
	<CAHpGcMJ3em9Ld0cjXfNYWX0uF+2V_nyJxY+oo4KSUgrJ7LAWvg@mail.gmail.com>
	<87wq2i3tf9.fsf@redhat.com> <87wq2duba0.fsf_-_@redhat.com>
	<87d23t1lbk.fsf@redhat.com> <5517574A.2020508@cs.ucla.edu>
	<87fv7uleyp.fsf@redhat.com> <55358394.5040809@cs.ucla.edu>
	<87r3rbg9qc.fsf@redhat.com> <55382807.3020408@cs.ucla.edu>
	<87y4jf24w8.fsf@foo.bar.baz> <5584B2CB.7040104@cs.ucla.edu>
	<87bnd9sak5.fsf@foo.bar.baz> <55F283AC.9030704@cs.ucla.edu>
	<55F29E35.50808@yahoo.no> <55F2F304.2070808@cs.ucla.edu>
Date: Fri, 11 Sep 2015 23:47:46 +0200
In-Reply-To: <55F2F304.2070808@cs.ucla.edu> (Paul Eggert's message of "Fri, 11
	Sep 2015 08:28:04 -0700")
Message-ID: <87vbbgr5kt.fsf@foo.bar.baz>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.15
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 3.x
X-Received-From: 208.118.235.43
Cc: 20062@debbugs.gnu.org
Subject: [bug-diffutils] bug#20062: bug#20062: bug#20062: bug#20062: [PATCH]
	diff: add support for --color
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, 11 Sep 2015 21:48:07 -0000

Hi Paul,

thanks for the review:

Paul Eggert <eggert@cs.ucla.edu> writes:

> Gisle Vanem wrote:
>> No. He added a 'reset_color_context (true);' inside
>> 'signal_handler()'.
>
> Ah, sorry, I was looking at the original edition of the patch.
>
> I just now looked at <http://bugs.gnu.org/20062#101> and still see
> some problems.  Mainly, it doesn't handle SIGTSTP properly.  With
> SIGTSTP an application is supposed to reset the terminal and then
> resignal itself with SIGSTOP before really stopping.  When restarting
> the application then needs to restore the terminal to the current
> state, if the current state is not the default.  This is nearly
> impossible to do correctly with the proposed design.  I suggest
> looking at how GNU ls does it: the signal handler merely sets a flag,
> and the application checks occasionally at safe places whether a
> signal has arrived.

IIRC we agreed on this design so that we react immediately to signals
without blocking (now the most we can block is to write the reset
sequence, but we can't cut this), blocking signals was done in an older
version of the patch.

I've tried to handle SIGTSTP with this addition and everything seems to
work as expected, I'll test it more before propose a new version of the
patch.

Do you see any issue with it?

Regards,
Giuseppe


diff --git a/src/util.c b/src/util.c
index 0f8f7a8..7f11318 100644
--- a/src/util.c
+++ b/src/util.c
@@ -28,6 +28,8 @@
 
 char const pr_program[] = PR_PROGRAM;
 
+static const char *last_context_str;
+
 /* Queue up one-line messages to be printed at the end,
    when -l is specified.  Each message is recorded with a 'struct msg'.  */
 
@@ -145,8 +147,35 @@ print_message_queue (void)
 }
 
 static void
+safe_write_from_signal (const char *str, size_t len)
+{
+  size_t written = 0;
+  while (written < len)
+    {
+      int ret = write (STDOUT_FILENO, str + written,
+                       len - written);
+      if (ret < 0)
+        return;
+      written += ret;
+    }
+}
+
+static void
 signal_handler (int sig)
 {
+  if (sig == SIGCONT)
+    {
+      if (last_context_str)
+        safe_write_from_signal (last_context_str, strlen (last_context_str));
+      return;
+    }
+  if (sig == SIGTSTP)
+    {
+      reset_color_context (true);
+      raise (SIGSTOP);
+      return;
+    }
+
   reset_color_context (true);
 
   /* Restore the default handler, and report the signal again.  */
@@ -163,6 +192,7 @@ install_signal_handlers (void)
 #endif
   int const sig[] =
     {
+      SIGCONT,
       SIGTSTP,
       SIGALRM, SIGHUP, SIGINT, SIGPIPE, SIGQUIT, SIGTERM,
 #ifdef SIGPOLL
@@ -796,28 +826,40 @@ void
 set_header_color_context (void)
 {
   if (colors_enabled)
-    fprintf (outfile, "\x1B[1;39m");
+    {
+      last_context_str = "\x1B[1;39m";
+      fprintf (outfile, "%s", last_context_str);
+    }
 }
 
 void
 set_line_numbers_color_context (void)
 {
   if (colors_enabled)
-    fprintf (outfile, "\x1B[36m");
+    {
+      last_context_str = "\x1B[36m";
+      fprintf (outfile, "%s", last_context_str);
+    }
 }
 
 void
 set_add_color_context (void)
 {
   if (colors_enabled)
-    fprintf (outfile, "\x1B[32m");
+    {
+      last_context_str = "\x1B[32m";
+      fprintf (outfile, "%s", last_context_str);
+    }
 }
 
 void
 set_delete_color_context (void)
 {
   if (colors_enabled)
-    fprintf (outfile, "\x1B[31m");
+    {
+      last_context_str = "\x1B[31m";
+      fprintf (outfile, "%s", last_context_str);
+    }
 }
 
 void
@@ -827,19 +869,12 @@ reset_color_context (bool from_signal)
   if (! colors_enabled)
     return;
 
-  if (! from_signal)
-    fputs (reset_sequence, outfile);
+  if (from_signal)
+    safe_write_from_signal (reset_sequence, sizeof reset_sequence - 1);
   else
     {
-      size_t written = 0;
-      while (written < sizeof reset_sequence - 1)
-        {
-          int ret = write (STDOUT_FILENO, reset_sequence + written,
-                           sizeof reset_sequence - 1 - written);
-          if (ret < 0)
-            return;
-          written += ret;
-        }
+      fputs (reset_sequence, outfile);
+      last_context_str = NULL;
     }
 }
 




From MAILER-DAEMON Fri Sep 11 18:10:11 2015
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1ZaWWJ-0004OM-OM
	for mharc-bug-diffutils@gnu.org; Fri, 11 Sep 2015 18:10:11 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:36168)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZaWWH-0004Lb-Di
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 18:10:10 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZaWWC-0002D2-EU
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 18:10:09 -0400
Received: from debbugs.gnu.org ([208.118.235.43]:37019)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZaWWC-0002CZ-CH
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 18:10:04 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZaWWB-0005qm-EB
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 18:10:03 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Eric Blake <eblake@redhat.com>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-diffutils@gnu.org
Resent-Date: Fri, 11 Sep 2015 22:10:03 +0000
Resent-Message-ID: <handler.20062.B20062.144200937722452@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 20062
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords: patch
To: Giuseppe Scrivano <gscrivan@redhat.com>, Paul Eggert <eggert@cs.ucla.edu>
Received: via spool by 20062-submit@debbugs.gnu.org id=B20062.144200937722452
	(code B ref 20062); Fri, 11 Sep 2015 22:10:03 +0000
Received: (at 20062) by debbugs.gnu.org; 11 Sep 2015 22:09:37 +0000
Received: from localhost ([127.0.0.1]:57462 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1ZaWVl-0005q3-D1
	for submit@debbugs.gnu.org; Fri, 11 Sep 2015 18:09:37 -0400
Received: from mx1.redhat.com ([209.132.183.28]:47479)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <eblake@redhat.com>) id 1ZaWVi-0005pu-I8
	for 20062@debbugs.gnu.org; Fri, 11 Sep 2015 18:09:35 -0400
Received: from int-mx14.intmail.prod.int.phx2.redhat.com
	(int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27])
	by mx1.redhat.com (Postfix) with ESMTPS id D87EEA4459;
	Fri, 11 Sep 2015 22:09:33 +0000 (UTC)
Received: from [10.3.113.15] ([10.3.113.15])
	by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id t8BM9W9t026150; Fri, 11 Sep 2015 18:09:33 -0400
References: <1425851791-29188-1-git-send-email-gscrivan@redhat.com>
	<55020934.8080505@cs.ucla.edu> <87h9tp91uy.fsf@redhat.com>
	<55023863.6000407@cs.ucla.edu> <87wq2l6u7s.fsf@redhat.com>
	<87oanw7otj.fsf@redhat.com>
	<CAHpGcMJ3em9Ld0cjXfNYWX0uF+2V_nyJxY+oo4KSUgrJ7LAWvg@mail.gmail.com>
	<87wq2i3tf9.fsf@redhat.com> <87wq2duba0.fsf_-_@redhat.com>
	<87d23t1lbk.fsf@redhat.com> <5517574A.2020508@cs.ucla.edu>
	<87fv7uleyp.fsf@redhat.com> <55358394.5040809@cs.ucla.edu>
	<87r3rbg9qc.fsf@redhat.com> <55382807.3020408@cs.ucla.edu>
	<87y4jf24w8.fsf@foo.bar.baz> <5584B2CB.7040104@cs.ucla.edu>
	<87bnd9sak5.fsf@foo.bar.baz> <55F283AC.9030704@cs.ucla.edu>
	<55F29E35.50808@yahoo.no> <55F2F304.2070808@cs.ucla.edu>
	<87vbbgr5kt.fsf@foo.bar.baz>
From: Eric Blake <eblake@redhat.com>
Openpgp: url=http://people.redhat.com/eblake/eblake.gpg
X-Enigmail-Draft-Status: N1110
Organization: Red Hat, Inc.
Message-ID: <55F35117.5080005@redhat.com>
Date: Fri, 11 Sep 2015 16:09:27 -0600
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101
	Thunderbird/38.2.0
MIME-Version: 1.0
In-Reply-To: <87vbbgr5kt.fsf@foo.bar.baz>
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="29WWnbQAJvlH5VjGAhpWtq8XUTWhkL0jW"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.15
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 3.x
X-Received-From: 208.118.235.43
Cc: 20062@debbugs.gnu.org
Subject: [bug-diffutils] bug#20062: bug#20062: bug#20062: bug#20062:
	bug#20062: [PATCH] diff: add support for --color
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, 11 Sep 2015 22:10:10 -0000

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--29WWnbQAJvlH5VjGAhpWtq8XUTWhkL0jW
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 09/11/2015 03:47 PM, Giuseppe Scrivano wrote:

>  static void
> +safe_write_from_signal (const char *str, size_t len)
> +{
> +  size_t written =3D 0;
> +  while (written < len)
> +    {
> +      int ret =3D write (STDOUT_FILENO, str + written,
> +                       len - written);

This writes unbuffered...

> @@ -796,28 +826,40 @@ void
>  set_header_color_context (void)
>  {
>    if (colors_enabled)
> -    fprintf (outfile, "\x1B[1;39m");
> +    {
> +      last_context_str =3D "\x1B[1;39m";
> +      fprintf (outfile, "%s", last_context_str);

=2E..while this is buffering output and might not be output right away. I=
t
is not safe to mix stdio and low-level write() to the same fd without
flush()ing between transitions.  But at the same time, I don't think
that you want to convert everything to use low-level write().

Is it safe to block SIGTSTP around critical sections of when you must
not be stopped, then pay attention to the volatile flag to know that you
must flush and re-raise() TSTP as soon as possible? I'm a bit fuzzy on
what the proper way is to get the terminal to a proper state,
particularly if the TSTP arrived in the middle of stdio outputting a
terminal escape sequence.  It seems like the only safe way is to block
TSTP except for in places where you know that you do NOT have pending
data that would mess with the terminal, even if the cost of getting the
process to a point where it will actually stop in response to the user
request takes longer.

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


--29WWnbQAJvlH5VjGAhpWtq8XUTWhkL0jW
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/

iQEcBAEBCAAGBQJV81EXAAoJEKeha0olJ0NqbzkH/ioq8OUlaulqOTNmZ5GgsjUb
KfQ+y83LZgtlinX4u/7Z0wC9PhkeJcORi8jk4O1A8Lb+1HNjZATxDuy74AphFHTn
EUDj6j4Ef/qrG71numHhQr1gbquQCPna0u7yGZNtFq7BDn7BdIIpmmTW7tsSHWeB
17GG9OB4pOf9xdlk1ZVpnbgAoxBt8DZrD9XpBglSqetvkn03Nu9PucjFNFiMGX4G
GqSKrmT+zGmbwD/lTK/GFHSpeU0TZpT6r164eYsmBj/Ho+n6gaT3r+tMJtrkZlP0
lgFQv0aqNCBhNohup8zjrrdfYmA7gnRWHFyV4tPl8d15fndL/uh0LkNUzVbPE3I=
=v9Oh
-----END PGP SIGNATURE-----

--29WWnbQAJvlH5VjGAhpWtq8XUTWhkL0jW--




From MAILER-DAEMON Fri Sep 11 18:15:10 2015
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1ZaWb8-0005Ve-EG
	for mharc-bug-diffutils@gnu.org; Fri, 11 Sep 2015 18:15:10 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:37145)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZaWb6-0005Tc-Ac
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 18:15:08 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZaWb1-0003ii-9F
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 18:15:08 -0400
Received: from debbugs.gnu.org ([208.118.235.43]:37023)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZaWb1-0003iM-6w
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 18:15:03 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZaWb0-0005yC-KT
	for bug-diffutils@gnu.org; Fri, 11 Sep 2015 18:15: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: Fri, 11 Sep 2015 22:15:02 +0000
Resent-Message-ID: <handler.20062.B20062.144200969722923@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 20062
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords: patch
To: Eric Blake <eblake@redhat.com>, Giuseppe Scrivano <gscrivan@redhat.com>
Received: via spool by 20062-submit@debbugs.gnu.org id=B20062.144200969722923
	(code B ref 20062); Fri, 11 Sep 2015 22:15:02 +0000
Received: (at 20062) by debbugs.gnu.org; 11 Sep 2015 22:14:57 +0000
Received: from localhost ([127.0.0.1]:57466 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1ZaWav-0005xe-E9
	for submit@debbugs.gnu.org; Fri, 11 Sep 2015 18:14:57 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:56283)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <eggert@cs.ucla.edu>) id 1ZaWat-0005xW-F5
	for 20062@debbugs.gnu.org; Fri, 11 Sep 2015 18:14:56 -0400
Received: from localhost (localhost [127.0.0.1])
	by zimbra.cs.ucla.edu (Postfix) with ESMTP id 5D3E316107C;
	Fri, 11 Sep 2015 15:14:54 -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 HALPnhiJ9Ijk; Fri, 11 Sep 2015 15:14:53 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
	by zimbra.cs.ucla.edu (Postfix) with ESMTP id A996916107D;
	Fri, 11 Sep 2015 15:14:53 -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 SOZb6a6ii8JC; Fri, 11 Sep 2015 15:14:53 -0700 (PDT)
Received: from [192.168.1.9] (pool-100-32-155-148.lsanca.fios.verizon.net
	[100.32.155.148])
	by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 8A0D1161078;
	Fri, 11 Sep 2015 15:14:53 -0700 (PDT)
References: <1425851791-29188-1-git-send-email-gscrivan@redhat.com>
	<55020934.8080505@cs.ucla.edu> <87h9tp91uy.fsf@redhat.com>
	<55023863.6000407@cs.ucla.edu> <87wq2l6u7s.fsf@redhat.com>
	<87oanw7otj.fsf@redhat.com>
	<CAHpGcMJ3em9Ld0cjXfNYWX0uF+2V_nyJxY+oo4KSUgrJ7LAWvg@mail.gmail.com>
	<87wq2i3tf9.fsf@redhat.com> <87wq2duba0.fsf_-_@redhat.com>
	<87d23t1lbk.fsf@redhat.com> <5517574A.2020508@cs.ucla.edu>
	<87fv7uleyp.fsf@redhat.com> <55358394.5040809@cs.ucla.edu>
	<87r3rbg9qc.fsf@redhat.com> <55382807.3020408@cs.ucla.edu>
	<87y4jf24w8.fsf@foo.bar.baz> <5584B2CB.7040104@cs.ucla.edu>
	<87bnd9sak5.fsf@foo.bar.baz> <55F283AC.9030704@cs.ucla.edu>
	<55F29E35.50808@yahoo.no> <55F2F304.2070808@cs.ucla.edu>
	<87vbbgr5kt.fsf@foo.bar.baz> <55F35117.5080005@redhat.com>
From: Paul Eggert <eggert@cs.ucla.edu>
Organization: UCLA Computer Science Department
Message-ID: <55F3525D.7050006@cs.ucla.edu>
Date: Fri, 11 Sep 2015 15:14:53 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101
	Thunderbird/38.2.0
MIME-Version: 1.0
In-Reply-To: <55F35117.5080005@redhat.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.15
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 3.x
X-Received-From: 208.118.235.43
Cc: 20062@debbugs.gnu.org
Subject: [bug-diffutils] bug#20062: bug#20062: bug#20062: bug#20062:
	bug#20062: [PATCH] diff: add support for --color
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, 11 Sep 2015 22:15:09 -0000

Eric Blake wrote:
> It seems like the only safe way is to block
> TSTP except for in places where you know that you do NOT have pending
> data that would mess with the terminal, even if the cost of getting the
> process to a point where it will actually stop in response to the user
> request takes longer.

That's one way to do it, yes.  In practice, though, it's easier (and probably 
faster) to do what GNU ls does, namely to have the the signal handler just set a 
volatile flag, and to periodically inspect the flag during normal computation in 
places where you can easily arrange for the terminal to be in a known state 
before acting on the signal.




From MAILER-DAEMON Sat Sep 12 04:55:07 2015
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1ZagaR-00085H-OP
	for mharc-bug-diffutils@gnu.org; Sat, 12 Sep 2015 04:55:07 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:33392)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZagaP-00082q-OI
	for bug-diffutils@gnu.org; Sat, 12 Sep 2015 04:55:06 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZagaM-000682-IQ
	for bug-diffutils@gnu.org; Sat, 12 Sep 2015 04:55:05 -0400
Received: from debbugs.gnu.org ([208.118.235.43]:37161)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZagaM-00067P-ER
	for bug-diffutils@gnu.org; Sat, 12 Sep 2015 04:55:02 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZagaM-0003iE-1x
	for bug-diffutils@gnu.org; Sat, 12 Sep 2015 04:55:02 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Giuseppe Scrivano <gscrivan@redhat.com>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-diffutils@gnu.org
Resent-Date: Sat, 12 Sep 2015 08:55:01 +0000
Resent-Message-ID: <handler.20062.B20062.144204807114232@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 20062
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords: patch
To: Paul Eggert <eggert@cs.ucla.edu>
Received: via spool by 20062-submit@debbugs.gnu.org id=B20062.144204807114232
	(code B ref 20062); Sat, 12 Sep 2015 08:55:01 +0000
Received: (at 20062) by debbugs.gnu.org; 12 Sep 2015 08:54:31 +0000
Received: from localhost ([127.0.0.1]:57604 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1ZagZr-0003hU-3Z
	for submit@debbugs.gnu.org; Sat, 12 Sep 2015 04:54:31 -0400
Received: from mx1.redhat.com ([209.132.183.28]:40703)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <gscrivan@redhat.com>) id 1ZagZo-0003hL-U4
	for 20062@debbugs.gnu.org; Sat, 12 Sep 2015 04:54:29 -0400
Received: from int-mx13.intmail.prod.int.phx2.redhat.com
	(int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26])
	by mx1.redhat.com (Postfix) with ESMTPS id 01EFCC0B2017;
	Sat, 12 Sep 2015 08:54:27 +0000 (UTC)
Received: from foo.bar.baz (vpn1-4-183.ams2.redhat.com [10.36.4.183])
	by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id t8C8sOxw032306
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256
	verify=NO); Sat, 12 Sep 2015 04:54:26 -0400
From: Giuseppe Scrivano <gscrivan@redhat.com>
References: <1425851791-29188-1-git-send-email-gscrivan@redhat.com>
	<87wq2l6u7s.fsf@redhat.com> <87oanw7otj.fsf@redhat.com>
	<CAHpGcMJ3em9Ld0cjXfNYWX0uF+2V_nyJxY+oo4KSUgrJ7LAWvg@mail.gmail.com>
	<87wq2i3tf9.fsf@redhat.com> <87wq2duba0.fsf_-_@redhat.com>
	<87d23t1lbk.fsf@redhat.com> <5517574A.2020508@cs.ucla.edu>
	<87fv7uleyp.fsf@redhat.com> <55358394.5040809@cs.ucla.edu>
	<87r3rbg9qc.fsf@redhat.com> <55382807.3020408@cs.ucla.edu>
	<87y4jf24w8.fsf@foo.bar.baz> <5584B2CB.7040104@cs.ucla.edu>
	<87bnd9sak5.fsf@foo.bar.baz> <55F283AC.9030704@cs.ucla.edu>
	<55F29E35.50808@yahoo.no> <55F2F304.2070808@cs.ucla.edu>
	<87vbbgr5kt.fsf@foo.bar.baz> <55F35117.5080005@redhat.com>
	<55F3525D.7050006@cs.ucla.edu>
Date: Sat, 12 Sep 2015 10:54:24 +0200
In-Reply-To: <55F3525D.7050006@cs.ucla.edu> (Paul Eggert's message of "Fri, 11
	Sep 2015 15:14:53 -0700")
Message-ID: <87lhccqapr.fsf@foo.bar.baz>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.15
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 3.x
X-Received-From: 208.118.235.43
Cc: 20062@debbugs.gnu.org
Subject: [bug-diffutils] bug#20062: bug#20062: bug#20062: bug#20062:
	bug#20062: [PATCH] diff: add support for --color
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: Sat, 12 Sep 2015 08:55:06 -0000

Paul Eggert <eggert@cs.ucla.edu> writes:

> Eric Blake wrote:
>> It seems like the only safe way is to block
>> TSTP except for in places where you know that you do NOT have pending
>> data that would mess with the terminal, even if the cost of getting the
>> process to a point where it will actually stop in response to the user
>> request takes longer.
>
> That's one way to do it, yes.  In practice, though, it's easier (and
> probably faster) to do what GNU ls does, namely to have the the signal
> handler just set a volatile flag, and to periodically inspect the flag
> during normal computation in places where you can easily arrange for
> the terminal to be in a known state before acting on the signal.

in a previous version of the patch, I was blocking signals when diff
starts using colored output and re-enable them again once exiting from a
colored context, but it was rejected because it could block indefinitely
on long lines.  Would block signals between a set_*_color_context and
reset_color_context be enough or do we need more granularity (there are
many places where printf is used in the code)?

Thanks,
Giuseppe




From MAILER-DAEMON Sat Sep 12 05:38:08 2015
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1ZahG4-0002xb-OW
	for mharc-bug-diffutils@gnu.org; Sat, 12 Sep 2015 05:38:08 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:42964)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZahG2-0002wX-Jb
	for bug-diffutils@gnu.org; Sat, 12 Sep 2015 05:38:07 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZahFy-0000ez-Ir
	for bug-diffutils@gnu.org; Sat, 12 Sep 2015 05:38:06 -0400
Received: from debbugs.gnu.org ([208.118.235.43]:37200)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZahFy-0000et-Eo
	for bug-diffutils@gnu.org; Sat, 12 Sep 2015 05:38:02 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZahFx-0004gO-U8
	for bug-diffutils@gnu.org; Sat, 12 Sep 2015 05:38: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: Sat, 12 Sep 2015 09:38:01 +0000
Resent-Message-ID: <handler.20062.B20062.144205067117983@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 20062
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords: patch
To: Giuseppe Scrivano <gscrivan@redhat.com>
Received: via spool by 20062-submit@debbugs.gnu.org id=B20062.144205067117983
	(code B ref 20062); Sat, 12 Sep 2015 09:38:01 +0000
Received: (at 20062) by debbugs.gnu.org; 12 Sep 2015 09:37:51 +0000
Received: from localhost ([127.0.0.1]:57643 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1ZahFn-0004fz-8H
	for submit@debbugs.gnu.org; Sat, 12 Sep 2015 05:37:51 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:40770)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <eggert@cs.ucla.edu>) id 1ZahFl-0004fr-Lr
	for 20062@debbugs.gnu.org; Sat, 12 Sep 2015 05:37:50 -0400
Received: from localhost (localhost [127.0.0.1])
	by zimbra.cs.ucla.edu (Postfix) with ESMTP id 99CCD16106D;
	Sat, 12 Sep 2015 02:37:48 -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 Sbekr6de9RXV; Sat, 12 Sep 2015 02:37:47 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
	by zimbra.cs.ucla.edu (Postfix) with ESMTP id 180EC161076;
	Sat, 12 Sep 2015 02:37:47 -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 tDCeTXnORlxG; Sat, 12 Sep 2015 02:37:46 -0700 (PDT)
Received: from [192.168.1.9] (pool-100-32-155-148.lsanca.fios.verizon.net
	[100.32.155.148])
	by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id DC66B16106D;
	Sat, 12 Sep 2015 02:37:46 -0700 (PDT)
References: <1425851791-29188-1-git-send-email-gscrivan@redhat.com>
	<87wq2l6u7s.fsf@redhat.com> <87oanw7otj.fsf@redhat.com>
	<CAHpGcMJ3em9Ld0cjXfNYWX0uF+2V_nyJxY+oo4KSUgrJ7LAWvg@mail.gmail.com>
	<87wq2i3tf9.fsf@redhat.com> <87wq2duba0.fsf_-_@redhat.com>
	<87d23t1lbk.fsf@redhat.com> <5517574A.2020508@cs.ucla.edu>
	<87fv7uleyp.fsf@redhat.com> <55358394.5040809@cs.ucla.edu>
	<87r3rbg9qc.fsf@redhat.com> <55382807.3020408@cs.ucla.edu>
	<87y4jf24w8.fsf@foo.bar.baz> <5584B2CB.7040104@cs.ucla.edu>
	<87bnd9sak5.fsf@foo.bar.baz> <55F283AC.9030704@cs.ucla.edu>
	<55F29E35.50808@yahoo.no> <55F2F304.2070808@cs.ucla.edu>
	<87vbbgr5kt.fsf@foo.bar.baz> <55F35117.5080005@redhat.com>
	<55F3525D.7050006@cs.ucla.edu> <87lhccqapr.fsf@foo.bar.baz>
From: Paul Eggert <eggert@cs.ucla.edu>
Organization: UCLA Computer Science Department
Message-ID: <55F3F26A.4050400@cs.ucla.edu>
Date: Sat, 12 Sep 2015 02:37:46 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101
	Thunderbird/38.2.0
MIME-Version: 1.0
In-Reply-To: <87lhccqapr.fsf@foo.bar.baz>
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.15
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 3.x
X-Received-From: 208.118.235.43
Cc: 20062@debbugs.gnu.org
Subject: [bug-diffutils] bug#20062: bug#20062: bug#20062: bug#20062:
	bug#20062: [PATCH] diff: add support for --color
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: Sat, 12 Sep 2015 09:38:07 -0000

Giuseppe Scrivano wrote:
>   Would block signals between a set_*_color_context and
> reset_color_context be enough or do we need more granularity (there are
> many places where printf is used in the code)?

No, for reasons Eric described: output is buffered.

I suggest looking at the source code of GNU ls and seeing how it does things. 
In normal execution it never blocks signals at all.  (It temporarily blocks 
signals only when processing a signal.)




From MAILER-DAEMON Sat Sep 12 07:41:08 2015
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1ZajB6-0001Sy-RI
	for mharc-bug-diffutils@gnu.org; Sat, 12 Sep 2015 07:41:08 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:35865)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZajB3-0001Qt-PH
	for bug-diffutils@gnu.org; Sat, 12 Sep 2015 07:41:06 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZajB0-0007LS-JI
	for bug-diffutils@gnu.org; Sat, 12 Sep 2015 07:41:05 -0400
Received: from debbugs.gnu.org ([208.118.235.43]:37226)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZajB0-0007LM-G9
	for bug-diffutils@gnu.org; Sat, 12 Sep 2015 07:41:02 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZajB0-0000Yf-3I
	for bug-diffutils@gnu.org; Sat, 12 Sep 2015 07:41:02 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Giuseppe Scrivano <gscrivan@redhat.com>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-diffutils@gnu.org
Resent-Date: Sat, 12 Sep 2015 11:41:02 +0000
Resent-Message-ID: <handler.20062.B20062.14420580162082@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 20062
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords: patch
To: Paul Eggert <eggert@cs.ucla.edu>
Received: via spool by 20062-submit@debbugs.gnu.org id=B20062.14420580162082
	(code B ref 20062); Sat, 12 Sep 2015 11:41:02 +0000
Received: (at 20062) by debbugs.gnu.org; 12 Sep 2015 11:40:16 +0000
Received: from localhost ([127.0.0.1]:57669 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1ZajAF-0000XW-N7
	for submit@debbugs.gnu.org; Sat, 12 Sep 2015 07:40:16 -0400
Received: from mx1.redhat.com ([209.132.183.28]:36048)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <gscrivan@redhat.com>) id 1ZajAD-0000XJ-0D
	for 20062@debbugs.gnu.org; Sat, 12 Sep 2015 07:40:14 -0400
Received: from int-mx11.intmail.prod.int.phx2.redhat.com
	(int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24])
	by mx1.redhat.com (Postfix) with ESMTPS id B34F42F5166;
	Sat, 12 Sep 2015 11:40:11 +0000 (UTC)
Received: from foo.bar.baz (vpn1-4-183.ams2.redhat.com [10.36.4.183])
	by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id t8CBe8gk009268
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256
	verify=NO); Sat, 12 Sep 2015 07:40:10 -0400
From: Giuseppe Scrivano <gscrivan@redhat.com>
References: <1425851791-29188-1-git-send-email-gscrivan@redhat.com>
	<CAHpGcMJ3em9Ld0cjXfNYWX0uF+2V_nyJxY+oo4KSUgrJ7LAWvg@mail.gmail.com>
	<87wq2i3tf9.fsf@redhat.com> <87wq2duba0.fsf_-_@redhat.com>
	<87d23t1lbk.fsf@redhat.com> <5517574A.2020508@cs.ucla.edu>
	<87fv7uleyp.fsf@redhat.com> <55358394.5040809@cs.ucla.edu>
	<87r3rbg9qc.fsf@redhat.com> <55382807.3020408@cs.ucla.edu>
	<87y4jf24w8.fsf@foo.bar.baz> <5584B2CB.7040104@cs.ucla.edu>
	<87bnd9sak5.fsf@foo.bar.baz> <55F283AC.9030704@cs.ucla.edu>
	<55F29E35.50808@yahoo.no> <55F2F304.2070808@cs.ucla.edu>
	<87vbbgr5kt.fsf@foo.bar.baz> <55F35117.5080005@redhat.com>
	<55F3525D.7050006@cs.ucla.edu> <87lhccqapr.fsf@foo.bar.baz>
	<55F3F26A.4050400@cs.ucla.edu>
Date: Sat, 12 Sep 2015 13:40:08 +0200
In-Reply-To: <55F3F26A.4050400@cs.ucla.edu> (Paul Eggert's message of "Sat, 12
	Sep 2015 02:37:46 -0700")
Message-ID: <87bnd7n9wn.fsf@foo.bar.baz>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.15
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 3.x
X-Received-From: 208.118.235.43
Cc: 20062@debbugs.gnu.org
Subject: [bug-diffutils] bug#20062: bug#20062: bug#20062: bug#20062:
	bug#20062: [PATCH] diff: add support for --color
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: Sat, 12 Sep 2015 11:41:06 -0000

Paul Eggert <eggert@cs.ucla.edu> writes:

> Giuseppe Scrivano wrote:
>>   Would block signals between a set_*_color_context and
>> reset_color_context be enough or do we need more granularity (there are
>> many places where printf is used in the code)?
>
> No, for reasons Eric described: output is buffered.

can't we solve this by flushing the output before enabling signals?  In
case of using buffered output we would still need to flush it to be sure
the reset sequence is printed.


> I suggest looking at the source code of GNU ls and seeing how it does
> things. In normal execution it never blocks signals at all.  (It
> temporarily blocks signals only when processing a signal.)

we already had this discussion about an older version of the patch where
signals were processed after every line.  We agreed that one difference
between ls and diff is that ls has a limit on the line length, while
diff hasn't such a limit and as you noted, it is bound only to the
available memory.  This was the reason for reacting to signals as soon
as diff receives one.

Either we block signals or we catch them and process as ls does (calling
'process_signals' periodically) that problem will still be present.

What is your call on this?

Thanks,
Giuseppe




From MAILER-DAEMON Sat Sep 12 11:53:10 2015
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Zan70-00072d-AT
	for mharc-bug-diffutils@gnu.org; Sat, 12 Sep 2015 11:53:10 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:33044)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1Zan6y-00072H-GR
	for bug-diffutils@gnu.org; Sat, 12 Sep 2015 11:53:09 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1Zan6s-0007U4-SG
	for bug-diffutils@gnu.org; Sat, 12 Sep 2015 11:53:08 -0400
Received: from debbugs.gnu.org ([208.118.235.43]:38052)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1Zan6s-0007U0-P0
	for bug-diffutils@gnu.org; Sat, 12 Sep 2015 11:53:02 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1Zan6s-0006Kx-Dq
	for bug-diffutils@gnu.org; Sat, 12 Sep 2015 11:53: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: Sat, 12 Sep 2015 15:53:02 +0000
Resent-Message-ID: <handler.20062.B20062.144207314624318@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 20062
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords: patch
To: Giuseppe Scrivano <gscrivan@redhat.com>
Received: via spool by 20062-submit@debbugs.gnu.org id=B20062.144207314624318
	(code B ref 20062); Sat, 12 Sep 2015 15:53:02 +0000
Received: (at 20062) by debbugs.gnu.org; 12 Sep 2015 15:52:26 +0000
Received: from localhost ([127.0.0.1]:58495 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1Zan6H-0006K9-Vi
	for submit@debbugs.gnu.org; Sat, 12 Sep 2015 11:52:26 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:46596)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <eggert@cs.ucla.edu>) id 1Zan6F-0006Jz-E6
	for 20062@debbugs.gnu.org; Sat, 12 Sep 2015 11:52:24 -0400
Received: from localhost (localhost [127.0.0.1])
	by zimbra.cs.ucla.edu (Postfix) with ESMTP id 24FE8161069;
	Sat, 12 Sep 2015 08:52:22 -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 tf5zgYv8rMFB; Sat, 12 Sep 2015 08:52:21 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
	by zimbra.cs.ucla.edu (Postfix) with ESMTP id 285C516106A;
	Sat, 12 Sep 2015 08:52:21 -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 tdOyh8gwYWNg; Sat, 12 Sep 2015 08:52:21 -0700 (PDT)
Received: from [192.168.1.9] (pool-100-32-155-148.lsanca.fios.verizon.net
	[100.32.155.148])
	by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 07906161069;
	Sat, 12 Sep 2015 08:52:21 -0700 (PDT)
References: <1425851791-29188-1-git-send-email-gscrivan@redhat.com>
	<CAHpGcMJ3em9Ld0cjXfNYWX0uF+2V_nyJxY+oo4KSUgrJ7LAWvg@mail.gmail.com>
	<87wq2i3tf9.fsf@redhat.com> <87wq2duba0.fsf_-_@redhat.com>
	<87d23t1lbk.fsf@redhat.com> <5517574A.2020508@cs.ucla.edu>
	<87fv7uleyp.fsf@redhat.com> <55358394.5040809@cs.ucla.edu>
	<87r3rbg9qc.fsf@redhat.com> <55382807.3020408@cs.ucla.edu>
	<87y4jf24w8.fsf@foo.bar.baz> <5584B2CB.7040104@cs.ucla.edu>
	<87bnd9sak5.fsf@foo.bar.baz> <55F283AC.9030704@cs.ucla.edu>
	<55F29E35.50808@yahoo.no> <55F2F304.2070808@cs.ucla.edu>
	<87vbbgr5kt.fsf@foo.bar.baz> <55F35117.5080005@redhat.com>
	<55F3525D.7050006@cs.ucla.edu> <87lhccqapr.fsf@foo.bar.baz>
	<55F3F26A.4050400@cs.ucla.edu> <87bnd7n9wn.fsf@foo.bar.baz>
From: Paul Eggert <eggert@cs.ucla.edu>
Organization: UCLA Computer Science Department
Message-ID: <55F44A2E.2050506@cs.ucla.edu>
Date: Sat, 12 Sep 2015 08:52:14 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101
	Thunderbird/38.2.0
MIME-Version: 1.0
In-Reply-To: <87bnd7n9wn.fsf@foo.bar.baz>
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.15
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 3.x
X-Received-From: 208.118.235.43
Cc: 20062@debbugs.gnu.org
Subject: [bug-diffutils] bug#20062: bug#20062: bug#20062: bug#20062:
	bug#20062: [PATCH] diff: add support for --color
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: Sat, 12 Sep 2015 15:53:09 -0000

Giuseppe Scrivano wrote:
> Paul Eggert <eggert@cs.ucla.edu> writes:
>
>> Giuseppe Scrivano wrote:
>>>    Would block signals between a set_*_color_context and
>>> reset_color_context be enough or do we need more granularity (there are
>>> many places where printf is used in the code)?
>>
>> No, for reasons Eric described: output is buffered.
>
> can't we solve this by flushing the output before enabling signals?

"enabling"?  Do you mean, flushing the output when a signal is caught?  No, that 
won't work, as stdio is not safe in the presence of signals.  Or do you mean 
fflush the output before unblocking signals?  Yes, that will work, but it's slow.

> we already had this discussion about an older version of the patch where
> signals were processed after every line.  We agreed that one difference
> between ls and diff is that ls has a limit on the line length, while
> diff hasn't such a limit and as you noted, it is bound only to the
> available memory.  This was the reason for reacting to signals as soon
> as diff receives one.

Sorry, I don't remember that discussion.  Yes, the point is a valid one, and 
needs to be addressed.

> Either we block signals or we catch them and process as ls does (calling
> 'process_signals' periodically) that problem will still be present.

True.  However, blocking signals means we'll need to periodically 
fflush-unblock-block, which will slow us down; the whole point of stdio is 
efficiency via buffering, after all.  Doing it the 'ls' way avoids this 
overhead, as we'll need to fflush only when a signal has actually arrived, plus 
we avoid the syscall overhead of periodic unblock-block.




From MAILER-DAEMON Wed Sep 23 09:00:15 2015
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Zejeg-0001wP-RX
	for mharc-bug-diffutils@gnu.org; Wed, 23 Sep 2015 09:00:14 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:48141)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1Zeh4w-0002q3-0C
	for bug-diffutils@gnu.org; Wed, 23 Sep 2015 06:15:12 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1Zeh4q-0004Zv-8R
	for bug-diffutils@gnu.org; Wed, 23 Sep 2015 06:15:09 -0400
Received: from debbugs.gnu.org ([208.118.235.43]:50150)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1Zeh4q-0004ZO-4c
	for bug-diffutils@gnu.org; Wed, 23 Sep 2015 06:15:04 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1Zeh4p-0006Pl-7n
	for bug-diffutils@gnu.org; Wed, 23 Sep 2015 06:15:03 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Giuseppe Scrivano <gscrivano@gnu.org>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-diffutils@gnu.org
Resent-Date: Wed, 23 Sep 2015 10:15:02 +0000
Resent-Message-ID: <handler.20062.B20062.144300327324610@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 20062
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords: patch
To: Paul Eggert <eggert@cs.ucla.edu>
Received: via spool by 20062-submit@debbugs.gnu.org id=B20062.144300327324610
	(code B ref 20062); Wed, 23 Sep 2015 10:15:02 +0000
Received: (at 20062) by debbugs.gnu.org; 23 Sep 2015 10:14:33 +0000
Received: from localhost ([127.0.0.1]:42360 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1Zeh4J-0006Oq-TE
	for submit@debbugs.gnu.org; Wed, 23 Sep 2015 06:14:33 -0400
Received: from mx1.redhat.com ([209.132.183.28]:33413)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <gscrivano@gnu.org>) id 1Zeh4G-0006Oh-PT
	for 20062@debbugs.gnu.org; Wed, 23 Sep 2015 06:14:31 -0400
Received: from int-mx09.intmail.prod.int.phx2.redhat.com
	(int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22])
	by mx1.redhat.com (Postfix) with ESMTPS id 90A9091C02;
	Wed, 23 Sep 2015 10:14:27 +0000 (UTC)
Received: from foo.bar.baz (vpn1-5-213.ams2.redhat.com [10.36.5.213])
	by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id t8NAENWd020778
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256
	verify=NO); Wed, 23 Sep 2015 06:14:24 -0400
From: Giuseppe Scrivano <gscrivano@gnu.org>
References: <1425851791-29188-1-git-send-email-gscrivan@redhat.com>
	<87wq2duba0.fsf_-_@redhat.com> <87d23t1lbk.fsf@redhat.com>
	<5517574A.2020508@cs.ucla.edu> <87fv7uleyp.fsf@redhat.com>
	<55358394.5040809@cs.ucla.edu> <87r3rbg9qc.fsf@redhat.com>
	<55382807.3020408@cs.ucla.edu> <87y4jf24w8.fsf@foo.bar.baz>
	<5584B2CB.7040104@cs.ucla.edu> <87bnd9sak5.fsf@foo.bar.baz>
	<55F283AC.9030704@cs.ucla.edu> <55F29E35.50808@yahoo.no>
	<55F2F304.2070808@cs.ucla.edu> <87vbbgr5kt.fsf@foo.bar.baz>
	<55F35117.5080005@redhat.com> <55F3525D.7050006@cs.ucla.edu>
	<87lhccqapr.fsf@foo.bar.baz> <55F3F26A.4050400@cs.ucla.edu>
	<87bnd7n9wn.fsf@foo.bar.baz> <55F44A2E.2050506@cs.ucla.edu>
Date: Wed, 23 Sep 2015 12:14:22 +0200
In-Reply-To: <55F44A2E.2050506@cs.ucla.edu> (Paul Eggert's message of "Sat, 12
	Sep 2015 08:52:14 -0700")
Message-ID: <8737y5h281.fsf@foo.bar.baz>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.15
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 3.x
X-Received-From: 208.118.235.43
X-Mailman-Approved-At: Wed, 23 Sep 2015 09:00:12 -0400
Cc: 20062@debbugs.gnu.org
Subject: [bug-diffutils] bug#20062: bug#20062: bug#20062: bug#20062:
	bug#20062: [PATCH] diff: add support for --color
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, 23 Sep 2015 10:15:12 -0000

--=-=-=
Content-Type: text/plain

Hi Paul,

Paul Eggert <eggert@cs.ucla.edu> writes:

>> Either we block signals or we catch them and process as ls does (calling
>> 'process_signals' periodically) that problem will still be present.
>
> True.  However, blocking signals means we'll need to periodically
> fflush-unblock-block, which will slow us down; the whole point of
> stdio is efficiency via buffering, after all.  Doing it the 'ls' way
> avoids this overhead, as we'll need to fflush only when a signal has
> actually arrived, plus we avoid the syscall overhead of periodic
> unblock-block.

I have attached a new version of the patch where I've copied the signals
handling code from coreutils and ensure that output_1_line won't block
for too long without checking `process_signals'.


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline; filename=0001-diff-add-support-for-color.patch

>From 2568e589ad38845ab8eaf895a98a84b94a29b72d Mon Sep 17 00:00:00 2001
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sun, 8 Mar 2015 22:45:11 +0100
Subject: [PATCH] diff: add support for --color

* doc/diffutils.texi (diff Options): Add documentation for --color.
Copied from coreutils ls --color.
* src/context.c (pr_unidiff_hunk): Set the color context.
(print_context_header): Likewise.
(pr_context_hunk): Likewise.
* src/diff.h (enum colors_style): New enum to record when to use colors.
(colors_style): New variable to memorize the argument value.
(set_add_color_context): Add function definition.
(set_delete_color_context): Likewise.
(set_header_color_context): Likewise.
(set_line_numbers_color_context): Likewise.
(reset_color_context): Likewise.
* src/diff.c: : Define COLOR_OPTION.
(specify_colors_style): New function.
(longopts): Add --color.
(main): Handle --color argument.
(option_help_msgid): Add usage string for --color.
* src/normal.c (print_normal_hunk): Set the color context.
* src/side.c (print_1sdiff_line): Likewise.
* src/util.c (colors_enabled): New boolean variable.
(begin_output): Call check_color_output once the output file is
configured.
(output_1_line): Periodically call `process_signals'.
(caught_signals): New sigset_t.
(colors_enabled): New boolean variable.
(interrupt_signal): New sig_atomic_t.
(stop_signal_count): New sig_atomic_t.
(check_color_output): New function.
(install_signal_handlers): Likewise. Copied from coreutils ls.
(process_signals): Likewise.  Copied from coreutils ls.
(reset_color_context): Likewise.
(set_add_color_context): Likewise.
(set_delete_color_context): Likewise.
(set_header_color_context): Likewise.
(set_line_numbers_color_context): Likewise.
(sighandler): Likewise.  Copied from coreutils ls.
(stophandler): Likewise.  Copied from coreutils ls.
---
 doc/diffutils.texi |  21 ++++
 src/context.c      |  51 +++++++--
 src/diff.c         |  27 ++++-
 src/diff.h         |  21 ++++
 src/normal.c       |  18 +++-
 src/side.c         |  15 +++
 src/util.c         | 309 +++++++++++++++++++++++++++++++++++++++++++++++------
 7 files changed, 418 insertions(+), 44 deletions(-)

diff --git a/doc/diffutils.texi b/doc/diffutils.texi
index 091257f..0944b44 100644
--- a/doc/diffutils.texi
+++ b/doc/diffutils.texi
@@ -3742,6 +3742,27 @@ Read and write data in binary mode.  @xref{Binary}.
 Use the context output format, showing three lines of context.
 @xref{Context Format}.
 
+@item --color [=@var{when}]
+@cindex color, distinguishing different context
+Specify whether to use color for distinguishing different contexts,
+like header, added or removed lines.  @var{when} may be omitted, or
+one of:
+@itemize @bullet
+@item none
+@vindex none @r{color option}
+Do not use color at all.  This is the default when no --color option
+is present.
+@item auto
+@vindex auto @r{color option}
+@cindex terminal, using color iff
+Only use color if standard output is a terminal.
+@item always
+@vindex always @r{color option}
+Always use color.
+@end itemize
+Specifying @option{--color} and no @var{when} is equivalent to
+@option{--color=auto}.
+
 @item -C @var{lines}
 @itemx --context@r{[}=@var{lines}@r{]}
 Use the context output format, showing @var{lines} (an integer) lines of
diff --git a/src/context.c b/src/context.c
index e0f21c4..8e9a74f 100644
--- a/src/context.c
+++ b/src/context.c
@@ -80,6 +80,7 @@ print_context_label (char const *mark,
 void
 print_context_header (struct file_data inf[], char const *const *names, bool unidiff)
 {
+  set_header_color_context ();
   if (unidiff)
     {
       print_context_label ("---", &inf[0], names[0], file_label[0]);
@@ -90,6 +91,7 @@ print_context_header (struct file_data inf[], char const *const *names, bool uni
       print_context_label ("***", &inf[0], names[0], file_label[0]);
       print_context_label ("---", &inf[1], names[1], file_label[1]);
     }
+  reset_color_context ();
 }
 
 /* Print an edit script in context format.  */
@@ -215,6 +217,7 @@ pr_context_hunk (struct change *hunk)
 
       for (i = first0; i <= last0; i++)
 	{
+          bool reset_context = false;
 	  /* Skip past changes that apply (in file 0)
 	     only to lines before line I.  */
 
@@ -225,12 +228,18 @@ pr_context_hunk (struct change *hunk)
 
 	  prefix = " ";
 	  if (next && next->line0 <= i)
-	    /* The change NEXT covers this line.
-	       If lines were inserted here in file 1, this is "changed".
-	       Otherwise it is "deleted".  */
-	    prefix = (next->inserted > 0 ? "!" : "-");
+            {
+              reset_context = true;
+              set_delete_color_context ();
+              /* The change NEXT covers this line.
+                 If lines were inserted here in file 1, this is "changed".
+                 Otherwise it is "deleted".  */
+              prefix = (next->inserted > 0 ? "!" : "-");
+            }
 
 	  print_1_line (prefix, &files[0].linbuf[i]);
+          if (reset_context)
+            reset_color_context ();
 	}
     }
 
@@ -244,6 +253,7 @@ pr_context_hunk (struct change *hunk)
 
       for (i = first1; i <= last1; i++)
 	{
+          bool reset_context = false;
 	  /* Skip past changes that apply (in file 1)
 	     only to lines before line I.  */
 
@@ -254,12 +264,17 @@ pr_context_hunk (struct change *hunk)
 
 	  prefix = " ";
 	  if (next && next->line1 <= i)
-	    /* The change NEXT covers this line.
-	       If lines were deleted here in file 0, this is "changed".
-	       Otherwise it is "inserted".  */
-	    prefix = (next->deleted > 0 ? "!" : "+");
-
+            {
+              reset_context = true;
+              set_add_color_context ();
+              /* The change NEXT covers this line.
+                 If lines were deleted here in file 0, this is "changed".
+                 Otherwise it is "inserted".  */
+              prefix = (next->deleted > 0 ? "!" : "+");
+            }
 	  print_1_line (prefix, &files[1].linbuf[i]);
+          if (reset_context)
+            reset_color_context ();
 	}
     }
 }
@@ -330,11 +345,13 @@ pr_unidiff_hunk (struct change *hunk)
   begin_output ();
   out = outfile;
 
+  set_line_numbers_color_context ();
   fputs ("@@ -", out);
   print_unidiff_number_range (&files[0], first0, last0);
   fputs (" +", out);
   print_unidiff_number_range (&files[1], first1, last1);
   fputs (" @@", out);
+  reset_color_context ();
 
   if (function)
     print_context_function (out, function);
@@ -360,9 +377,17 @@ pr_unidiff_hunk (struct change *hunk)
 	}
       else
 	{
+          bool reset_context = false;
+
 	  /* For each difference, first output the deleted part. */
 
 	  k = next->deleted;
+          if (k)
+            {
+              reset_context = true;
+              set_delete_color_context ();
+            }
+
 	  while (k--)
 	    {
 	      char const * const *line = &files[0].linbuf[i++];
@@ -375,9 +400,15 @@ pr_unidiff_hunk (struct change *hunk)
 	  /* Then output the inserted part. */
 
 	  k = next->inserted;
+          if (k)
+            {
+              reset_context = true;
+              set_add_color_context ();
+            }
 	  while (k--)
 	    {
 	      char const * const *line = &files[1].linbuf[j++];
+	      set_add_color_context ();
 	      putc ('+', out);
 	      if (initial_tab && ! (suppress_blank_empty && **line == '\n'))
 		putc ('\t', out);
@@ -386,6 +417,8 @@ pr_unidiff_hunk (struct change *hunk)
 
 	  /* We're done with this hunk, so on to the next! */
 
+          if (reset_context)
+            reset_color_context ();
 	  next = next->link;
 	}
     }
diff --git a/src/diff.c b/src/diff.c
index ff28377..be6e6e3 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -70,6 +70,7 @@ static void add_regexp (struct regexp_list *, char const *);
 static void summarize_regexp_list (struct regexp_list *);
 static void specify_style (enum output_style);
 static void specify_value (char const **, char const *, char const *);
+static void specify_colors_style (char const *);
 static void try_help (char const *, char const *) __attribute__((noreturn));
 static void check_stdout (void);
 static void usage (void);
@@ -136,7 +137,9 @@ enum
   UNCHANGED_GROUP_FORMAT_OPTION,
   OLD_GROUP_FORMAT_OPTION,
   NEW_GROUP_FORMAT_OPTION,
-  CHANGED_GROUP_FORMAT_OPTION
+  CHANGED_GROUP_FORMAT_OPTION,
+
+  COLOR_OPTION,
 };
 
 static char const group_format_option[][sizeof "--unchanged-group-format"] =
@@ -159,6 +162,7 @@ static struct option const longopts[] =
   {"binary", 0, 0, BINARY_OPTION},
   {"brief", 0, 0, 'q'},
   {"changed-group-format", 1, 0, CHANGED_GROUP_FORMAT_OPTION},
+  {"color", 2, 0, COLOR_OPTION},
   {"context", 2, 0, 'C'},
   {"ed", 0, 0, 'e'},
   {"exclude", 1, 0, 'x'},
@@ -627,6 +631,10 @@ main (int argc, char **argv)
 	  specify_value (&group_format[c], optarg, group_format_option[c]);
 	  break;
 
+	case COLOR_OPTION:
+	  specify_colors_style (optarg);
+	  break;
+
 	default:
 	  try_help (NULL, NULL);
 	}
@@ -940,6 +948,8 @@ static char const * const option_help_msgid[] = {
   N_("-d, --minimal            try hard to find a smaller set of changes"),
   N_("    --horizon-lines=NUM  keep NUM lines of the common prefix and suffix"),
   N_("    --speed-large-files  assume large files and many scattered small changes"),
+  N_("    --color[=WHEN]         colorize the output; WHEN can be 'never', 'always',"),
+  N_("                             or 'auto' (the default)"),
   "",
   N_("    --help               display this help and exit"),
   N_("-v, --version            output version information and exit"),
@@ -1008,6 +1018,21 @@ specify_style (enum output_style style)
       output_style = style;
     }
 }
+
+/* Set the color mode.  */
+static void
+specify_colors_style (char const *value)
+{
+  if (value == NULL || STREQ (value, "auto"))
+    colors_style = AUTO;
+  else if (STREQ (value, "always"))
+    colors_style = ALWAYS;
+  else if (STREQ (value, "never"))
+    colors_style = NEVER;
+  else
+    try_help ("invalid color '%s'", value);
+}
+
 
 /* Set the last-modified time of *ST to be the current time.  */
 
diff --git a/src/diff.h b/src/diff.h
index 465e4bc..472fa93 100644
--- a/src/diff.h
+++ b/src/diff.h
@@ -38,6 +38,19 @@ enum changes
   /* Both deletes and inserts: a hunk containing both old and new lines.  */
   CHANGED
 };
+
+/* What kind of changes a hunk contains.  */
+enum colors_style
+{
+  /* Never output colors.  */
+  NEVER,
+
+  /* Output colors if the output is a terminal.  */
+  AUTO,
+
+  /* Always output colors.  */
+  ALWAYS,
+};
 
 /* Variables for command line options */
 
@@ -83,6 +96,9 @@ enum output_style
 
 XTERN enum output_style output_style;
 
+/* Define the current color context used to print a line.  */
+XTERN enum colors_style colors_style;
+
 /* Nonzero if output cannot be generated for identical files.  */
 XTERN bool no_diff_means_no_output;
 
@@ -390,3 +406,8 @@ extern void print_script (struct change *, struct change * (*) (struct change *)
 extern void setup_output (char const *, char const *, bool);
 extern void translate_range (struct file_data const *, lin, lin,
                              long int *, long int *);
+extern void set_header_color_context (void);
+extern void set_add_color_context (void);
+extern void set_delete_color_context (void);
+extern void reset_color_context (void);
+extern void set_line_numbers_color_context (void);
diff --git a/src/normal.c b/src/normal.c
index 721fd1a..227af10 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -49,21 +49,31 @@ print_normal_hunk (struct change *hunk)
   begin_output ();
 
   /* Print out the line number header for this hunk */
+  set_line_numbers_color_context ();
   print_number_range (',', &files[0], first0, last0);
   fputc (change_letter[changes], outfile);
   print_number_range (',', &files[1], first1, last1);
   fputc ('\n', outfile);
+  reset_color_context ();
 
   /* Print the lines that the first file has.  */
   if (changes & OLD)
-    for (i = first0; i <= last0; i++)
-      print_1_line ("<", &files[0].linbuf[i]);
+    {
+      set_delete_color_context ();
+      for (i = first0; i <= last0; i++)
+        print_1_line ("<", &files[0].linbuf[i]);
+      reset_color_context ();
+    }
 
   if (changes == CHANGED)
     fputs ("---\n", outfile);
 
   /* Print the lines that the second file has.  */
   if (changes & NEW)
-    for (i = first1; i <= last1; i++)
-      print_1_line (">", &files[1].linbuf[i]);
+    {
+      set_add_color_context ();
+      for (i = first1; i <= last1; i++)
+        print_1_line (">", &files[1].linbuf[i]);
+      reset_color_context ();
+    }
 }
diff --git a/src/side.c b/src/side.c
index 155512c..b762d31 100644
--- a/src/side.c
+++ b/src/side.c
@@ -206,6 +206,18 @@ print_1sdiff_line (char const *const *left, char sep,
   size_t c2o = sdiff_column2_offset;
   size_t col = 0;
   bool put_newline = false;
+  bool color_to_reset = false;
+
+  if (sep == '<')
+    {
+      set_delete_color_context ();
+      color_to_reset = true;
+    }
+  else if (sep == '>')
+    {
+      set_add_color_context ();
+      color_to_reset = true;
+    }
 
   if (left)
     {
@@ -233,6 +245,9 @@ print_1sdiff_line (char const *const *left, char sep,
 
   if (put_newline)
     putc ('\n', out);
+
+  if (color_to_reset)
+    reset_color_context ();
 }
 
 /* Print lines common to both files in side-by-side format.  */
diff --git a/src/util.c b/src/util.c
index 2d6d3fc..b5b39a2 100644
--- a/src/util.c
+++ b/src/util.c
@@ -24,6 +24,22 @@
 #include <system-quote.h>
 #include <xalloc.h>
 #include "xvasprintf.h"
+#include <signal.h>
+
+/* Use SA_NOCLDSTOP as a proxy for whether the sigaction machinery is
+   present.  */
+#ifndef SA_NOCLDSTOP
+# define SA_NOCLDSTOP 0
+# define sigprocmask(How, Set, Oset) /* empty */
+# define sigset_t int
+# if ! HAVE_SIGINTERRUPT
+#  define siginterrupt(sig, flag) /* empty */
+# endif
+#endif
+
+#ifndef SA_RESTART
+# define SA_RESTART 0
+#endif
 
 char const pr_program[] = PR_PROGRAM;
 
@@ -143,6 +159,152 @@ print_message_queue (void)
     }
 }
 
+/* The set of signals that are caught.  */
+
+static sigset_t caught_signals;
+
+/* If nonzero, the value of the pending fatal signal.  */
+
+static sig_atomic_t volatile interrupt_signal;
+
+/* A count of the number of pending stop signals that have been received.  */
+
+static sig_atomic_t volatile stop_signal_count;
+
+/* An ordinary signal was received; arrange for the program to exit.  */
+
+static void
+sighandler (int sig)
+{
+  if (! SA_NOCLDSTOP)
+    signal (sig, SIG_IGN);
+  if (! interrupt_signal)
+    interrupt_signal = sig;
+}
+
+/* A SIGTSTP was received; arrange for the program to suspend itself.  */
+
+static void
+stophandler (int sig)
+{
+  if (! SA_NOCLDSTOP)
+    signal (sig, stophandler);
+  if (! interrupt_signal)
+    stop_signal_count++;
+}
+/* Process any pending signals.  If signals are caught, this function
+   should be called periodically.  Ideally there should never be an
+   unbounded amount of time when signals are not being processed.
+   Signal handling can restore the default colors, so callers must
+   immediately change colors after invoking this function.  */
+
+static void
+process_signals (void)
+{
+  while (interrupt_signal || stop_signal_count)
+    {
+      int sig;
+      int stops;
+      sigset_t oldset;
+
+      reset_color_context ();
+      fflush (stdout);
+
+      sigprocmask (SIG_BLOCK, &caught_signals, &oldset);
+
+      /* Reload interrupt_signal and stop_signal_count, in case a new
+         signal was handled before sigprocmask took effect.  */
+      sig = interrupt_signal;
+      stops = stop_signal_count;
+
+      /* SIGTSTP is special, since the application can receive that signal
+         more than once.  In this case, don't set the signal handler to the
+         default.  Instead, just raise the uncatchable SIGSTOP.  */
+      if (stops)
+        {
+          stop_signal_count = stops - 1;
+          sig = SIGSTOP;
+        }
+      else
+        signal (sig, SIG_DFL);
+
+      /* Exit or suspend the program.  */
+      raise (sig);
+      sigprocmask (SIG_SETMASK, &oldset, NULL);
+
+      /* If execution reaches here, then the program has been
+         continued (after being suspended).  */
+    }
+}
+
+static void
+install_signal_handlers (void)
+{
+  /* The signals that are trapped, and the number of such signals.  */
+  static int const sig[] =
+    {
+      /* This one is handled specially.  */
+      SIGTSTP,
+
+      /* The usual suspects.  */
+      SIGALRM, SIGHUP, SIGINT, SIGPIPE, SIGQUIT, SIGTERM,
+#ifdef SIGPOLL
+      SIGPOLL,
+#endif
+#ifdef SIGPROF
+      SIGPROF,
+#endif
+#ifdef SIGVTALRM
+      SIGVTALRM,
+#endif
+#ifdef SIGXCPU
+      SIGXCPU,
+#endif
+#ifdef SIGXFSZ
+      SIGXFSZ,
+#endif
+    };
+  enum { nsigs = sizeof (sig) / sizeof *(sig) };
+
+#if ! SA_NOCLDSTOP
+  bool caught_sig[nsigs];
+#endif
+  {
+    int j;
+#if SA_NOCLDSTOP
+    struct sigaction act;
+
+    sigemptyset (&caught_signals);
+    for (j = 0; j < nsigs; j++)
+      {
+        sigaction (sig[j], NULL, &act);
+        if (act.sa_handler != SIG_IGN)
+          sigaddset (&caught_signals, sig[j]);
+      }
+
+    act.sa_mask = caught_signals;
+    act.sa_flags = SA_RESTART;
+
+    for (j = 0; j < nsigs; j++)
+      if (sigismember (&caught_signals, sig[j]))
+        {
+          act.sa_handler = sig[j] == SIGTSTP ? stophandler : sighandler;
+          sigaction (sig[j], &act, NULL);
+        }
+#else
+    for (j = 0; j < nsigs; j++)
+      {
+        caught_sig[j] = (signal (sig[j], SIG_IGN) != SIG_IGN);
+        if (caught_sig[j])
+          {
+            signal (sig[j], sig[j] == SIGTSTP ? stophandler : sighandler);
+            siginterrupt (sig[j], 0);
+          }
+      }
+#endif
+    }
+}
+
 /* Call before outputting the results of comparing files NAME0 and NAME1
    to set up OUTFILE, the stdio stream for the output to go to.
 
@@ -153,6 +315,24 @@ print_message_queue (void)
 static char const *current_name0;
 static char const *current_name1;
 static bool currently_recursive;
+static bool colors_enabled;
+
+static void
+check_color_output (bool is_pipe)
+{
+  bool output_is_tty;
+
+  if (! outfile || colors_style == NEVER)
+    return;
+
+  output_is_tty = !is_pipe && isatty (fileno (outfile));
+
+  colors_enabled = (colors_style == ALWAYS
+                    || (colors_style == AUTO && output_is_tty));
+
+  if (output_is_tty)
+    install_signal_handlers ();
+}
 
 void
 setup_output (char const *name0, char const *name1, bool recursive)
@@ -313,6 +493,7 @@ begin_output (void)
 	    outfile = fdopen (pipes[1], "w");
 	    if (!outfile)
 	      pfatal_with_name ("fdopen");
+	    check_color_output (true);
 	  }
 #else
 	char *command = system_quote_argv (SCI_SYSTEM, (char **) argv);
@@ -320,6 +501,7 @@ begin_output (void)
 	outfile = popen (command, "w");
 	if (!outfile)
 	  pfatal_with_name (command);
+	check_color_output (true);
 	free (command);
 #endif
       }
@@ -330,6 +512,7 @@ begin_output (void)
       /* If -l was not specified, output the diff straight to 'stdout'.  */
 
       outfile = stdout;
+      check_color_output (false);
 
       /* If handling multiple files (because scanning a directory),
 	 print which files the following output is about.  */
@@ -672,8 +855,21 @@ void
 output_1_line (char const *base, char const *limit, char const *flag_format,
 	       char const *line_flag)
 {
+  const size_t MAX_CHUNK = 1024;
   if (!expand_tabs)
-    fwrite (base, sizeof (char), limit - base, outfile);
+    {
+      size_t left = limit - base;
+      while (left)
+        {
+          size_t to_write = MIN (left, MAX_CHUNK);
+          size_t written = fwrite (base, sizeof (char), to_write, outfile);
+          if (written < to_write)
+            return;
+          base += written;
+          left -= written;
+          process_signals ();
+        }
+    }
   else
     {
       register FILE *out = outfile;
@@ -681,40 +877,93 @@ output_1_line (char const *base, char const *limit, char const *flag_format,
       register char const *t = base;
       register size_t column = 0;
       size_t tab_size = tabsize;
+      size_t counter_proc_signals = 0;
 
       while (t < limit)
-	switch ((c = *t++))
-	  {
-	  case '\t':
-	    {
-	      size_t spaces = tab_size - column % tab_size;
-	      column += spaces;
-	      do
-		putc (' ', out);
-	      while (--spaces);
-	    }
-	    break;
+        {
+          counter_proc_signals++;
+          if (counter_proc_signals == MAX_CHUNK)
+            {
+              process_signals ();
+              counter_proc_signals = 0;
+            }
+
+          switch ((c = *t++))
+            {
+            case '\t':
+              {
+                size_t spaces = tab_size - column % tab_size;
+                column += spaces;
+                do
+                  putc (' ', out);
+                while (--spaces);
+              }
+              break;
+
+            case '\r':
+              putc (c, out);
+              if (flag_format && t < limit && *t != '\n')
+                fprintf (out, flag_format, line_flag);
+              column = 0;
+              break;
+
+            case '\b':
+              if (column == 0)
+                continue;
+              column--;
+              putc (c, out);
+              break;
+
+            default:
+              column += isprint (c) != 0;
+              putc (c, out);
+              break;
+            }
+        }
+    }
+}
 
-	  case '\r':
-	    putc (c, out);
-	    if (flag_format && t < limit && *t != '\n')
-	      fprintf (out, flag_format, line_flag);
-	    column = 0;
-	    break;
+void
+set_header_color_context (void)
+{
+  process_signals ();
+  if (colors_enabled)
+    fprintf (outfile, "\x1B[1;39m");
+}
 
-	  case '\b':
-	    if (column == 0)
-	      continue;
-	    column--;
-	    putc (c, out);
-	    break;
+void
+set_line_numbers_color_context (void)
+{
+  process_signals ();
+  if (colors_enabled)
+    fprintf (outfile, "\x1B[36m");
+}
 
-	  default:
-	    column += isprint (c) != 0;
-	    putc (c, out);
-	    break;
-	  }
-    }
+void
+set_add_color_context (void)
+{
+  process_signals ();
+  if (colors_enabled)
+    fprintf (outfile, "\x1B[32m");
+  fflush (outfile);
+}
+
+void
+set_delete_color_context (void)
+{
+  process_signals ();
+  if (colors_enabled)
+    fprintf (outfile, "\x1B[31m");
+}
+
+void
+reset_color_context (void)
+{
+  static char const reset_sequence[] = "\x1b[0m";
+  if (! colors_enabled)
+    return;
+
+  fputs (reset_sequence, outfile);
 }
 
 char const change_letter[] = { 0, 'd', 'a', 'c' };
-- 
2.4.3


--=-=-=
Content-Type: text/plain


Regards,
Giuseppe

--=-=-=--




From MAILER-DAEMON Wed Sep 23 12:01:19 2015
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1ZemTu-0004lY-VW
	for mharc-bug-diffutils@gnu.org; Wed, 23 Sep 2015 12:01:18 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:59811)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZeklK-0006vB-0i
	for bug-diffutils@gnu.org; Wed, 23 Sep 2015 10:11:11 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZeklD-0006Mr-5w
	for bug-diffutils@gnu.org; Wed, 23 Sep 2015 10:11:09 -0400
Received: from debbugs.gnu.org ([208.118.235.43]:50662)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZeklD-0006Ma-0i
	for bug-diffutils@gnu.org; Wed, 23 Sep 2015 10:11:03 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ZeklC-0005fF-L2
	for bug-diffutils@gnu.org; Wed, 23 Sep 2015 10:11:02 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Ed Avis <eda@waniasset.com>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-diffutils@gnu.org
Resent-Date: Wed, 23 Sep 2015 14:11:02 +0000
Resent-Message-ID: <handler.21539.B.144301742321705@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: report 21539
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords: 
To: 21539@debbugs.gnu.org
X-Debbugs-Original-To: "'bug-diffutils@gnu.org'" <bug-diffutils@gnu.org>
Received: via spool by submit@debbugs.gnu.org id=B.144301742321705
	(code B ref -1); Wed, 23 Sep 2015 14:11:02 +0000
Received: (at submit) by debbugs.gnu.org; 23 Sep 2015 14:10:23 +0000
Received: from localhost ([127.0.0.1]:42872 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1ZekkY-0005e1-QH
	for submit@debbugs.gnu.org; Wed, 23 Sep 2015 10:10:23 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48123)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <eda@waniasset.com>) id 1ZekkV-0005dr-9f
	for submit@debbugs.gnu.org; Wed, 23 Sep 2015 10:10:20 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eda@waniasset.com>) id 1ZekkN-0005Aj-QR
	for submit@debbugs.gnu.org; Wed, 23 Sep 2015 10:10:17 -0400
Received: from lists.gnu.org ([2001:4830:134:3::11]:55297)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eda@waniasset.com>) id 1ZekkN-00056S-N2
	for submit@debbugs.gnu.org; Wed, 23 Sep 2015 10:10:11 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:55948)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eda@waniasset.com>) id 1Zekdz-00030n-WB
	for bug-diffutils@gnu.org; Wed, 23 Sep 2015 10:03:36 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eda@waniasset.com>) id 1Zekdu-0001MW-4Y
	for bug-diffutils@gnu.org; Wed, 23 Sep 2015 10:03:35 -0400
Received: from mail1.bemta3.messagelabs.com ([195.245.230.164]:42323)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eda@waniasset.com>) id 1Zekdt-0001MR-Ua
	for bug-diffutils@gnu.org; Wed, 23 Sep 2015 10:03:30 -0400
Received: from [85.158.137.68] by server-4.bemta-3.messagelabs.com id
	3F/44-09570-F21B2065; Wed, 23 Sep 2015 14:03:27 +0000
X-Env-Sender: eda@waniasset.com
X-Msg-Ref: server-11.tower-31.messagelabs.com!1443017006!14166627!1
X-Originating-IP: [80.169.169.167]
X-StarScan-Received: 
X-StarScan-Version: 6.13.16; banners=waniasset.com,-,-
X-VirusChecked: Checked
Received: (qmail 4334 invoked from network); 23 Sep 2015 14:03:27 -0000
Received: from unknown (HELO WCL-EXCHCAS02.wcl.local) (80.169.169.167)
	by server-11.tower-31.messagelabs.com with AES128-SHA encrypted SMTP;
	23 Sep 2015 14:03:27 -0000
Received: from WCL-EXCH02.wcl.local ([169.254.1.217]) by
	WCL-EXCHCAS02.wcl.local ([149.85.127.102]) with mapi id 14.03.0123.003;
	Wed, 23 Sep 2015 15:03:26 +0100
From: Ed Avis <eda@waniasset.com>
Thread-Topic: Feature: suppress timestamps in output
Thread-Index: AdD2CE6WcDtOQOlQQqWkJOkS9XS51A==
Date: Wed, 23 Sep 2015 14:03:25 +0000
Message-ID: <7E039918541B4C4183BFDB8F015C7430BEFD6653@WCL-EXCH02.wcl.local>
Accept-Language: en-US, en-GB
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-originating-ip: [149.85.127.168]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
	(bad octet value).
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.15
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 3.x
X-Received-From: 208.118.235.43
X-Mailman-Approved-At: Wed, 23 Sep 2015 12:01:17 -0400
Subject: [bug-diffutils] bug#21539: Feature: suppress timestamps in output
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, 23 Sep 2015 14:11:11 -0000

Sometimes it is useful to get deterministic results from diff, so that the=
 same input data produces the same output.
I accept that the timestamps diff includes come from the input files speci=
fied, not the time when diff was run, so in that sense they are determinis=
tic.
But still it is awkward to have to touch(1) the input files or otherwise m=
ess around in order to guarantee that the same input contents produce the =
same diff.

Please consider a --no-timestamp flag which stops diff printing the timest=
amp of the input files in the header of its output.

--=20
Ed Avis <eda@waniasset.com>
Please ignore autogenerated disclaimer below this point.



This email is intended only for the person to whom it is addressed and may=
 contain confidential information. Any retransmission, copying, disclosure=
 or other use of, this information by persons other than the intended reci=
pient is prohibited. If you received this email in error, please contact t=
he sender and delete the material. This email is for information only and =
is not intended as an offer or solicitation for the purchase or sale of an=
y financial instrument. Wadhwani Asset Management LLP is a Limited Liabili=
ty Partnership registered in England (OC303168) with registered office at =
40 Berkeley Square, 3rd Floor, London, W1J 5AL. It is authorised and regul=
ated by the Financial Conduct Authority.




From MAILER-DAEMON Wed Sep 23 12:23:10 2015
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Zemp4-00060A-6b
	for mharc-bug-diffutils@gnu.org; Wed, 23 Sep 2015 12:23:10 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:52035)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1Zemp2-0005zn-3B
	for bug-diffutils@gnu.org; Wed, 23 Sep 2015 12:23:08 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1Zemow-0001fJ-LE
	for bug-diffutils@gnu.org; Wed, 23 Sep 2015 12:23:08 -0400
Received: from debbugs.gnu.org ([208.118.235.43]:50718)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1Zemow-0001fD-Dv
	for bug-diffutils@gnu.org; Wed, 23 Sep 2015 12:23:02 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1Zemov-0000J0-MK
	for bug-diffutils@gnu.org; Wed, 23 Sep 2015 12:23:01 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Andreas =?UTF-8?Q?Gr=C3=BCnbacher?= <agruen@gnu.org>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-diffutils@gnu.org
Resent-Date: Wed, 23 Sep 2015 16:23:01 +0000
Resent-Message-ID: <handler.21539.B21539.14430253491134@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 21539
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords: 
To: Ed Avis <eda@waniasset.com>
Received: via spool by 21539-submit@debbugs.gnu.org id=B21539.14430253491134
	(code B ref 21539); Wed, 23 Sep 2015 16:23:01 +0000
Received: (at 21539) by debbugs.gnu.org; 23 Sep 2015 16:22:29 +0000
Received: from localhost ([127.0.0.1]:42928 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1ZemoP-0000IE-33
	for submit@debbugs.gnu.org; Wed, 23 Sep 2015 12:22:29 -0400
Received: from mail-wi0-f173.google.com ([209.85.212.173]:35360)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1ZemoN-0000I6-0v
	for 21539@debbugs.gnu.org; Wed, 23 Sep 2015 12:22:27 -0400
Received: by wicge5 with SMTP id ge5so215159685wic.0
	for <21539@debbugs.gnu.org>; Wed, 23 Sep 2015 09:22:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; 
	h=mime-version:sender:in-reply-to:references:date:message-id:subject
	:from:to:cc:content-type;
	bh=5MWIW6m3m1wKw0vRTTJ2WzVOfiUHrH4mrMgYNFMPUNI=;
	b=aVEE0CUyC17zHVNHG37PH+h5+MJVxBzXg1F5Gre9CSGUN/kFlyvvfg4R0XkFqLpbPY
	hb3Dugm8mGrXwDLA6ddZQ/AmM6LXBJpeqnuENV9DJ4Cw0SPJ9KlIVgIbbZF5Luc6JpLL
	iauqc0R4e+T55EJY401afBjj4p7zpl7ETVyD/TOO3p1x8ZrpXpJB9wWtPUvpGlnTza3o
	zpakK3X8WiRddGFhTnxc94kUiiwjRWFfC35VZ5M4hUpO6uThEAKDSwSdgFYbdS1LePjP
	zj/lVSAebd/f19byf6Nxa5kpP5j1KzJITtxsYtfSii+4KDgX8YKA56TlkGNZnSHIl3vS
	aU/g==
MIME-Version: 1.0
X-Received: by 10.180.24.72 with SMTP id s8mr4649129wif.49.1443025346316; Wed,
	23 Sep 2015 09:22:26 -0700 (PDT)
Received: by 10.27.13.204 with HTTP; Wed, 23 Sep 2015 09:22:26 -0700 (PDT)
In-Reply-To: <7E039918541B4C4183BFDB8F015C7430BEFD6653@WCL-EXCH02.wcl.local>
References: <7E039918541B4C4183BFDB8F015C7430BEFD6653@WCL-EXCH02.wcl.local>
Date: Wed, 23 Sep 2015 18:22:26 +0200
X-Google-Sender-Auth: hJ7_uwU9HJrH2nsrnPW8fkfV8Wg
Message-ID: <CAHpGcMKJhUuB+ERJb6NYrVfAmrfcUR39t8t9ThkUNo4UbwMuOQ@mail.gmail.com>
From: Andreas =?UTF-8?Q?Gr=C3=BCnbacher?= <agruen@gnu.org>
Content-Type: text/plain; charset=UTF-8
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.15
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 3.x
X-Received-From: 208.118.235.43
Cc: 21539@debbugs.gnu.org
Subject: [bug-diffutils] bug#21539: bug#21539: Feature: suppress timestamps
	in output
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, 23 Sep 2015 16:23:09 -0000

2015-09-23 16:03 GMT+02:00 Ed Avis <eda@waniasset.com>:
> Sometimes it is useful to get deterministic results from diff, so that the same input data produces the same output.
> I accept that the timestamps diff includes come from the input files specified, not the time when diff was run, so in that sense they are deterministic.
> But still it is awkward to have to touch(1) the input files or otherwise mess around in order to guarantee that the same input contents produce the same diff.
>
> Please consider a --no-timestamp flag which stops diff printing the timestamp of the input files in the header of its output.

When diffing two files, you can use the --label option to set the file
names; this also overrides the timestamps.

Andreas




From MAILER-DAEMON Thu Sep 24 07:29:11 2015
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Zf4i7-0002Et-6v
	for mharc-bug-diffutils@gnu.org; Thu, 24 Sep 2015 07:29:11 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:56684)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1Zf4i4-0002CW-DU
	for bug-diffutils@gnu.org; Thu, 24 Sep 2015 07:29:09 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1Zf4hz-0002N3-E8
	for bug-diffutils@gnu.org; Thu, 24 Sep 2015 07:29:08 -0400
Received: from debbugs.gnu.org ([208.118.235.43]:52497)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1Zf4hz-0002Mz-Ah
	for bug-diffutils@gnu.org; Thu, 24 Sep 2015 07:29:03 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1Zf4hz-00058w-4D
	for bug-diffutils@gnu.org; Thu, 24 Sep 2015 07:29:03 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Ed Avis <eda@waniasset.com>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-diffutils@gnu.org
Resent-Date: Thu, 24 Sep 2015 11:29:03 +0000
Resent-Message-ID: <handler.21539.B21539.144309413319728@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 21539
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords: 
To: 'Andreas =?UTF-8?Q?Gr=C3=BCnbacher'?= <agruen@gnu.org>
Received: via spool by 21539-submit@debbugs.gnu.org id=B21539.144309413319728
	(code B ref 21539); Thu, 24 Sep 2015 11:29:03 +0000
Received: (at 21539) by debbugs.gnu.org; 24 Sep 2015 11:28:53 +0000
Received: from localhost ([127.0.0.1]:41463 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1Zf4ho-000587-M4
	for submit@debbugs.gnu.org; Thu, 24 Sep 2015 07:28:52 -0400
Received: from mail1.bemta3.messagelabs.com ([195.245.230.167]:48337)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <eda@waniasset.com>) id 1Zf4hm-00057y-B8
	for 21539@debbugs.gnu.org; Thu, 24 Sep 2015 07:28:51 -0400
Received: from [85.158.137.68] by server-7.bemta-3.messagelabs.com id
	87/45-16965-17ED3065; Thu, 24 Sep 2015 11:28:49 +0000
X-Env-Sender: eda@waniasset.com
X-Msg-Ref: server-15.tower-31.messagelabs.com!1443094128!47121572!1
X-Originating-IP: [80.169.169.167]
X-StarScan-Received: 
X-StarScan-Version: 6.13.16; banners=waniasset.com,-,-
X-VirusChecked: Checked
Received: (qmail 5419 invoked from network); 24 Sep 2015 11:28:48 -0000
Received: from unknown (HELO WCL-EXCHCAS02.wcl.local) (80.169.169.167)
	by server-15.tower-31.messagelabs.com with AES128-SHA encrypted SMTP;
	24 Sep 2015 11:28:48 -0000
Received: from WCL-EXCH02.wcl.local ([169.254.1.39]) by
	WCL-EXCHCAS02.wcl.local ([149.85.127.102]) with mapi id 14.03.0123.003;
	Thu, 24 Sep 2015 12:28:48 +0100
From: Ed Avis <eda@waniasset.com>
Thread-Topic: [bug-diffutils] bug#21539: Feature: suppress timestamps in output
Thread-Index: AdD2CE6WcDtOQOlQQqWkJOkS9XS51AAC1hkAACoXxIA=
Date: Thu, 24 Sep 2015 11:28:47 +0000
Message-ID: <7E039918541B4C4183BFDB8F015C7430BFD184C6@WCL-EXCH02.wcl.local>
References: <7E039918541B4C4183BFDB8F015C7430BEFD6653@WCL-EXCH02.wcl.local>
	<CAHpGcMKJhUuB+ERJb6NYrVfAmrfcUR39t8t9ThkUNo4UbwMuOQ@mail.gmail.com>
In-Reply-To: <CAHpGcMKJhUuB+ERJb6NYrVfAmrfcUR39t8t9ThkUNo4UbwMuOQ@mail.gmail.com>
Accept-Language: en-US, en-GB
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-originating-ip: [149.85.127.168]
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.15
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 3.x
X-Received-From: 208.118.235.43
Cc: "'21539@debbugs.gnu.org'" <21539@debbugs.gnu.org>
Subject: [bug-diffutils] bug#21539: bug#21539: Feature: suppress timestamps
	in output
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, 24 Sep 2015 11:29:09 -0000

QW5kcmVhcyBHcsO8bmJhY2hlciA8YWdydWVuQGdudS5vcmc+IHdyb3RlOgoKPldoZW4gZGlmZmlu
ZyB0d28gZmlsZXMsIHlvdSBjYW4gdXNlIHRoZSAtLWxhYmVsIG9wdGlvbiB0byBzZXQgdGhlIGZp
bGUKPm5hbWVzOyB0aGlzIGFsc28gb3ZlcnJpZGVzIHRoZSB0aW1lc3RhbXBzLgoKVGhhbmtzLCB0
aGF0IGRvZXMgaXQuICBJIHN1Z2dlc3QgYSBzbWFsbCB0d2VhayB0byB0aGUgbWFudWFsIHBhZ2U6
CgogICAgICAgLS1sYWJlbCBMQUJFTAogICAgICAgICAgICAgIHVzZSBMQUJFTCBpbnN0ZWFkIG9m
IGZpbGUgbmFtZSBhbmQgdGltZXN0YW1wIChjYW4gYmUgcmVwZWF0ZWQpCgotLSAKRWQgQXZpcyA8
ZWRhQHdhbmlhc3NldC5jb20+ClBsZWFzZSBpZ25vcmUgYXV0b2dlbmVyYXRlZCBkaXNjbGFpbWVy
IGJlbG93IHRoaXMgcG9pbnQuCgpUaGlzIGVtYWlsIGlzIGludGVuZGVkIG9ubHkgZm9yIHRoZSBw
ZXJzb24gdG8gd2hvbSBpdCBpcyBhZGRyZXNzZWQgYW5kIG1heSBjb250YWluIGNvbmZpZGVudGlh
bCBpbmZvcm1hdGlvbi4gQW55IHJldHJhbnNtaXNzaW9uLCBjb3B5aW5nLCBkaXNjbG9zdXJlIG9y
IG90aGVyIHVzZSBvZiwgdGhpcyBpbmZvcm1hdGlvbiBieSBwZXJzb25zIG90aGVyIHRoYW4gdGhl
IGludGVuZGVkIHJlY2lwaWVudCBpcyBwcm9oaWJpdGVkLiBJZiB5b3UgcmVjZWl2ZWQgdGhpcyBl
bWFpbCBpbiBlcnJvciwgcGxlYXNlIGNvbnRhY3QgdGhlIHNlbmRlciBhbmQgZGVsZXRlIHRoZSBt
YXRlcmlhbC4gVGhpcyBlbWFpbCBpcyBmb3IgaW5mb3JtYXRpb24gb25seSBhbmQgaXMgbm90IGlu
dGVuZGVkIGFzIGFuIG9mZmVyIG9yIHNvbGljaXRhdGlvbiBmb3IgdGhlIHB1cmNoYXNlIG9yIHNh
bGUgb2YgYW55IGZpbmFuY2lhbCBpbnN0cnVtZW50LiBXYWRod2FuaSBBc3NldCBNYW5hZ2VtZW50
IExMUCBpcyBhIExpbWl0ZWQgTGlhYmlsaXR5IFBhcnRuZXJzaGlwIHJlZ2lzdGVyZWQgaW4gRW5n
bGFuZCAoT0MzMDMxNjgpIHdpdGggcmVnaXN0ZXJlZCBvZmZpY2UgYXQgNDAgQmVya2VsZXkgU3F1
YXJlLCAzcmQgRmxvb3IsIExvbmRvbiwgVzFKIDVBTC4gSXQgaXMgYXV0aG9yaXNlZCBhbmQgcmVn
dWxhdGVkIGJ5IHRoZSBGaW5hbmNpYWwgQ29uZHVjdCBBdXRob3JpdHkuCg==





From MAILER-DAEMON Thu Sep 24 07:54:07 2015
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Zf56F-0000jN-LD
	for mharc-bug-diffutils@gnu.org; Thu, 24 Sep 2015 07:54:07 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:36024)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1Zf56B-0000cI-Kb
	for bug-diffutils@gnu.org; Thu, 24 Sep 2015 07:54:04 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1Zf56A-0008LT-Rk
	for bug-diffutils@gnu.org; Thu, 24 Sep 2015 07:54:03 -0400
Received: from debbugs.gnu.org ([208.118.235.43]:52503)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1Zf56A-0008LL-PP
	for bug-diffutils@gnu.org; Thu, 24 Sep 2015 07:54:02 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1Zf56A-0007I4-Hb
	for bug-diffutils@gnu.org; Thu, 24 Sep 2015 07:54:02 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Andreas =?UTF-8?Q?Gr=C3=BCnbacher?= <agruen@gnu.org>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-diffutils@gnu.org
Resent-Date: Thu, 24 Sep 2015 11:54:02 +0000
Resent-Message-ID: <handler.21539.B.144309563328008@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 21539
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords: 
To: eda@waniasset.com, 21539@debbugs.gnu.org
X-Debbugs-Original-To: Ed Avis <eda@waniasset.com>, bug-diffutils@gnu.org
Received: via spool by submit@debbugs.gnu.org id=B.144309563328008
	(code B ref -1); Thu, 24 Sep 2015 11:54:02 +0000
Received: (at submit) by debbugs.gnu.org; 24 Sep 2015 11:53:53 +0000
Received: from localhost ([127.0.0.1]:41473 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1Zf560-0007Hf-NM
	for submit@debbugs.gnu.org; Thu, 24 Sep 2015 07:53:52 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54148)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1Zf55z-0007HY-4W
	for submit@debbugs.gnu.org; Thu, 24 Sep 2015 07:53:51 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1Zf55x-0008Fn-Mp
	for submit@debbugs.gnu.org; Thu, 24 Sep 2015 07:53:50 -0400
Received: from lists.gnu.org ([2001:4830:134:3::11]:53836)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1Zf55x-0008Fd-IW
	for submit@debbugs.gnu.org; Thu, 24 Sep 2015 07:53:49 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:35887)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1Zf55w-0000BS-NK
	for bug-diffutils@gnu.org; Thu, 24 Sep 2015 07:53:49 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1Zf55v-0008Di-Mh
	for bug-diffutils@gnu.org; Thu, 24 Sep 2015 07:53:48 -0400
Received: from mail-wi0-x234.google.com ([2a00:1450:400c:c05::234]:35022)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1Zf55v-0008CV-GJ
	for bug-diffutils@gnu.org; Thu, 24 Sep 2015 07:53:47 -0400
Received: by wicge5 with SMTP id ge5so248313452wic.0
	for <bug-diffutils@gnu.org>; Thu, 24 Sep 2015 04:53:46 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; 
	h=mime-version:sender:in-reply-to:references:date:message-id:subject
	:from:to:content-type;
	bh=XnAhVDpi+YguyIk/EeK7E+65STyooAH4LtC0wryEEo0=;
	b=HQB7CHYJQXPWrMWKmSuRJBrsnwWzdOyriDrMelqxVhTTpsIDu/iO4LtSse1DRETNPJ
	GUnP6ZI88wEncX78jf25GWABgtkd6A3yVKt8laAcyvODYVVFp06qSmTAfhUORoQ0aJL9
	ufbIwyv6FigLrmHO1BSstcSdP1TK8ffQRRv9WxRxWMc4aHCZliQCKRb4RVah7RnWRmZv
	KUZbN3eHY4luGlZ/aty0fPjURRZO7XpKD5gmMDgeCs8LcTDFFa7DuAiUXnGIqPRynfcY
	uj134rXAOWsIZBCCQtGMSp7/to/L25ITee7c8sf+9WlrHhZmP0mImy/GdosDqCNMsq+t
	wxeA==
MIME-Version: 1.0
X-Received: by 10.180.205.234 with SMTP id lj10mr9109733wic.49.1443095626410; 
	Thu, 24 Sep 2015 04:53:46 -0700 (PDT)
Received: by 10.27.13.204 with HTTP; Thu, 24 Sep 2015 04:53:46 -0700 (PDT)
In-Reply-To: <7E039918541B4C4183BFDB8F015C7430BFD184C6@WCL-EXCH02.wcl.local>
References: <7E039918541B4C4183BFDB8F015C7430BEFD6653@WCL-EXCH02.wcl.local>
	<CAHpGcMKJhUuB+ERJb6NYrVfAmrfcUR39t8t9ThkUNo4UbwMuOQ@mail.gmail.com>
	<7E039918541B4C4183BFDB8F015C7430BFD184C6@WCL-EXCH02.wcl.local>
Date: Thu, 24 Sep 2015 13:53:46 +0200
X-Google-Sender-Auth: l4ZdLei7yOc9BLiILy1K7h2ugfk
Message-ID: <CAHpGcM+vyakw5QdX8a3xR+azi7W05NujqwA0nFL+6nmr1fLnBQ@mail.gmail.com>
From: Andreas =?UTF-8?Q?Gr=C3=BCnbacher?= <agruen@gnu.org>
Content-Type: multipart/mixed; boundary=001a11c268ca308e9b05207ce249
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
	(bad octet value).
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
	(bad octet value).
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.15
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 3.x
X-Received-From: 208.118.235.43
Subject: [bug-diffutils] bug#21539: bug#21539: Feature: suppress timestamps
	in output
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, 24 Sep 2015 11:54:04 -0000

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

2015-09-24 13:28 GMT+02:00 Ed Avis <eda@waniasset.com>:
> Andreas Gr=C3=BCnbacher <agruen@gnu.org> wrote:
>
>>When diffing two files, you can use the --label option to set the file
>>names; this also overrides the timestamps.
>
> Thanks, that does it.  I suggest a small tweak to the manual page:
>
>        --label LABEL
>               use LABEL instead of file name and timestamp (can be repeat=
ed)

I agree. Attached is this change as a patch; please apply.

Thanks,
Andreas

--001a11c268ca308e9b05207ce249
Content-Type: text/x-diff; charset=US-ASCII; 
	name="diff-Improve-help-text-of-option-label.patch"
Content-Disposition: attachment; 
	filename="diff-Improve-help-text-of-option-label.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_iey5ty2v0

ZGlmZjogSW1wcm92ZSBoZWxwIHRleHQgb2Ygb3B0aW9uIC0tbGFiZWwKCiogc3JjL2RpZmYuYyAo
b3B0aW9uX2hlbHBfbXNnaWQpOiBJbXByb3ZlIGhlbHAgdGV4dCBvZiBvcHRpb24gLS1sYWJlbC4K
CmRpZmYgYS9zcmMvZGlmZi5jIGIvc3JjL2RpZmYuYwotLS0gYS9zcmMvZGlmZi5jCisrKyBiL3Ny
Yy9kaWZmLmMKQEAgLTg3MSw3ICs4NzEsNyBAQCBzdGF0aWMgY2hhciBjb25zdCAqIGNvbnN0IG9w
dGlvbl9oZWxwX21zZ2lkW10gPSB7CiAgICIiLAogICBOXygiLXAsIC0tc2hvdy1jLWZ1bmN0aW9u
ICAgICAgICAgc2hvdyB3aGljaCBDIGZ1bmN0aW9uIGVhY2ggY2hhbmdlIGlzIGluIiksCiAgIE5f
KCItRiwgLS1zaG93LWZ1bmN0aW9uLWxpbmU9UkUgICBzaG93IHRoZSBtb3N0IHJlY2VudCBsaW5l
IG1hdGNoaW5nIFJFIiksCi0gIE5fKCIgICAgLS1sYWJlbCBMQUJFTCAgICAgICAgICAgICB1c2Ug
TEFCRUwgaW5zdGVhZCBvZiBmaWxlIG5hbWVcbiIKKyAgTl8oIiAgICAtLWxhYmVsIExBQkVMICAg
ICAgICAgICAgIHVzZSBMQUJFTCBpbnN0ZWFkIG9mIGZpbGUgbmFtZSBhbmQgdGltZXN0YW1wXG4i
CiAgICAgICIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjYW4gYmUgcmVwZWF0ZWQp
IiksCiAgICIiLAogICBOXygiLXQsIC0tZXhwYW5kLXRhYnMgICAgICAgICAgICAgZXhwYW5kIHRh
YnMgdG8gc3BhY2VzIGluIG91dHB1dCIpLAo=
--001a11c268ca308e9b05207ce249--




From MAILER-DAEMON Thu Sep 24 10:42:13 2015
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Zf7iv-0008Ji-KF
	for mharc-bug-diffutils@gnu.org; Thu, 24 Sep 2015 10:42:13 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:37396)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1Zf7iq-0008G1-0J
	for bug-diffutils@gnu.org; Thu, 24 Sep 2015 10:42:11 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1Zf7il-0004bF-13
	for bug-diffutils@gnu.org; Thu, 24 Sep 2015 10:42:07 -0400
Received: from debbugs.gnu.org ([208.118.235.43]:52928)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1Zf7ik-0004b7-UA
	for bug-diffutils@gnu.org; Thu, 24 Sep 2015 10:42:02 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1Zf7ik-0002qm-JO
	for bug-diffutils@gnu.org; Thu, 24 Sep 2015 10:42: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: Thu, 24 Sep 2015 14:42:02 +0000
Resent-Message-ID: <handler.21539.D21539.144310570010914.done@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: cc-closed 21539
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords: 
To: Andreas =?UTF-8?Q?Gr=C3=BCnbacher?= <agruen@gnu.org>, eda@waniasset.com,
	21539-done@debbugs.gnu.org
Mail-Followup-To: 21539@debbugs.gnu.org, eggert@cs.ucla.edu, eda@waniasset.com
Received: via spool by 21539-done@debbugs.gnu.org id=D21539.144310570010914
	(code D ref 21539); Thu, 24 Sep 2015 14:42:02 +0000
Received: (at 21539-done) by debbugs.gnu.org; 24 Sep 2015 14:41:40 +0000
Received: from localhost ([127.0.0.1]:41899 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1Zf7iN-0002px-I5
	for submit@debbugs.gnu.org; Thu, 24 Sep 2015 10:41:39 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:48446)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <eggert@cs.ucla.edu>) id 1Zf7iL-0002pp-6J
	for 21539-done@debbugs.gnu.org; Thu, 24 Sep 2015 10:41:38 -0400
Received: from localhost (localhost [127.0.0.1])
	by zimbra.cs.ucla.edu (Postfix) with ESMTP id C64FC161198;
	Thu, 24 Sep 2015 07:41:35 -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 GYe6Z0IKeplo; Thu, 24 Sep 2015 07:41:35 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
	by zimbra.cs.ucla.edu (Postfix) with ESMTP id 1E1AF161199;
	Thu, 24 Sep 2015 07:41:35 -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 IOrNppSCcBiF; Thu, 24 Sep 2015 07:41:35 -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 055E116050B;
	Thu, 24 Sep 2015 07:41:35 -0700 (PDT)
References: <7E039918541B4C4183BFDB8F015C7430BEFD6653@WCL-EXCH02.wcl.local>
	<CAHpGcMKJhUuB+ERJb6NYrVfAmrfcUR39t8t9ThkUNo4UbwMuOQ@mail.gmail.com>
	<7E039918541B4C4183BFDB8F015C7430BFD184C6@WCL-EXCH02.wcl.local>
	<CAHpGcM+vyakw5QdX8a3xR+azi7W05NujqwA0nFL+6nmr1fLnBQ@mail.gmail.com>
From: Paul Eggert <eggert@cs.ucla.edu>
Organization: UCLA Computer Science Department
Message-ID: <56040B9C.2090500@cs.ucla.edu>
Date: Thu, 24 Sep 2015 07:41:32 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101
	Thunderbird/38.1.0
MIME-Version: 1.0
In-Reply-To: <CAHpGcM+vyakw5QdX8a3xR+azi7W05NujqwA0nFL+6nmr1fLnBQ@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.15
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 3.x
X-Received-From: 208.118.235.43
Subject: [bug-diffutils] bug#21539: bug#21539: bug#21539: Feature: suppress
	timestamps in output
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, 24 Sep 2015 14:42:11 -0000

Thanks, I applied that patch and am marking this as done.




From MAILER-DAEMON Tue Sep 29 14:56:00 2015
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Zh04G-0005gY-R5
	for mharc-bug-diffutils@gnu.org; Tue, 29 Sep 2015 14:56:00 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:49855)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1Zgb52-0001OG-ES
	for bug-diffutils@gnu.org; Mon, 28 Sep 2015 12:15:09 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1Zgb4y-0006mc-Dy
	for bug-diffutils@gnu.org; Mon, 28 Sep 2015 12:15:08 -0400
Received: from debbugs.gnu.org ([208.118.235.43]:57906)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1Zgb4y-0006l3-A7
	for bug-diffutils@gnu.org; Mon, 28 Sep 2015 12:15:04 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1Zgb4x-0002lZ-FB
	for bug-diffutils@gnu.org; Mon, 28 Sep 2015 12:15:03 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Song Li <lisong@stanford.edu>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-diffutils@gnu.org
Resent-Date: Mon, 28 Sep 2015 16:15:03 +0000
Resent-Message-ID: <handler.21579.B.144345685110547@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: report 21579
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords: 
To: 21579@debbugs.gnu.org
X-Debbugs-Original-To: bug-diffutils@gnu.org
Received: via spool by submit@debbugs.gnu.org id=B.144345685110547
	(code B ref -1); Mon, 28 Sep 2015 16:15:03 +0000
Received: (at submit) by debbugs.gnu.org; 28 Sep 2015 16:14:11 +0000
Received: from localhost ([127.0.0.1]:46877 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1Zgb46-0002k3-Ok
	for submit@debbugs.gnu.org; Mon, 28 Sep 2015 12:14:11 -0400
Received: from eggs.gnu.org ([208.118.235.92]:38044)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <lisong.pine@gmail.com>) id 1ZgavS-0002XZ-TP
	for submit@debbugs.gnu.org; Mon, 28 Sep 2015 12:05:15 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <lisong.pine@gmail.com>) id 1ZgavP-000383-1E
	for submit@debbugs.gnu.org; Mon, 28 Sep 2015 12:05:14 -0400
Received: from lists.gnu.org ([2001:4830:134:3::11]:43237)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <lisong.pine@gmail.com>) id 1ZgavO-00037z-Uy
	for submit@debbugs.gnu.org; Mon, 28 Sep 2015 12:05:10 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:48036)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <lisong.pine@gmail.com>) id 1ZgavJ-0008Q1-CJ
	for bug-diffutils@gnu.org; Mon, 28 Sep 2015 12:05:10 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <lisong.pine@gmail.com>) id 1ZgavI-0002xs-La
	for bug-diffutils@gnu.org; Mon, 28 Sep 2015 12:05:05 -0400
Received: from mail-wi0-x229.google.com ([2a00:1450:400c:c05::229]:35424)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <lisong.pine@gmail.com>) id 1ZgavI-0002wK-Fu
	for bug-diffutils@gnu.org; Mon, 28 Sep 2015 12:05:04 -0400
Received: by wicge5 with SMTP id ge5so111869507wic.0
	for <bug-diffutils@gnu.org>; Mon, 28 Sep 2015 09:05:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; 
	h=mime-version:sender:date:message-id:subject:from:to:content-type;
	bh=0ho2GXNFyYY23LSqnKOYrjt1SeTYsPzX15YmXsM/7Ak=;
	b=ghYDPBgU0mcyvdxkABTh+b/Yfpdc/xa/7Mvb+XvxciYg9ZFPRJzheQD/9Xi/GuPhzh
	Q/h9CMom91rfU+NU22Wr2lA9EYTkywJZYy4IDl6z/X3d254q+FZQfpy1YJ64FiQwy4pK
	uc2jkVUCUYTmtXpi9Y5hCfTER07N6NKiVdtIJFjtISaaWpe6Af52sYOWZu72SolyMQWQ
	8DYb3BMlyna4CGDaKV1Ge+okmDWH95iiNqsv/R+9NIRcIQEJLXMPWHWKIhVj80gTxCue
	BPDfzJNmcDXsjQib00lz7U5LavpnY7hc78lUAzF/z42yUR2/2VkpI4pFoN85C6A4qs0I
	ckMg==
MIME-Version: 1.0
X-Received: by 10.194.143.102 with SMTP id sd6mr26332575wjb.15.1443456303397; 
	Mon, 28 Sep 2015 09:05:03 -0700 (PDT)
Received: by 10.194.240.195 with HTTP; Mon, 28 Sep 2015 09:05:03 -0700 (PDT)
Date: Mon, 28 Sep 2015 09:05:03 -0700
X-Google-Sender-Auth: YaYy1ou3n4lC9mxTSEF9uUD1er8
Message-ID: <CAEUGwxaoj61PoZ2bBERUOSoXh_-WbxYDJLYzxkCdyhQ15Crm0A@mail.gmail.com>
From: Song Li <lisong@stanford.edu>
Content-Type: text/plain; charset=UTF-8
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
	(bad octet value).
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
	(bad octet value).
X-Mailman-Approved-At: Mon, 28 Sep 2015 12:14:09 -0400
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.15
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 3.x
X-Received-From: 208.118.235.43
X-Mailman-Approved-At: Tue, 29 Sep 2015 09:07:00 -0400
Subject: [bug-diffutils] bug#21579: diffutils 3.3 man page may need update
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, 28 Sep 2015 16:15:09 -0000

Hi: the man page of diffutils 3.3 (after installing through brew) does
not seem to include the description for the nice option
'--no-dereference', which is valid, and also appears in `diff --help`
from that package (diffutils 3.3). I assume the OS version does not
matter, but in case needed, I use mac os x el capitan.


Song




