1
0
Fork 0

removing --ignore-whitespace --whitespace=fix from git apply

Now patches are applies as they are with whatever white space changes
they contain.

fixes #147
This commit is contained in:
Christian Kühnel 2020-04-17 16:33:26 +02:00
parent 140d9f6f59
commit 7b90806189

View file

@ -218,7 +218,7 @@ class ApplyPatch:
print('Applying diff {} for revision {}...'.format(diff_id, diff_to_str(revision_id)))
# TODO: print diff or URL to it
diff = try_call(lambda: self.phab.differential.getrawdiff(diffID=str(diff_id)).response)
proc = subprocess.run('git apply --ignore-whitespace --whitespace=fix -', input=diff, shell=True, text=True,
proc = subprocess.run('git apply -', input=diff, shell=True, text=True,
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
if proc.returncode != 0:
raise Exception('Applying patch failed:\n{}'.format(proc.stdout + proc.stderr))