diff3
Developer(s) | AT&T Bell Laboratories |
---|---|
Initial release | January 1979 |
Operating system | Unix and Unix-like |
Type | Command |
diff3 is a Unix utility to compare three files and show any differences among them. diff3 can also merge files, implementing a three-way merge.
History and implementations
This section is missing information about algorithm and similarity to diff.(June 2020) |
diff3
originally appeared in Version 7 Unix of 1979. A very similar version was found in Berkeley Software Distribution (BSD) and was inherited into OpenBSD and probably Solaris.[1][2]
On most modern Unix-like systems, even BSD-derived ones like FreeBSD and NetBSD, the diff3 provided is GNU's version in diffutils (formerly GNU Tools). This version has the ability to merge files on its own without relying on ed
. It internally invokes diff
to do the comparison, but can use any other compatible tool too.[3]
"Diff3" has also become a generic name for the three-way-merge algorithm, specifically one based on reconciling two different diffs stemming from the first source.
References
See also
- diff
External links
- A formal investigation of Diff3
- GNU diffutils manual, "Comparing Three Files" and "Merging from a common ancestor"