Add Git binary file patching.

Review Request #14714 — Created Nov. 28, 2025 and updated

Information

RBTools
master

Reviewers

This change adds support to the GitPatcher for applying binary files
as part of changes. For git, this requires that we ask git apply to
exclude those particular files while applying, because otherwise it will
error out because there's no binary file data in the patch itself. We
then use the base patcher infrastructure for iterating through the
files, but provide overrides that can register adds, moves, and deletes
with git.

  • Ran unit tests.
  • Used rbt patch with a bunch of changes that did various file
    operations on binary files.
Summary ID
Add Git binary file patching.
This change adds support to the `GitPatcher` for applying binary files as part of changes. For git, this requires that we ask `git apply` to exclude those particular files while applying, because otherwise it will error out because there's no binary file data in the patch itself. We then use the base patcher infrastructure for iterating through the files, but provide overrides that can register adds, moves, and deletes with git. Testing Done: - Ran unit tests. - Used `rbt patch` with a bunch of changes that did various file operations on binary files.
otvzyzqqpkzmkpnlkkwoyumrmozrlxol
Description From Last Updated

line too long (89 > 79 characters) Column: 80 Error code: E501

reviewbotreviewbot

line too long (89 > 79 characters) Column: 80 Error code: E501

reviewbotreviewbot

line too long (89 > 79 characters) Column: 80 Error code: E501

reviewbotreviewbot

line too long (89 > 79 characters) Column: 80 Error code: E501

reviewbotreviewbot

line too long (89 > 79 characters) Column: 80 Error code: E501

reviewbotreviewbot
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

david
Review request changed
Commits:
Summary ID
Add Git binary file patching.
This change adds support to the `GitPatcher` for applying binary files as part of changes. For git, this requires that we ask `git apply` to exclude those particular files while applying, because otherwise it will error out because there's no binary file data in the patch itself. We then use the base patcher infrastructure for iterating through the files, but provide overrides that can register adds, moves, and deletes with git. Testing Done: - Ran unit tests. - Used `rbt patch` with a bunch of changes that did various file operations on binary files.
otvzyzqqpkzmkpnlkkwoyumrmozrlxol
Add Git binary file patching.
This change adds support to the `GitPatcher` for applying binary files as part of changes. For git, this requires that we ask `git apply` to exclude those particular files while applying, because otherwise it will error out because there's no binary file data in the patch itself. We then use the base patcher infrastructure for iterating through the files, but provide overrides that can register adds, moves, and deletes with git. Testing Done: - Ran unit tests. - Used `rbt patch` with a bunch of changes that did various file operations on binary files.
otvzyzqqpkzmkpnlkkwoyumrmozrlxol

Checks run (2 succeeded)

flake8 passed.
JSHint passed.