Changeset View
Changeset View
Standalone View
Standalone View
src/repository/api/ArcanistGitAPI.php
| Show First 20 Lines • Show All 495 Lines • ▼ Show 20 Lines | public function getBranchName() { | ||||
| if (preg_match('/^\* ([^\(].*)$/m', $stdout, $matches)) { | if (preg_match('/^\* ([^\(].*)$/m', $stdout, $matches)) { | ||||
| return $matches[1]; | return $matches[1]; | ||||
| } | } | ||||
| return null; | return null; | ||||
| } | } | ||||
| public function getRemoteURI() { | public function getRemoteURI() { | ||||
| list($stdout) = $this->execxLocal('remote show -n origin'); | list($stdout) = $this->execxLocal('ls-remote --get-url origin'); | ||||
| $matches = null; | $uri = rtrim($stdout); | ||||
| if (preg_match('/^\s*Fetch URL: (.*)$/m', $stdout, $matches)) { | if ($uri === 'origin') { | ||||
| return trim($matches[1]); | return null; | ||||
| } | } | ||||
| return null; | return $uri; | ||||
| } | } | ||||
| public function getSourceControlPath() { | public function getSourceControlPath() { | ||||
| // TODO: Try to get something useful here. | // TODO: Try to get something useful here. | ||||
| return null; | return null; | ||||
| } | } | ||||
| public function getGitCommitLog() { | public function getGitCommitLog() { | ||||
| ▲ Show 20 Lines • Show All 736 Lines • Show Last 20 Lines | |||||