[Bug 254455] BSD diff(1) compares same files and dirs

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Mar 21 09:31:47 UTC 2021


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254455

            Bug ID: 254455
           Summary: BSD diff(1) compares same files and dirs
           Product: Base System
           Version: 12.2-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: bugs at FreeBSD.org
          Reporter: mail at fbsd2.e4m.org

Created attachment 223468
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=223468&action=edit
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 ;-).

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list