Changeset View
Changeset View
Standalone View
Standalone View
src/land/ArcanistGitLandEngine.php
Show First 20 Lines • Show All 142 Lines • ▼ Show 20 Lines | private function updateWorkingCopy() { | ||||
$api->execxLocal( | $api->execxLocal( | ||||
'checkout %s --', | 'checkout %s --', | ||||
$this->getTargetFullRef()); | $this->getTargetFullRef()); | ||||
list($original_author, $original_date) = $this->getAuthorAndDate($source); | list($original_author, $original_date) = $this->getAuthorAndDate($source); | ||||
try { | try { | ||||
if ($this->getShouldSquash()) { | if ($this->getShouldSquash()) { | ||||
// NOTE: We're explicitly specifying "--ff" to override the presence | |||||
// of "merge.ff" options in user configuration. | |||||
$api->execxLocal( | $api->execxLocal( | ||||
'merge --no-stat --no-commit --squash -- %s', | 'merge --no-stat --no-commit --ff --squash -- %s', | ||||
$source); | $source); | ||||
} else { | } else { | ||||
$api->execxLocal( | $api->execxLocal( | ||||
'merge --no-stat --no-commit --no-ff -- %s', | 'merge --no-stat --no-commit --no-ff -- %s', | ||||
$source); | $source); | ||||
} | } | ||||
} catch (Exception $ex) { | } catch (Exception $ex) { | ||||
$api->execManualLocal('merge --abort'); | $api->execManualLocal('merge --abort'); | ||||
Show All 34 Lines | final class ArcanistGitLandEngine | ||||
private function pushChange() { | private function pushChange() { | ||||
$api = $this->getRepositoryAPI(); | $api = $this->getRepositoryAPI(); | ||||
$this->writeInfo( | $this->writeInfo( | ||||
pht('PUSHING'), | pht('PUSHING'), | ||||
pht('Pushing changes to "%s".', $this->getTargetFullRef())); | pht('Pushing changes to "%s".', $this->getTargetFullRef())); | ||||
list($err) = $api->execPassthru( | $err = $api->execPassthru( | ||||
'push -- %s %s:%s', | 'push -- %s %s:%s', | ||||
$this->getTargetRemote(), | $this->getTargetRemote(), | ||||
$this->mergedRef, | $this->mergedRef, | ||||
$this->getTargetOnto()); | $this->getTargetOnto()); | ||||
if ($err) { | if ($err) { | ||||
throw new ArcanistUsageException( | throw new ArcanistUsageException( | ||||
pht( | pht( | ||||
▲ Show 20 Lines • Show All 318 Lines • Show Last 20 Lines |