1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-25 08:12:40 +01:00

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
This commit is contained in:
jungejason 2011-05-05 17:07:39 -07:00
parent 64ecf63680
commit 8f59aff31a

View 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();