mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-21 05:10:25 +08:00
enhance: auto-select the new HEAD after reword (#2236)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user