Test Plan: None.
Reviewers: epriestley
Reviewed By: epriestley
CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D4717
if ($err) {
echo phutil_console_format("<bg:red>** PUSH FAILED! **</bg>\n");
+ if ($this->isGit) {
+ $repository_api->execxLocal('reset --hard HEAD^');
+ $this->restoreBranch();
+ throw new ArcanistUsageException(
+ "'{$cmd}' failed! Fix the error and run 'arc land' again.");
+ }
throw new ArcanistUsageException(
"'{$cmd}' failed! Fix the error and push this change manually.");
}