Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15403294
D18678.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D18678.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
@@ -497,6 +497,10 @@
return null;
}
+ if (!strlen($branch)) {
+ return null;
+ }
+
return $branch;
}
@@ -509,7 +513,7 @@
// Verify this, and strip it.
$ref = rtrim($stdout);
$branch = $this->getBranchNameFromRef($ref);
- if (!$branch) {
+ if ($branch === null) {
throw new Exception(
pht('Failed to parse %s output!', 'git symbolic-ref'));
}
@@ -1015,7 +1019,7 @@
list($ref, $hash, $epoch, $tree, $desc, $text) = $fields;
$branch = $this->getBranchNameFromRef($ref);
- if ($branch) {
+ if ($branch !== null) {
$result[] = array(
'current' => ($branch === $current),
'name' => $branch,
diff --git a/src/workflow/ArcanistLandWorkflow.php b/src/workflow/ArcanistLandWorkflow.php
--- a/src/workflow/ArcanistLandWorkflow.php
+++ b/src/workflow/ArcanistLandWorkflow.php
@@ -444,7 +444,7 @@
$branch = $this->getArgument('branch');
if (empty($branch)) {
$branch = $this->getBranchOrBookmark();
- if ($branch) {
+ if ($branch !== null) {
$this->branchType = $this->getBranchType($branch);
// TODO: This message is misleading when landing a detached head or
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 19, 2:39 AM (1 d, 22 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7709282
Default Alt Text
D18678.diff (1 KB)
Attached To
Mode
D18678: Fix parsing of Git branches with common and useful name "0"
Attached
Detach File
Event Timeline
Log In to Comment