Add the GNU diff tool implementation.
Review Request #12600 — Created Sept. 14, 2022 and submitted
Information | |
---|---|
chipx86 | |
RBTools | |
release-4.x | |
|
|
12601 | |
Reviewers | |
rbtools | |
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.
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).
Commits: |
|
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+1242) |