Bug report: diff

Eliot Moss moss@cs.umass.edu
Wed Jun 25 20:28:42 GMT 2025


On 6/25/2025 3:03 PM, Brian Inglis via Cygwin wrote:
> On 2025年06月24日 19:46, Eliot Moss via Cygwin wrote:
>> The following used to work, but now does not:
>> diff -q --to-file=old foo.tex bar.tex
>> where old is a sub-directory of the current directory.
>> This always reports:
>> diff: old: No such file or directory
>> It's ok when only one file is listed:
>> diff -q --to-file=old foo.tex
>> Do you have entries ./old/{foo,bar}.tex, do each differ from respective
> ./{foo,bar}.tex, and are there any other entries or directories under ./old/?

I tried with and without. It complains (obviously :-) ) if one of the .tex files
does not actually exist, but that's distinct from complaining about old, which *does*
exist.
> Are there are any file name case differences or symlinks in paths?

No case differences, no symlinks.
> It is often more useful to ls -l (-gG) and diff (-q) actual directories
> ./{,old/} so we can see all relevant information (maybe sanitize info if necessary).

ls -lG old ==>
-rwxrw----+ 1 moss 13811 Jun 24 19:02 arch.tex
-rwxrw----+ 1 moss 35714 Jun 24 19:02 background.tex
-rwxrw----+ 1 moss 6847 Jun 24 19:02 intro.tex
-rwxrw----+ 1 moss 9124 Jun 24 19:03 progress.tex
-rwxrw----+ 1 moss 15858 Jun 23 22:31 proposal.bib
-rwxrw----+ 1 moss 13703 Jun 24 19:03 proposal.tex
-rwxrw----+ 1 moss 12836 Jun 24 19:02 proposed.tex
-rwxrw----+ 1 moss 6541 Jun 24 19:02 timeline.tex
ls -lG ./*.tex ==>
-rwxrw----+ 1 moss 13811 Jun 24 19:02 ./arch.tex
-rwxrw----+ 1 moss 35714 Jun 24 19:02 ./background.tex
-rwxrw----+ 1 moss 6847 Jun 24 19:02 ./intro.tex
-rwxrw----+ 1 moss 9124 Jun 24 19:03 ./progress.tex
-rwxrw----+ 1 moss 13703 Jun 24 19:03 ./proposal.tex
-rwxrw----+ 1 moss 12836 Jun 24 19:02 ./proposed.tex
-rwxrw----+ 1 moss 6541 Jun 24 19:02 ./timeline.tex
ls -lGd . old ==>
drwxrwx---+ 1 moss 0 Jun 24 21:32 .
drwxrwx---+ 1 moss 0 Jun 24 21:32 old
> Any reason why you chose --to-file option for your old directory rather than the more conventional --from-file option?

Not really. --from-file gives the same error. Near as I can tell it is always failing
when --to-file/--from-file is a directory and there is a list of more than one file.
> If you could check whether the issue appeared in 3.11 and worked okay in 3.10 or point to the failing version that would 
> be useful.

Ok, I'll try older versions of the diff package and try to narrow when the behavior changed.
Thanks! Eliot


More information about the Cygwin mailing list

AltStyle によって変換されたページ (->オリジナル) /