enhance: auto-select the new HEAD after reword (#2236)

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo
2026-04-07 10:42:06 +08:00
parent 488e64d22d
commit 3bf2da28d0

View File

@@ -68,10 +68,19 @@ namespace SourceGit.ViewModels
.Use(log)
.RunAsync();
if (succ && needAutoStash)
await new Commands.Stash(_repo.FullPath)
.Use(log)
.PopAsync("stash@{0}");
if (succ)
{
if (needAutoStash)
await new Commands.Stash(_repo.FullPath)
.Use(log)
.PopAsync("stash@{0}");
if (_repo.SelectedViewIndex == 0)
{
var head = await new Commands.QueryRevisionByRefName(_repo.FullPath, "HEAD").GetResultAsync();
_repo.NavigateToCommit(head, true);
}
}
log.Complete();
return succ;