diff --git a/src/Commands/QueryBranches.cs b/src/Commands/QueryBranches.cs index d8ed808a..5f9d31a8 100644 --- a/src/Commands/QueryBranches.cs +++ b/src/Commands/QueryBranches.cs @@ -7,7 +7,8 @@ namespace SourceGit.Commands { private const string PREFIX_LOCAL = "refs/heads/"; private const string PREFIX_REMOTE = "refs/remotes/"; - private const string PREFIX_DETACHED = "(HEAD detached at"; + private const string PREFIX_DETACHED_AT = "(HEAD detached at"; + private const string PREFIX_DETACHED_FROM = "(HEAD detached from"; public QueryBranches(string repo) { @@ -37,7 +38,7 @@ namespace SourceGit.Commands if (refName.EndsWith("/HEAD", StringComparison.Ordinal)) return; - if (refName.StartsWith(PREFIX_DETACHED, StringComparison.Ordinal)) + if (refName.StartsWith(PREFIX_DETACHED_AT, StringComparison.Ordinal) || refName.StartsWith(PREFIX_DETACHED_FROM, StringComparison.Ordinal)) { branch.IsDetachedHead = true; }