]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Make the rule for applying git diff less restrict
authorjungejason <jun.ge.jason@fb.com>
Fri, 6 May 2011 00:07:39 +0000 (17:07 -0700)
committerjungejason <jun.ge.jason@fb.com>
Fri, 6 May 2011 03:33:23 +0000 (20:33 -0700)
Summary:
the current command to apply a git diff is 'git apply --index',
which will fail the whole patch and does not touch the working tree when
some of the hunks do not apply. We want to allow the user to patch the
ones which apply.

Test Plan:
run 'arc apply' against a diff whcih partially applies and
verify that the hunks which apply are applied, and .rej files are
generated for the rest.

Reviewed By: simpkins
Reviewers: simpkins, epriestley
Commenters: ju
CC: aran, slawekbiel, simpkins, ju
Differential Revision: 235

src/workflow/patch/ArcanistPatchWorkflow.php

index b9926f55a6efd42ccdb320f4f78cdf77b423be6c..f6ffa6f3efa8f81b2bd7d7ca70e54f12b3dbdb7e 100644 (file)
@@ -368,7 +368,7 @@ EOTEXT
       return $patch_err;
     } else {
       $future = new ExecFuture(
-        '(cd %s; git apply --index)',
+        '(cd %s; git apply --index --reject)',
         $repository_api->getPath());
       $future->write($bundle->toGitPatch());
       $future->resolvex();