Add the GNU diff tool implementation.
Review Request #12600 — Created Sept. 14, 2022 and submitted
This introduces the first diff tool,
GNUDiffTool
. This wraps around
GNU Diff, properly checking search paths, building the correct command
line, and interpreting results.If there are multiple
diff
executables found in the path, this will
end up checking each until it finds GNU Diff or exhausts all options.The implementation handles all documented GNU Diff exit codes, providing
text vs. binary flags in the result (handling old legacy binary file
indicators) and all diff output.This will be a step up from a lot of the GNU diff executions we
currently have in the codebase, and will let us remove a lot of
different forms of error handling, binary file support, and execute name
determination.
Unit tests passed.
Tested this with some in-progress changes to switch SCMClients over. They
successfully ran GNU Diff and handled the results.
- Bugs:
-
- Depends On:
- Change Summary:
-
- Added a missing
Version Added
. - Updated for new requirements in the base tool support.
- Updated to handle binary diffs when there's an exit code of 1 (documentation says it'll happen with exit code 2, but that's not happening locally).
- Added a missing
- Commits:
-
Summary ID 3b9cb6438fa355c3431a2fe0d38209ef549112ad b46242c3c7161b42c0232a5ab1476461454ae9b1