enhance: do NOT create sub-nodes for detached HEAD

This commit is contained in:
leo 2024-09-18 16:02:38 +08:00
parent 69b39dac6c
commit bbd4012bc5
No known key found for this signature in database

View file

@ -120,7 +120,7 @@ namespace SourceGit.ViewModels
private void MakeBranchNode(Models.Branch branch, List<BranchTreeNode> roots, Dictionary<string, BranchTreeNode> folders, string prefix, bool isFiltered, bool bForceExpanded)
{
var sepIdx = branch.Name.IndexOf('/', StringComparison.Ordinal);
if (sepIdx == -1)
if (sepIdx == -1 || branch.IsDetachedHead)
{
roots.Add(new BranchTreeNode()
{