GNU bug report logs - #43923
"only in" message in recursive diff is ambiguous and hence useless if the directories have the same name

Previous Next

Package: diffutils;

Reported by: php fan <php4fan <at> gmail.com>

Date: Sun, 11 Oct 2020 14:03:02 UTC

Severity: normal

To reply to this bug, email your comments to 43923 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-diffutils <at> gnu.org:
bug#43923; Package diffutils. (Sun, 11 Oct 2020 14:03:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to php fan <php4fan <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-diffutils <at> gnu.org. (Sun, 11 Oct 2020 14:03:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: php fan <php4fan <at> gmail.com>
To: bug-diffutils <at> gnu.org
Subject: "only in" message in recursive diff is ambiguous and hence useless if
 the directories have the same name
Date: Sun, 11 Oct 2020 15:52:52 +0200
Steps to reproduce:

- have two folders with the same name under different paths such as
/path/to/xxx and /path/to/other/xxx
- Have some files that exist only in one folder, and some that exist
only in the other
- Run:

$ diff -r /path/to/xxx /path/to/other/xxx

You'll get messages like:
  Only in xxx: somefile.txt
  Only in xxx: otherfile.php

You see the problem, right? How stupid is that.


$diff --version
diff (GNU diffutils) 3.7




Information forwarded to bug-diffutils <at> gnu.org:
bug#43923; Package diffutils. (Sun, 11 Oct 2020 20:27:02 GMT) Full text and rfc822 format available.

Message #8 received at 43923 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: php fan <php4fan <at> gmail.com>
Cc: 43923 <at> debbugs.gnu.org
Subject: Re: [bug-diffutils] bug#43923: "only in" message in recursive diff is
 ambiguous and hence useless if the directories have the same name
Date: Sun, 11 Oct 2020 13:25:59 -0700
On 10/11/20 6:52 AM, php fan wrote:
> - have two folders with the same name under different paths such as
> /path/to/xxx and /path/to/other/xxx
> - Have some files that exist only in one folder, and some that exist
> only in the other
> - Run:
> 
> $ diff -r /path/to/xxx /path/to/other/xxx
> 
> You'll get messages like:
>    Only in xxx: somefile.txt
>    Only in xxx: otherfile.php
> 
> You see the problem, right?

I don't see the problem with diffutils 3.7:

$ mkdir -p path/to/xxx path/to/other/xxx
$ touch path/to/xxx/a path/to/other/xxx/b
$ diff -r path/to/xxx path/to/other/xxx
Only in path/to/xxx: a
Only in path/to/other/xxx: b




This bug report was last modified 4 years and 47 days ago.

Previous Next


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