From unknown Tue Jun 17 01:35:43 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#20279 <20279@debbugs.gnu.org> To: bug#20279 <20279@debbugs.gnu.org> Subject: Status: With -r, option to avoid duplicate differences due to relative symbolic links Reply-To: bug#20279 <20279@debbugs.gnu.org> Date: Tue, 17 Jun 2025 08:35:43 +0000 retitle 20279 With -r, option to avoid duplicate differences due to relativ= e symbolic links reassign 20279 diffutils submitter 20279 Vincent Lefevre severity 20279 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 08 05:46:17 2015 Received: (at submit) by debbugs.gnu.org; 8 Apr 2015 09:46:17 +0000 Received: from localhost ([127.0.0.1]:48795 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YfmYr-0000SS-Fb for submit@debbugs.gnu.org; Wed, 08 Apr 2015 05:46:17 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48366) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YfmYp-0000SF-BV for submit@debbugs.gnu.org; Wed, 08 Apr 2015 05:46:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YfmYj-0004s6-7F for submit@debbugs.gnu.org; Wed, 08 Apr 2015 05:46:10 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:54723) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YfmYj-0004s2-3v for submit@debbugs.gnu.org; Wed, 08 Apr 2015 05:46:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33617) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YfmYi-0004Q6-0Y for bug-diffutils@gnu.org; Wed, 08 Apr 2015 05:46:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YfmYc-0004qu-Rr for bug-diffutils@gnu.org; Wed, 08 Apr 2015 05:46:07 -0400 Received: from ioooi.vinc17.net ([92.243.22.117]:33302) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YfmYc-0004op-Kx for bug-diffutils@gnu.org; Wed, 08 Apr 2015 05:46:02 -0400 Received: from smtp-xvii.vinc17.net (128.119.75.86.rev.sfr.net [86.75.119.128]) by ioooi.vinc17.net (Postfix) with ESMTPSA id 995B2423; Wed, 8 Apr 2015 11:45:54 +0200 (CEST) Received: by xvii.vinc17.org (Postfix, from userid 1000) id 58FA121A07B; Wed, 8 Apr 2015 11:45:51 +0200 (CEST) Date: Wed, 8 Apr 2015 11:45:51 +0200 From: Vincent Lefevre To: bug-diffutils@gnu.org Subject: With -r, option to avoid duplicate differences due to relative symbolic links Message-ID: <20150408094551.GI5205@xvii.vinc17.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline X-Mailer-Info: http://www.vinc17.net/mutt/ User-Agent: Mutt/1.5.23-6425-vl-r76280 (2015-03-04) Content-Transfer-Encoding: quoted-printable 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-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) When using "diff -r", an additional option to avoid duplicate differences due to symbolic links would be useful. For instance, in directories "a" and "b" to be diff'ed, one may have: file symlink -> file If "file" changes in directory "a", then "diff -r a b" will report a difference for "file", but also for "symlink" as a consequence. This is a bit annoying when reviewing a diff output. An option, possibly named --ignore-identical-links, could be added to detect something like that, e.g. in the following way: 1. Detect whether the object to be diff'ed in directories "a" and "b" are both symbolic links with the same link value. 2. [Optional] If (1) is satisfied, also detect whether the value is a relative symbolic link that is local to the directory. If (1) is satisfied (and optionally (2)), then do not attempt to diff the objects. In practice, just doing (1) would be OK for me. Note: I can't use --no-dereference because I still want to be able to compare objects where one is a symbolic link and the other one is a regular file or a directory. --=20 Vincent Lef=E8vre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)