mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-10 08:52:39 +01:00
Set the CWD before applying a git patch
Summary: If in a subdirectory, any changes made in a different location is missed from the patch with no errors from git. The other option was to run some logic to compare the files being changed. Test Plan: Run arc patch from a subdirectory that would miss some files previously. Reviewers: epriestley Reviewed By: epriestley CC: Korvin, aran Maniphest Tasks: T3733 Differential Revision: https://secure.phabricator.com/D7167
This commit is contained in:
parent
08536d8917
commit
1ead3cc307
1 changed files with 4 additions and 2 deletions
|
@ -676,9 +676,11 @@ EOTEXT
|
|||
$patchfile = new TempFile();
|
||||
Filesystem::writeFile($patchfile, $bundle->toGitPatch());
|
||||
|
||||
$err = $repository_api->execPassthru(
|
||||
'apply --index --reject -- %s',
|
||||
$passthru = new PhutilExecPassthru(
|
||||
'git apply --index --reject -- %s',
|
||||
$patchfile);
|
||||
$passthru->setCWD($repository_api->getPath());
|
||||
$err = $passthru->execute();
|
||||
|
||||
if ($err) {
|
||||
echo phutil_console_format(
|
||||
|
|
Loading…
Reference in a new issue