mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-26 00:32:41 +01:00
Ignore detached git branches.
Summary: Fixes T4559. It looks like the code currently (at least partially) handles this by checking for `(no branch)`. I suspect that the behaviour of `git` has changed (I am running version 1.9.0) because I haven't figured out what state to be in to cause `git` to output `(no branch)`. Test Plan: Ran `arc branch` when on a detached branch. Reviewers: #blessed_reviewers, epriestley CC: Korvin, epriestley, aran Maniphest Tasks: T4559 Differential Revision: https://secure.phabricator.com/D8466
This commit is contained in:
parent
a90a72c648
commit
a2706f6539
1 changed files with 1 additions and 1 deletions
|
@ -764,7 +764,7 @@ final class ArcanistGitAPI extends ArcanistRepositoryAPI {
|
||||||
$result = array();
|
$result = array();
|
||||||
foreach ($lines as $line) {
|
foreach ($lines as $line) {
|
||||||
|
|
||||||
if (preg_match('/^[* ]+\(no branch\)/', $line)) {
|
if (preg_match('@^[* ]+\(no branch|detached from \w+/\w+\)@', $line)) {
|
||||||
// This is indicating that the working copy is in a detached state;
|
// This is indicating that the working copy is in a detached state;
|
||||||
// just ignore it.
|
// just ignore it.
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue