diff options
author | Jordan Justen <jordan.l.justen@intel.com> | 2015-12-03 08:18:00 +0000 |
---|---|---|
committer | jljusten <jljusten@Edk2> | 2015-12-03 08:18:00 +0000 |
commit | 103733f8e63b009b4f311e2df6bf32d5463082c7 (patch) | |
tree | d3fe5608a798df1653a691d16c7b38fe077510bc /BaseTools/Scripts | |
parent | 5d9cd24ede010b95b4e7ca891de1c9c10a0faa2e (diff) | |
download | edk2-103733f8e63b009b4f311e2df6bf32d5463082c7.zip edk2-103733f8e63b009b4f311e2df6bf32d5463082c7.tar.gz edk2-103733f8e63b009b4f311e2df6bf32d5463082c7.tar.bz2 |
BaseTools PatchCheck.py: Support binary diff
This allows a patch with binary data that is generated with --binary
to be parsed by the PatchCheck.py script.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19104 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Scripts')
-rwxr-xr-x | BaseTools/Scripts/PatchCheck.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py index 340a997..455c130 100755 --- a/BaseTools/Scripts/PatchCheck.py +++ b/BaseTools/Scripts/PatchCheck.py @@ -285,6 +285,10 @@ class GitDiffCheck: self.set_filename(line[6:].rstrip())
if line.startswith('@@ '):
self.state = PATCH
+ self.binary = False
+ elif line.startswith('GIT binary patch'):
+ self.state = PATCH
+ self.binary = True
else:
ok = False
for pfx in self.pre_patch_prefixes:
@@ -294,6 +298,8 @@ class GitDiffCheck: self.format_error("didn't find diff hunk marker (@@)")
self.line_num += 1
elif self.state == PATCH:
+ if self.binary:
+ pass
if line.startswith('-'):
pass
elif line.startswith('+'):
|