From f3ee0448185dc833d2c8f07669296e2b693743c1 Mon Sep 17 00:00:00 2001 From: leo Date: Fri, 25 Sep 2020 11:15:04 +0800 Subject: [PATCH] fix: ignore all other branches merged into the last commit. --- src/Helpers/CommitGraph.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Helpers/CommitGraph.cs b/src/Helpers/CommitGraph.cs index e2294cab..c2f6f85d 100644 --- a/src/Helpers/CommitGraph.cs +++ b/src/Helpers/CommitGraph.cs @@ -259,7 +259,11 @@ namespace SourceGit.Helpers { // 处理尚未终结的线 for (int i = 0; i < unsolved.Count; i++) { var path = unsolved[i]; - path.AddPoint((i + 0.5) * UNIT_WIDTH, (commits.Count - 0.5) * UNIT_HEIGHT, true); + var endY = (commits.Count - 0.5) * UNIT_HEIGHT; + + if (path.Points.Count == 1 && path.Points[0].Y == endY) continue; + + path.AddPoint((i + 0.5) * UNIT_WIDTH, endY, true); maker.Lines.Add(path); } unsolved.Clear();