GNU bug report logs - #15452
Comparing files whose name _do_ match a certain pattern

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: diffutils; Severity: wishlist; Reported by: Dani Moncayo <dmoncayo@HIDDEN>; dated Tue, 24 Sep 2013 08:00:02 UTC; Maintainer for diffutils is bug-diffutils@HIDDEN.
Severity set to 'wishlist' from 'normal' Request was from Paul Eggert <eggert@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 15452 <at> debbugs.gnu.org:


Received: (at 15452) by debbugs.gnu.org; 23 Oct 2013 18:11:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 23 14:11:30 2013
Received: from localhost ([127.0.0.1]:38388 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VZ2u1-0005D0-BV
	for submit <at> debbugs.gnu.org; Wed, 23 Oct 2013 14:11:29 -0400
Received: from smtp.cs.ucla.edu ([131.179.128.62]:46243)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eggert@HIDDEN>) id 1VZ2tz-0005Cn-Jn
 for 15452 <at> debbugs.gnu.org; Wed, 23 Oct 2013 14:11:27 -0400
Received: from localhost (localhost.localdomain [127.0.0.1])
 by smtp.cs.ucla.edu (Postfix) with ESMTP id EDCB439E810A;
 Wed, 23 Oct 2013 11:11:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
 by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id zWIh2f2jfePo; Wed, 23 Oct 2013 11:11:21 -0700 (PDT)
Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200])
 by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 6905A39E8008;
 Wed, 23 Oct 2013 11:11:17 -0700 (PDT)
Message-ID: <52681145.1090100@HIDDEN>
Date: Wed, 23 Oct 2013 11:11:17 -0700
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
 rv:24.0) Gecko/20100101 Thunderbird/24.0
MIME-Version: 1.0
To: Dani Moncayo <dmoncayo@HIDDEN>, 15452 <at> debbugs.gnu.org
Subject: Re: [bug-diffutils] bug#15452: bug#15452: Comparing files whose name
 _do_ match a certain pattern
References: <CAH8Pv0jZMq8OtvbUBRFkcFjOmQJjZ90bBKEdoTeJJ6S3YxovSA@HIDDEN>	<52419CD7.1050304@HIDDEN>	<CAH8Pv0iZABF9CVZb-z=N2aoWhGBsxWNS8R3CM5z41LDi5NOE0Q@HIDDEN>	<CAH8Pv0iG=yO7Lr-JxUQKpfWsVkm32EkUKgLiMYo5nYPLGRYiXg@HIDDEN>	<CAH8Pv0gcYaqCCG4W2gV1Szx3XJhmnpR-zHY_zzB-fFw547HDrA@HIDDEN>
 <CAH8Pv0jMiVDoUe2U0vZpJ2Yrpkdyk8hPvAnMCG0+Dn897-wwig@HIDDEN>
In-Reply-To: <CAH8Pv0jMiVDoUe2U0vZpJ2Yrpkdyk8hPvAnMCG0+Dn897-wwig@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.7 (--)
X-Debbugs-Envelope-To: 15452
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.7 (--)

On 10/23/13 03:39, Dani Moncayo wrote:
> I'm looking forward for this change to be implemented.  Is there some
> hope for that to happen?.

It'd be nice to have.  I implemented that feature for 'grep'
and would be a good candidate to do the same for 'diff'.
Unfortunately I've got a lot on my plate.  Maybe someone
else can steal the 'grep' code.  It'd be nice if it were
a library so that other programs could use it too.




Information forwarded to bug-diffutils@HIDDEN:
bug#15452; Package diffutils. Full text available.

Message received at 15452 <at> debbugs.gnu.org:


Received: (at 15452) by debbugs.gnu.org; 23 Oct 2013 10:40:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 23 06:40:00 2013
Received: from localhost ([127.0.0.1]:37113 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VYvr6-0001CV-IW
	for submit <at> debbugs.gnu.org; Wed, 23 Oct 2013 06:40:00 -0400
Received: from mail-la0-f52.google.com ([209.85.215.52]:51717)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <dmoncayo@HIDDEN>) id 1VYvr3-0001CF-Vn
 for 15452 <at> debbugs.gnu.org; Wed, 23 Oct 2013 06:39:58 -0400
