File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,8 @@ public class QueryBranches : Command
7
7
{
8
8
private const string PREFIX_LOCAL = "refs/heads/" ;
9
9
private const string PREFIX_REMOTE = "refs/remotes/" ;
10
- private const string PREFIX_DETACHED = "(HEAD detached at" ;
10
+ private const string PREFIX_DETACHED_AT = "(HEAD detached at" ;
11
+ private const string PREFIX_DETACHED_FROM = "(HEAD detached from" ;
11
12
12
13
public QueryBranches ( string repo )
13
14
{
@@ -37,7 +38,7 @@ protected override void OnReadline(string line)
37
38
if ( refName . EndsWith ( "/HEAD" , StringComparison . Ordinal ) )
38
39
return ;
39
40
40
- if ( refName . StartsWith ( PREFIX_DETACHED , StringComparison . Ordinal ) )
41
+ if ( refName . StartsWith ( PREFIX_DETACHED_AT , StringComparison . Ordinal ) || refName . StartsWith ( PREFIX_DETACHED_FROM , StringComparison . Ordinal ) )
41
42
{
42
43
branch . IsDetachedHead = true ;
43
44
}
You can’t perform that action at this time.
0 commit comments