Skip to content

Commit e25e1f1

Browse files
committed
fix: avoid empty column when HEAD is filtered out
1 parent 7786d53 commit e25e1f1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Models/CommitGraph.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public static CommitGraph Parse(List<Commit> commits, bool firstParentOnlyEnable
110110

111111
// 2. Reserve leftmost column (offsetX) for HEAD path if not yet found
112112
var offsetX = 4 - halfWidth;
113-
if (alwaysShowCurrentHeadOnLeft && headPath == null)
113+
if (alwaysShowCurrentHeadOnLeft && headPath == null && headPathSHAs.Count > 0)
114114
offsetX += unitWidth;
115115

116116
// 3. Keep track of max offsetX used in previous rows for margin calculation

0 commit comments

Comments
 (0)