mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-20 19:55:00 +00:00
Making local detached branch HEAD as the first item below folders
This commit is contained in:
parent
4750ad0d07
commit
b0c00340a8
3 changed files with 21 additions and 7 deletions
|
@ -51,7 +51,12 @@ namespace SourceGit.Commands
|
|||
var refName = parts[0];
|
||||
if (refName.EndsWith("/HEAD", StringComparison.Ordinal))
|
||||
return;
|
||||
|
||||
|
||||
if (refName.StartsWith("(HEAD detached at"))
|
||||
{
|
||||
branch.isHead = true;
|
||||
}
|
||||
|
||||
if (refName.StartsWith(PREFIX_LOCAL, StringComparison.Ordinal))
|
||||
{
|
||||
branch.Name = refName.Substring(PREFIX_LOCAL.Length);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue