enhance: clear commit message before merging/cherry-picking/rebasing/reverting to allow SourceGit read it from git (#1414)

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo
2025-06-12 10:34:22 +08:00
parent 7de5991ecb
commit 7e2f3bec8c
11 changed files with 30 additions and 17 deletions

View File

@@ -925,24 +925,23 @@ namespace SourceGit.ViewModels
_lastFetchTime = DateTime.Now;
}
public void NavigateToCommit(string sha)
public void NavigateToCommit(string sha, bool isDelayMode = false)
{
if (_histories != null)
if (isDelayMode)
{
_navigateToCommitDelayed = sha;
}
else if (_histories != null)
{
SelectedViewIndex = 0;
_histories.NavigateTo(sha);
}
}
public void NavigateToCommitDelayed(string sha)
public void ClearCommitMessage()
{
_navigateToCommitDelayed = sha;
}
public void NavigateToCurrentHead()
{
if (_currentBranch != null)
NavigateToCommit(_currentBranch.Head);
if (_workingCopy is not null)
_workingCopy.CommitMessage = string.Empty;
}
public void ClearHistoriesFilter()