From 8f59aff31a612f9d11599378e7ad5e48b354225e Mon Sep 17 00:00:00 2001 From: jungejason Date: Thu, 5 May 2011 17:07:39 -0700 Subject: [PATCH] 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 --- src/workflow/patch/ArcanistPatchWorkflow.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();