From c5ad4b837da6a545fb3724bf7a795c1d3177fe95 Mon Sep 17 00:00:00 2001 From: leo Date: Fri, 20 Jun 2025 09:19:21 +0800 Subject: [PATCH] feature: auto-follow HEAD when bisecting (#1438) Signed-off-by: leo --- src/ViewModels/Repository.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ViewModels/Repository.cs b/src/ViewModels/Repository.cs index d3d121bb..69a9b7ea 100644 --- a/src/ViewModels/Repository.cs +++ b/src/ViewModels/Repository.cs @@ -1090,6 +1090,7 @@ namespace SourceGit.ViewModels var succ = new Commands.Bisect(_fullpath, subcmd).Use(log).Exec(); log.Complete(); + var head = new Commands.QueryRevisionByRefName(_fullpath, "HEAD").Result(); Dispatcher.UIThread.Invoke(() => { if (!succ) @@ -1098,6 +1099,7 @@ namespace SourceGit.ViewModels App.SendNotification(_fullpath, log.Content.Substring(log.Content.IndexOf('\n')).Trim()); MarkBranchesDirtyManually(); + NavigateToCommit(head, true); SetWatcherEnabled(true); IsBisectCommandRunning = false; });