Santiago Vila <[email protected]> writes:
> Hello.
>
> I received the following report from the Debian bug system.
> Thanks.
>
> ----- Forwarded message from Werner Frey <[email protected]> -----
>
> Date: Wed, 22 Oct 2025 16:27:49 +0200
> From: Werner Frey <[email protected]>
> To: Debian Bug Tracking System <[email protected]>
> Subject: Bug#1118586: diffutils: diff --to-file=directory no longer works as
> expected
>
> Package: diffutils
> Version: 1:3.12-1
> Severity: normal
> Tags: upstream
>
> Dear Maintainer,
>
> since diffutils v3.12 the option "--to-file" no longer works as expected
> if its argument is a directory.
>
> diff --to-file=directory file1 file2 file3
>
> should compare file1, file2, and file3 to directory/file1, directory/file2,
> and directory/file3, respectively.
> But it only compares file1 to directory/file1 and reports for the
> remaining comparisons:
>
> diff: directory: No such file or directory
Reminds me of bug 79407. I'll have a look at a fix and adding a test.
Here is how it behaved in some older versions vs. current:
$ mkdir -p directory && touch file{1,2,3} directory/file{1,2,3}
$ diff-3.5 --to-file=directory file1 file2 file3
$ echo $?
0
$ diff-3.10 --to-file=directory file1 file2 file3
$ echo $?
0
$ diff-current --to-file=directory file1 file2 file3
diff-current: directory: No such file or directory
diff-current: directory: No such file or directory
2
Thanks,
Collin
[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=79407