]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Use "--whitespace nowarn" in `arc patch` to respect trailing whitespace
authorepriestley <git@epriestley.com>
Fri, 18 Dec 2015 00:16:05 +0000 (16:16 -0800)
committerepriestley <git@epriestley.com>
Fri, 18 Dec 2015 01:36:26 +0000 (17:36 -0800)
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

src/workflow/ArcanistPatchWorkflow.php

index 7dd62cf2a2f4fee8b554c4911c95c9fcd27023ec..e7c6760d98a3ee4e15af38c9d4bf440dd3ee5b32 100644 (file)
@@ -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();