Received: by mail-la0-f52.google.com with SMTP id eh20so488796lab.11
 for <15452 <at> debbugs.gnu.org>; Wed, 23 Oct 2013 03:39:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :content-type; bh=aIs8zSn4Ljta5qkLAKMmm9a2owgf+e7OEWThCmGXp+o=;
 b=GVxsSe5A2RwkP9qxZ5aaj7bdFTLEl5ULrhaqBybI2lw5aEfDIU/6FCkbuFClaavX4+
 6JreCsvEmNxnAGXtxQujZh0XL8iy+Iu1Biu6iy16NaBBYbwXhGfZfO/UitjA9hl32B0q
 D+CuHcWPp0FmqUIU65nG9kITGKOEscNDWcHjEkpGFcTAx94OL8J6RnEZ9qxWgkKA8H71
 J81u/kfDn1Z0TU6Gy9RTC4e+owc4tzug1/VVmer+k2bmEJrljZ17/96v6XX0qYi8QIPK
 CLUFvbQo6Hb0OJS48gnLO/94/VCOTELhOlxlS3sECuVp8hanfX4vFzVyoCd9WAzOuCp9
 gDvA==
MIME-Version: 1.0
X-Received: by 10.112.51.227 with SMTP id n3mr23253lbo.54.1382524791629; Wed,
 23 Oct 2013 03:39:51 -0700 (PDT)
Received: by 10.114.176.231 with HTTP; Wed, 23 Oct 2013 03:39:51 -0700 (PDT)
In-Reply-To: <CAH8Pv0gcYaqCCG4W2gV1Szx3XJhmnpR-zHY_zzB-fFw547HDrA@HIDDEN>
References: <CAH8Pv0jZMq8OtvbUBRFkcFjOmQJjZ90bBKEdoTeJJ6S3YxovSA@HIDDEN>
 <52419CD7.1050304@HIDDEN>
 <CAH8Pv0iZABF9CVZb-z=N2aoWhGBsxWNS8R3CM5z41LDi5NOE0Q@HIDDEN>
 <CAH8Pv0iG=yO7Lr-JxUQKpfWsVkm32EkUKgLiMYo5nYPLGRYiXg@HIDDEN>
 <CAH8Pv0gcYaqCCG4W2gV1Szx3XJhmnpR-zHY_zzB-fFw547HDrA@HIDDEN>
Date: Wed, 23 Oct 2013 12:39:51 +0200
Message-ID: <CAH8Pv0jMiVDoUe2U0vZpJ2Yrpkdyk8hPvAnMCG0+Dn897-wwig@HIDDEN>
Subject: Re: [bug-diffutils] bug#15452: Comparing files whose name _do_ match
 a certain pattern
From: Dani Moncayo <dmoncayo@HIDDEN>
To: 15452 <at> debbugs.gnu.org
Content-Type: text/plain; charset=ISO-8859-1
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 15452
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

>>>> Ah, but why should we bloat diff when find already gives you what you want:
>>>>
>>>> find . -name '*.txt' -exec diff {} other/{} \;
>>>>
>>>> will run diff on only files ending in *.txt, when comparing . against
>>>> other/.
>>>
>>> Ah yes, that's one possibility for doing what I want, but I'd
>>> definitely prefer having the "--include" option, because:
>>>
>>> 1. Simplicity: It would be a lot simpler than the find/diff
>>> combination.  And in the probable case that the "old" directory to
>>> compare is not the current working directory, things get even more
>>> complex, because the files in the "new" directory could not be
>>> expressed in such a simple way ("whatever/{}").
>>>
>>> 2. Consistency: Why not having an "--include" option when we have an
>>> "--exclude" option?
>>
>> Another reason comes to my mind:
>>
>> 3.  Flexibility: Having the possibility of combining "--include" and
>> "--exclude" would be quite convenient in some cases.  It would be a
>> simple way of expressing the intersection of two sets of files.
>
> Another one:
>
> 4. Consistency (II): "grep" has exactly what I'm requesting for "diff":
>
>       --include=FILE_PATTERN  search only files that match FILE_PATTERN
>       --exclude=FILE_PATTERN  skip files and directories matching FILE_PATTERN

I'm looking forward for this change to be implemented.  Is there some
hope for that to happen?.


-- 
Dani Moncayo




Information forwarded to bug-diffutils@HIDDEN:
bug#15452; Package diffutils. Full text available.

