feature: use MERGE_MSG as default commit message while merging (#88)

This commit is contained in:
leo 2024-04-26 21:05:00 +08:00
parent ea1d0bf6a2
commit 86c89e0c33

View file

@ -274,6 +274,14 @@ namespace SourceGit.ViewModels
SelectedStagedTreeNode = null;
SetDetail(null, false);
}
// Try to load merge message from MERGE_MSG
if (string.IsNullOrEmpty(_commitMessage))
{
var mergeMsgFile = Path.Combine(_repo.GitDir, "MERGE_MSG");
if (File.Exists(mergeMsgFile))
CommitMessage = File.ReadAllText(mergeMsgFile);
}
});
return hasConflict;