bug-diffutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-diffutils] bug#46550: bug in diff -r?


From: Stan Schymanski
Subject: [bug-diffutils] bug#46550: bug in diff -r?
Date: Mon, 15 Feb 2021 22:56:38 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0

Dear all,

I cannot get diff -r to search recursively. Here is an example. First I
create two folders, each with one sub-folder and one file, where each
sub-folder and file has a different content:
```
$ mkdir orig
$ mkdir backup
$ mkdir orig/1
$ mkdir backup/2
$ echo 'blah' > orig/1/test.txt
$ ls orig/1
test.txt
$ echo 'blah1' > backup/2/test1.txt
```
Now I compare them using the '-qr' option:

```
$ diff -qr orig/ backup/
Only in orig/: 1
Only in backup/: 2
```
I was expecting to be told that orig/1/test.txt and backup/2/test1.txt
are unique. If I descend into the subfolder in one of them, the file in
that folder is found:
```
$ diff -r orig/1 backup/
Only in backup/: 2
Only in orig/1: test.txt
```
I actually get the same behaviour with or without '-qr'. Is this a bug
or am I misunderstanding diff -r? I am using diff (GNU diffutils) 3.7.

Cheers
Stan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]