Message received at 15452 <at> debbugs.gnu.org:


Received: (at 15452) by debbugs.gnu.org; 24 Sep 2013 17:25:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 24 13:25:51 2013
Received: from localhost ([127.0.0.1]:32876 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VOWMv-0004Hj-G4
	for submit <at> debbugs.gnu.org; Tue, 24 Sep 2013 13:25:50 -0400
Received: from mail-lb0-f170.google.com ([209.85.217.170]:43835)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <dmoncayo@HIDDEN>) id 1VOWMs-0004HV-7V
 for 15452 <at> debbugs.gnu.org; Tue, 24 Sep 2013 13:25:46 -0400
Received: by mail-lb0-f170.google.com with SMTP id w7so4218010lbi.29
 for <15452 <at> debbugs.gnu.org>; Tue, 24 Sep 2013 10:25:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=IeUQbo8yKn02o3VpJ6wYhjLx8JTBtY1nawXRl/SqflE=;
 b=D+CtIV1Igczd6+o85sAsSSTeNZTFy6uM9wrhZZMM5ojfaGmJlSwBdDw8eBDwLbmVlW
 HnQZQYOtcZsnSHwMH7yicOd6ZQeANjB7dnbEGmD7Mrs7IIZSAK0uj8sDAd4xLnme5MtH
 MeXkDe0SIIorwvJOvq4twOunF1hQvLrFDZcXcEVI8GnTTwbf1DVqWVR4LHmICY4cYdf1
 ASQdOfcfmD0hkLas4YopyaqXoVeLgaKT8y3jl/UZUDbLl97VnlGgs0RuzEE3/GcUpO5m
 5JE4wV62dv9L9Lauw3eVcfrUvr3djP4/aXKb53f9Roz2njjMhtaNcOJFBE4x8FfiMvrQ
 G5Xg==
MIME-Version: 1.0
X-Received: by 10.112.143.3 with SMTP id sa3mr25058554lbb.12.1380043539764;
 Tue, 24 Sep 2013 10:25:39 -0700 (PDT)
Received: by 10.114.176.231 with HTTP; Tue, 24 Sep 2013 10:25:39 -0700 (PDT)
In-Reply-To: <CAH8Pv0iG=yO7Lr-JxUQKpfWsVkm32EkUKgLiMYo5nYPLGRYiXg@HIDDEN>
References: <CAH8Pv0jZMq8OtvbUBRFkcFjOmQJjZ90bBKEdoTeJJ6S3YxovSA@HIDDEN>
 <52419CD7.1050304@HIDDEN>
 <CAH8Pv0iZABF9CVZb-z=N2aoWhGBsxWNS8R3CM5z41LDi5NOE0Q@HIDDEN>
 <CAH8Pv0iG=yO7Lr-JxUQKpfWsVkm32EkUKgLiMYo5nYPLGRYiXg@HIDDEN>
Date: Tue, 24 Sep 2013 19:25:39 +0200
Message-ID: <CAH8Pv0gcYaqCCG4W2gV1Szx3XJhmnpR-zHY_zzB-fFw547HDrA@HIDDEN>
Subject: Re: [bug-diffutils] bug#15452: Comparing files whose name _do_ match
 a certain pattern
From: Dani Moncayo <dmoncayo@HIDDEN>
To: Eric Blake <eblake@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 15452
Cc: 15452 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

On Tue, Sep 24, 2013 at 4:46 PM, Dani Moncayo <dmoncayo@HIDDEN> wrote:
> On Tue, Sep 24, 2013 at 4:34 PM, Dani Moncayo <dmoncayo@HIDDEN> wrote:
>>> Ah, but why should we bloat diff when find already gives you what you want:
>>>
>>> find . -name '*.txt' -exec diff {} other/{} \;
>>>
>>> will run diff on only files ending in *.txt, when comparing . against
>>> other/.
>>
>> Ah yes, that's one possibility for doing what I want, but I'd
>> definitely prefer having the "--include" option, because:
>>
>> 1. Simplicity: It would be a lot simpler than the find/diff
>> combination.  And in the probable case that the "old" directory to
>> compare is not the current working directory, things get even more
>> complex, because the files in the "new" directory could not be
>> expressed in such a simple way ("whatever/{}").
>>
>> 2. Consistency: Why not having an "--include" option when we have an
>> "--exclude" option?
>
> Another reason comes to my mind:
>
> 3.  Flexibility: Having the possibility of combining "--include" and
> "--exclude" would be quite convenient in some cases.  It would be a
> simple way of expressing the intersection of two sets of files.

