Summary: | BSD diff(1) compares same files and dirs | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Andre Albsmeier <mail> | ||||
Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> | ||||
Status: | New --- | ||||||
Severity: | Affects Some People | CC: | emaste | ||||
Priority: | --- | ||||||
Version: | 12.2-STABLE | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Created attachment 223468 [details] patch I was wondering why a "diff -rq" on FreeBSD-12 (BSD diff) ran endlessly while on FreeBSD-11 (GNU diff) it terminated in 0.6 seconds. This is because BSD diff compares files and dirs even if they are the same. I checked what GNU diff does in this case and added the corresponding code to diffdir() and diffreg(). The style is probably considered bad ;-).