From: jungejason Date: Fri, 6 May 2011 00:07:39 +0000 (-0700) Subject: Make the rule for applying git diff less restrict X-Git-Tag: conduit-4~346 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=8f59aff31a612f9d11599378e7ad5e48b354225e;p=arcanist.git Make the rule for applying git diff less restrict 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 --- diff --git a/src/workflow/patch/ArcanistPatchWorkflow.php b/src/workflow/patch/ArcanistPatchWorkflow.php index b9926f55..f6ffa6f3 100644 --- a/src/workflow/patch/ArcanistPatchWorkflow.php +++ b/src/workflow/patch/ArcanistPatchWorkflow.php @@ -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();