Another one:

4. Consistency (II): "grep" has exactly what I'm requesting for "diff":

      --include=FILE_PATTERN  search only files that match FILE_PATTERN
      --exclude=FILE_PATTERN  skip files and directories matching FILE_PATTERN


-- 
Dani Moncayo




Information forwarded to bug-diffutils@HIDDEN:
bug#15452; Package diffutils. Full text available.

Message received at 15452 <at> debbugs.gnu.org:


Received: (at 15452) by debbugs.gnu.org; 24 Sep 2013 14:46:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 24 10:46:17 2013
Received: from localhost ([127.0.0.1]:60793 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VOTsX-0000Uc-0H
	for submit <at> debbugs.gnu.org; Tue, 24 Sep 2013 10:46:17 -0400
Received: from mail-la0-f52.google.com ([209.85.215.52]:32792)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <dmoncayo@HIDDEN>) id 1VOTsV-0000UI-Cx
 for 15452 <at> debbugs.gnu.org; Tue, 24 Sep 2013 10:46:16 -0400
Received: by mail-la0-f52.google.com with SMTP id ev20so3785928lab.11
 for <15452 <at> debbugs.gnu.org>; Tue, 24 Sep 2013 07:46:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=2JxhNNrLegWsRT3dXy1d4fX5WvcXlnHWT1T6jXlyH2w=;
 b=mNerpnuzfetPe1VNsvmFzrxvoJVVK9yrhK2cNCHBJ3KcqFyul6zFvHzB8L5O/RqD8t
 pKl7wfH1j6cnGFKPfzYJ061bINUxe79OTmqZRDt9yPpurwHvuPb3fyT3heSBB5Nvd9NU
 rnuOU+1/ZaCyI75jGzU1bkengDJMAYtwUy6FKsfRzw+ZToWsBuHbcOHA02uXPhYVBFX7
 ORQmDxQbDPXH+oBvzRzqc7J8LBLlgUCeVkKcqlfMd6oU3e6/WlHG2ItntzsHEg9hgU5o
 IyLSwj/P1zK3GMSbEFIwaZocCXeQ/9XkUvzYZWio9OcMOP8poQkFuM5qXXXzxapxVKTj
 KqRw==
MIME-Version: 1.0
X-Received: by 10.112.156.74 with SMTP id wc10mr1455952lbb.44.1380033969181;
 Tue, 24 Sep 2013 07:46:09 -0700 (PDT)
Received: by 10.114.176.231 with HTTP; Tue, 24 Sep 2013 07:46:09 -0700 (PDT)
In-Reply-To: <CAH8Pv0iZABF9CVZb-z=N2aoWhGBsxWNS8R3CM5z41LDi5NOE0Q@HIDDEN>
References: <CAH8Pv0jZMq8OtvbUBRFkcFjOmQJjZ90bBKEdoTeJJ6S3YxovSA@HIDDEN>
 <52419CD7.1050304@HIDDEN>
 <CAH8Pv0iZABF9CVZb-z=N2aoWhGBsxWNS8R3CM5z41LDi5NOE0Q@HIDDEN>
Date: Tue, 24 Sep 2013 16:46:09 +0200
Message-ID: <CAH8Pv0iG=yO7Lr-JxUQKpfWsVkm32EkUKgLiMYo5nYPLGRYiXg@HIDDEN>
Subject: Re: [bug-diffutils] bug#15452: Comparing files whose name _do_ match
 a certain pattern
From: Dani Moncayo <dmoncayo@HIDDEN>
To: Eric Blake <eblake@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 15452
Cc: 15452 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

On Tue, Sep 24, 2013 at 4:34 PM, Dani Moncayo <dmoncayo@HIDDEN> wrote:
>> Ah, but why should we bloat diff when find already gives you what you want:
>>
>> find . -name '*.txt' -exec diff {} other/{} \;
>>
>> will run diff on only files ending in *.txt, when comparing . against
>> other/.
>
> Ah yes, that's one possibility for doing what I want, but I'd
> definitely prefer having the "--include" option, because:
>
> 1. Simplicity: It would be a lot simpler than the find/diff
> combination.  And in the probable case that the "old" directory to
> compare is not the current working directory, things get even more
> complex, because the files in the "new" directory could not be
> expressed in such a simple way ("whatever/{}").
>
> 2. Consistency: Why not having an "--include" option when we have an
> "--exclude" option?

