refactor: query branch head after operation finished to avoid branch head mismatch

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-05-23 09:40:15 +08:00
parent 9fb8af51ff
commit c112549b69
No known key found for this signature in database
5 changed files with 25 additions and 17 deletions

View file

@ -64,9 +64,10 @@ namespace SourceGit.ViewModels
new Commands.Merge(_repo.FullPath, _sourceName, Mode.Arg).Use(log).Exec();
log.Complete();
var head = new Commands.QueryRevisionByRefName(_repo.FullPath, "HEAD").Result();
CallUIThread(() =>
{
_repo.NavigateToBranchDelayed(_repo.CurrentBranch?.FullName);
_repo.NavigateToCommitDelayed(head);
_repo.SetWatcherEnabled(true);
});
return true;