]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Scripts/PatchCheck.py
BaseTools PatchCheck.py: Support binary diff
[mirror_edk2.git] / BaseTools / Scripts / PatchCheck.py
index 340a9972b8382e00a42a229edb52efde7107913e..455c1309b6d3c785adff3378172933844ac23d1c 100755 (executable)
@@ -285,6 +285,10 @@ class GitDiffCheck:
                 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
@@ -294,6 +298,8 @@ class GitDiffCheck:
                     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