Another reason comes to my mind:

3.  Flexibility: Having the possibility of combining "--include" and
"--exclude" would be quite convenient in some cases.  It would be a
simple way of expressing the intersection of two sets of files.

-- 
Dani Moncayo




Information forwarded to bug-diffutils@HIDDEN:
bug#15452; Package diffutils. Full text available.

Message received at 15452 <at> debbugs.gnu.org:


Received: (at 15452) by debbugs.gnu.org; 24 Sep 2013 14:34:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 24 10:34:34 2013
Received: from localhost ([127.0.0.1]:60754 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VOThC-0000Aw-Cz
	for submit <at> debbugs.gnu.org; Tue, 24 Sep 2013 10:34:34 -0400
Received: from mail-la0-f50.google.com ([209.85.215.50]:54427)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <dmoncayo@HIDDEN>) id 1VOThA-0000Ai-2L
 for 15452 <at> debbugs.gnu.org; Tue, 24 Sep 2013 10:34:32 -0400
Received: by mail-la0-f50.google.com with SMTP id gx14so3681536lab.23
 for <15452 <at> debbugs.gnu.org>; Tue, 24 Sep 2013 07:34:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=GPB/UhO8g7BUFTsfAIbTjxJsidvH4HH7HT1Qnwik2PU=;
 b=t5OVDY0B+U4Mty/cw/y2mTGiPoNgcXQdjFT/nuTyhyDwJ3X68SDU1v3f5YXHKp67rH
 qQogw0nTa2jIbPIceupAGhHUTfSRWJmEs3XtjqvbvWubLouGVaEeZCdVkVO+raBOH81Z
 RNJwVyTP2cKfFcPHE8+MWczj2PaP0Btp5i0KQhP0lUO42WHurMqhDGbBEHvFLfWobkWm
 qiHrWYyzVsHz3SG5HswC9madNO0aLCYPjOQSG+7s8946UITio/OtTSYm9ASM7/HTvTMn
 zAxpFr69DWM8U60HCB//M02GiEoe5X9Cp43nSmTR8LP9v3AY5/0wZuv5iTAz3QssxA6q
 DB3Q==
MIME-Version: 1.0
X-Received: by 10.152.22.198 with SMTP id g6mr25084688laf.5.1380033265885;
 Tue, 24 Sep 2013 07:34:25 -0700 (PDT)
Received: by 10.114.176.231 with HTTP; Tue, 24 Sep 2013 07:34:25 -0700 (PDT)
In-Reply-To: <52419CD7.1050304@HIDDEN>
References: <CAH8Pv0jZMq8OtvbUBRFkcFjOmQJjZ90bBKEdoTeJJ6S3YxovSA@HIDDEN>
 <52419CD7.1050304@HIDDEN>
Date: Tue, 24 Sep 2013 16:34:25 +0200
Message-ID: <CAH8Pv0iZABF9CVZb-z=N2aoWhGBsxWNS8R3CM5z41LDi5NOE0Q@HIDDEN>
Subject: Re: [bug-diffutils] bug#15452: Comparing files whose name _do_ match
 a certain pattern
From: Dani Moncayo <dmoncayo@HIDDEN>
To: Eric Blake <eblake@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 15452
Cc: 15452 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

> Ah, but why should we bloat diff when find already gives you what you want:
>
> find . -name '*.txt' -exec diff {} other/{} \;
>
> will run diff on only files ending in *.txt, when comparing . against
> other/.

Ah yes, that's one possibility for doing what I want, but I'd
definitely prefer having the "--include" option, because:

1. Simplicity: It would be a lot simpler than the find/diff
combination.  And in the probable case that the "old" directory to
compare is not the current working directory, things get even more
complex, because the files in the "new" directory could not be
expressed in such a simple way ("whatever/{}").

2. Consistency: Why not having an "--include" option when we have an
"--exclude" option?

-- 
Dani Moncayo




