Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14402802
D13983.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
680 B
Referenced Files
None
Subscribers
None
D13983.diff
View Options
diff --git a/src/repository/api/ArcanistGitAPI.php b/src/repository/api/ArcanistGitAPI.php
--- a/src/repository/api/ArcanistGitAPI.php
+++ b/src/repository/api/ArcanistGitAPI.php
@@ -501,14 +501,14 @@
}
public function getRemoteURI() {
- list($stdout) = $this->execxLocal('remote show -n origin');
+ list($stdout) = $this->execxLocal('ls-remote --get-url origin');
- $matches = null;
- if (preg_match('/^\s*Fetch URL: (.*)$/m', $stdout, $matches)) {
- return trim($matches[1]);
+ $uri = rtrim($stdout);
+ if ($uri === 'origin') {
+ return null;
}
- return null;
+ return $uri;
}
public function getSourceControlPath() {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 24, 1:02 AM (14 h, 20 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6922557
Default Alt Text
D13983.diff (680 B)
Attached To
Mode
D13983: Avoid parsing git "remote show" using "ls-remote"
Attached
Detach File
Event Timeline
Log In to Comment