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
self.set_filename(line[6:].rstrip())\r
if line.startswith('@@ '):\r
self.state = PATCH\r
+ self.binary = False\r
+ elif line.startswith('GIT binary patch'):\r
+ self.state = PATCH\r
+ self.binary = True\r
else:\r
ok = False\r
for pfx in self.pre_patch_prefixes:\r
self.format_error("didn't find diff hunk marker (@@)")\r
self.line_num += 1\r
elif self.state == PATCH:\r
+ if self.binary:\r
+ pass\r
if line.startswith('-'):\r
pass\r
elif line.startswith('+'):\r