From: epriestley Date: Fri, 18 Dec 2015 00:16:05 +0000 (-0800) Subject: Use "--whitespace nowarn" in `arc patch` to respect trailing whitespace X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=8762e3f36715875605a205326bee7bae1f7eb481;p=arcanist.git Use "--whitespace nowarn" in `arc patch` to respect trailing whitespace Summary: Fixes T10008. Git tries to fix some issues by default (apparently? empirically; not consistent with documentation, I think?), but patches from `arc patch` are "always" accurate (disregarding other bugs we might have -- basically, they haven't been emailed or copy/pasted or anything like that) so we can just tell it to apply the patch exactly as-is. Test Plan: {F1029182} Reviewers: chad, joshuaspence Reviewed By: chad, joshuaspence Maniphest Tasks: T10008 Differential Revision: https://secure.phabricator.com/D14816 --- diff --git a/src/workflow/ArcanistPatchWorkflow.php b/src/workflow/ArcanistPatchWorkflow.php index 7dd62cf2..e7c6760d 100644 --- a/src/workflow/ArcanistPatchWorkflow.php +++ b/src/workflow/ArcanistPatchWorkflow.php @@ -691,7 +691,7 @@ EOTEXT Filesystem::writeFile($patchfile, $bundle->toGitPatch()); $passthru = new PhutilExecPassthru( - 'git apply --index --reject -- %s', + 'git apply --whitespace nowarn --index --reject -- %s', $patchfile); $passthru->setCWD($repository_api->getPath()); $err = $passthru->execute();