Ignore whitespace when working with patches.

pull/50/head
Yuhui Zheng 5 years ago
parent 8156f64d1c
commit 211bb4cbd9

@ -16,7 +16,7 @@ def patch():
failed_patches = []
for tmpfile in glob(os.path.join(PATCHES_DIR, "*.patch")):
print("patch", tmpfile)
result = subprocess.run(["git", "apply", tmpfile],
result = subprocess.run(["git", "apply", "--ignore-whitespace", tmpfile],
cwd=os.path.join("..", "..", ".."))
if result.returncode:
failed_patches.append(tmpfile)

@ -36,7 +36,7 @@ except FileNotFoundError:
sys.exit(0)
for tmpfile in glob(os.path.join(PATCHES_DIR, "*.patch")):
print("unpatch", tmpfile)
result = subprocess.run(["git", "apply", "-R", tmpfile],
result = subprocess.run(["git", "apply", "-R", "--ignore-whitespace", tmpfile],
cwd=os.path.join("..", "..", ".."))
if result.returncode:
print("Unpatching failed: {}".format(tmpfile))

Loading…
Cancel
Save