Skip to content

Commit bbd4012

Browse files
committed
enhance: do NOT create sub-nodes for detached HEAD
1 parent 69b39da commit bbd4012

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ViewModels/BranchTreeNode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ private void CollectExpandedNodes(List<BranchTreeNode> nodes, string prefix)
120120
private void MakeBranchNode(Models.Branch branch, List<BranchTreeNode> roots, Dictionary<string, BranchTreeNode> folders, string prefix, bool isFiltered, bool bForceExpanded)
121121
{
122122
var sepIdx = branch.Name.IndexOf('/', StringComparison.Ordinal);
123-
if (sepIdx == -1)
123+
if (sepIdx == -1 || branch.IsDetachedHead)
124124
{
125125
roots.Add(new BranchTreeNode()
126126
{

0 commit comments

Comments
 (0)