Information forwarded to bug-diffutils@HIDDEN:
bug#15452; Package diffutils. Full text available.

Message received at 15452 <at> debbugs.gnu.org:


Received: (at 15452) by debbugs.gnu.org; 24 Sep 2013 14:08:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 24 10:08:29 2013
Received: from localhost ([127.0.0.1]:60685 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VOTHw-0007z5-Km
	for submit <at> debbugs.gnu.org; Tue, 24 Sep 2013 10:08:28 -0400
Received: from mx1.redhat.com ([209.132.183.28]:3576)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eblake@HIDDEN>) id 1VOTHt-0007yv-LJ
 for 15452 <at> debbugs.gnu.org; Tue, 24 Sep 2013 10:08:26 -0400
Received: from int-mx12.intmail.prod.int.phx2.redhat.com
 (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
 by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r8OE8ObG014815
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Tue, 24 Sep 2013 10:08:24 -0400
Received: from [10.3.113.164] (ovpn-113-164.phx2.redhat.com [10.3.113.164])
 by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id
 r8OE8NaJ016315; Tue, 24 Sep 2013 10:08:23 -0400
Message-ID: <52419CD7.1050304@HIDDEN>
Date: Tue, 24 Sep 2013 08:08:23 -0600
From: Eric Blake <eblake@HIDDEN>
Organization: Red Hat, Inc.
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
 rv:17.0) Gecko/20130805 Thunderbird/17.0.8
MIME-Version: 1.0
To: Dani Moncayo <dmoncayo@HIDDEN>
Subject: Re: [bug-diffutils] bug#15452: Comparing files whose name _do_ match
 a certain pattern
References: <CAH8Pv0jZMq8OtvbUBRFkcFjOmQJjZ90bBKEdoTeJJ6S3YxovSA@HIDDEN>
In-Reply-To: <CAH8Pv0jZMq8OtvbUBRFkcFjOmQJjZ90bBKEdoTeJJ6S3YxovSA@HIDDEN>
X-Enigmail-Version: 1.5.2
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature";
 boundary="K0WE9gitSftmd3Rq4F81H6T0e7m52B33R"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
X-Spam-Score: -7.3 (-------)
X-Debbugs-Envelope-To: 15452
Cc: 15452 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -7.3 (-------)

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

On 09/24/2013 01:59 AM, Dani Moncayo wrote:
> [Please, keep my address in CC, as I'm not subscribed to this list]
>=20
> Hello,
>=20
> I'm badly missing an "--include" option in "diff", which would have
> the inverse effect of "--exclude", i.e., to consider only files whose
> names _do_ match a certain pattern.
>=20
> I've been searching the internet and also this mailing list, seeking a
> way of doing this, but I've failed so far, and I'm quite surprised
> that such a feature isn't implemented already.

Ah, but why should we bloat diff when find already gives you what you wan=
t:

find . -name '*.txt' -exec diff {} other/{} \;

will run diff on only files ending in *.txt, when comparing . against
other/.

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


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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBCAAGBQJSQZzXAAoJEKeha0olJ0NqSJQH/1QLor/ZDHEz2dfhX9lOHjOQ
rLMF97qZsNv5LputQxI51WlP/X3CbvHyGdl2QzximEK1me2GcvrHxI3xTsPQkb9K
5f8h/W6Eje3rmFAF+QuDbmFVFGCj73wVDzJ82/UxPeFkS8UkRV2WSYuCmT3NHHdC
+GRqupm9H1S+94ncDcX4eXBVXvYuWLMEdlqdmWkEvkGoETUx2A+eEvPsVhsPRMff
GdMVlr15f0y+ux7YisOIlULHE4awEBL7c/yZgGqXh5PLyZfjpt+3AQTIgEkrR6DD
XFlFkLJexWdnvjlSCmOxQGxlkzJoqdwiC6WTp9FqgKZy/E7FNZBvx0NmVgS9RYg=
=8yLi
-----END PGP SIGNATURE-----

--K0WE9gitSftmd3Rq4F81H6T0e7m52B33R--




Information forwarded to bug-diffutils@HIDDEN:
bug#15452; Package diffutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 24 Sep 2013 07:59:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 24 03:59:39 2013
Received: from localhost ([127.0.0.1]:59872 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VONX0-0006cY-IL
	for submit <at> debbugs.gnu.org; Tue, 24 Sep 2013 03:59:38 -0400
Received: from eggs.gnu.org ([208.118.235.92]:56279)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <dmoncayo@HIDDEN>) id 1VONWx-0006cJ-HL
 for submit <at> debbugs.gnu.org; Tue, 24 Sep 2013 03:59:36 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <dmoncayo@HIDDEN>) id 1VONWq-0006qG-V7
 for submit <at> debbugs.gnu.org; Tue, 24 Sep 2013 03:59:30 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:60859)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <dmoncayo@HIDDEN>) id 1VONWq-0006qC-RQ
 for submit <at> debbugs.gnu.org; Tue, 24 Sep 2013 03:59:28 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:57995)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <dmoncayo@HIDDEN>) id 1VONWp-00053N-I9
 for bug-diffutils@HIDDEN; Tue, 24 Sep 2013 03:59:28 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <dmoncayo@HIDDEN>) id 1VONWo-0006pj-AH
 for bug-diffutils@HIDDEN; Tue, 24 Sep 2013 03:59:27 -0400
