Changeset View
Changeset View
Standalone View
Standalone View
src/repository/api/ArcanistGitAPI.php
Show First 20 Lines • Show All 594 Lines • ▼ Show 20 Lines | list($stdout) = $this->execxLocal( | ||||
'rev-parse %s', | 'rev-parse %s', | ||||
$this->getBaseCommit()); | $this->getBaseCommit()); | ||||
return rtrim($stdout, "\n"); | return rtrim($stdout, "\n"); | ||||
} | } | ||||
public function getCanonicalRevisionName($string) { | public function getCanonicalRevisionName($string) { | ||||
$match = null; | $match = null; | ||||
if (preg_match('/@([0-9]+)$/', $string, $match)) { | if ($string !== null && preg_match('/@([0-9]+)$/', $string, $match)) { | ||||
$stdout = $this->getHashFromFromSVNRevisionNumber($match[1]); | $stdout = $this->getHashFromFromSVNRevisionNumber($match[1]); | ||||
} else { | } else { | ||||
list($stdout) = $this->execxLocal( | list($stdout) = $this->execxLocal( | ||||
'show -s --format=%s %s --', | 'show -s --format=%s %s --', | ||||
'%H', | '%H', | ||||
$string); | $string); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,214 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0