Received: from mail-la0-x22e.google.com ([2a00:1450:4010:c03::22e]:41383)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <dmoncayo@HIDDEN>) id 1VONWo-0006pX-1v
 for bug-diffutils@HIDDEN; Tue, 24 Sep 2013 03:59:26 -0400
Received: by mail-la0-f46.google.com with SMTP id eh20so3307250lab.5
 for <bug-diffutils@HIDDEN>; Tue, 24 Sep 2013 00:59:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:date:message-id:subject:from:to:content-type;
 bh=Weegbywp6YwwgGNIgOSNRRf19oGUjww9n2MJH48HwvA=;
 b=bi190MV4Sb/wbcMuBQM0o1Du10by08pjJ7qfrl6JrvxurhRPQc9ls4J1NWEaIEhBSZ
 KMzo2XstNp3HQPYjnNt24U3p5q0c8D31FvIw+b9gbUmyhnSWEFcJ9NaWoEGSZECx/fyj
 F/kFFGZFZYIcLwj3LD7SRfO4OXPFIf1ry9YtBiHCd9nNvSnqHy9eWlLq/uCAtNEIDf20
 cUWf/3gk3Sjpkj6Q1LRgxEf7dE97W7/2MUAvDtfbQKVts5WRSe40Cv9+r+CjxHSA9rnt
 lw/1JxZWJXJHVlxkZPu9rMnaSsyd2uADGfM8pDGExalH7n69yc8cQ+PxUwEQ/EKLRflG
 4znQ==
MIME-Version: 1.0
X-Received: by 10.152.9.37 with SMTP id w5mr10415285laa.23.1380009564737; Tue,
 24 Sep 2013 00:59:24 -0700 (PDT)
Received: by 10.114.176.231 with HTTP; Tue, 24 Sep 2013 00:59:24 -0700 (PDT)
Date: Tue, 24 Sep 2013 09:59:24 +0200
Message-ID: <CAH8Pv0jZMq8OtvbUBRFkcFjOmQJjZ90bBKEdoTeJJ6S3YxovSA@HIDDEN>
Subject: Comparing files whose name _do_ match a certain pattern
From: Dani Moncayo <dmoncayo@HIDDEN>
To: bug-diffutils@HIDDEN
Content-Type: text/plain; charset=ISO-8859-1
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-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

[Please, keep my address in CC, as I'm not subscribed to this list]

Hello,

I'm badly missing an "--include" option in "diff", which would have
the inverse effect of "--exclude", i.e., to consider only files whose
names _do_ match a certain pattern.

I've been searching the internet and also this mailing list, seeking a
way of doing this, but I've failed so far, and I'm quite surprised
that such a feature isn't implemented already.

What I want is a simple way of comparing two directories which have a
bunch of different file types, and I'm only interested on comparing a
subset of them.  Yes, I have the option of excluding every other
possible filetype, but that would be far more complex to do.

Are there a simple way of doing what I want?  If not, could you
implement that "--include" option?

Thanks in advance.

-- 
Dani Moncayo




Acknowledgement sent to Dani Moncayo <dmoncayo@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-diffutils@HIDDEN. Full text available.
Report forwarded to bug-diffutils@HIDDEN:
bug#15452; Package diffutils. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.