mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +00:00
enhance: only write MERGE_MSG when commit message is not null
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
5199fb2b74
commit
8dd0274bdd
1 changed files with 5 additions and 5 deletions
|
@ -446,7 +446,7 @@ namespace SourceGit.ViewModels
|
|||
Task.Run(() =>
|
||||
{
|
||||
var mergeMsgFile = Path.Combine(_repo.GitDir, "MERGE_MSG");
|
||||
if (File.Exists(mergeMsgFile))
|
||||
if (File.Exists(mergeMsgFile) && !string.IsNullOrWhiteSpace(_commitMessage))
|
||||
File.WriteAllText(mergeMsgFile, _commitMessage);
|
||||
|
||||
var succ = _inProgressContext.Continue();
|
||||
|
@ -729,8 +729,8 @@ namespace SourceGit.ViewModels
|
|||
byParentFolder.IsVisible = !isRooted;
|
||||
byParentFolder.Click += (_, e) =>
|
||||
{
|
||||
var path = Path.GetDirectoryName(change.Path).Replace("\\", "/");
|
||||
Commands.GitIgnore.Add(_repo.FullPath, path + "/");
|
||||
var dir = Path.GetDirectoryName(change.Path).Replace("\\", "/");
|
||||
Commands.GitIgnore.Add(_repo.FullPath, dir + "/");
|
||||
e.Handled = true;
|
||||
};
|
||||
addToIgnore.Items.Add(byParentFolder);
|
||||
|
@ -751,8 +751,8 @@ namespace SourceGit.ViewModels
|
|||
byExtensionInSameFolder.IsVisible = !isRooted;
|
||||
byExtensionInSameFolder.Click += (_, e) =>
|
||||
{
|
||||
var path = Path.GetDirectoryName(change.Path).Replace("\\", "/");
|
||||
Commands.GitIgnore.Add(_repo.FullPath, path + "/*" + extension);
|
||||
var dir = Path.GetDirectoryName(change.Path).Replace("\\", "/");
|
||||
Commands.GitIgnore.Add(_repo.FullPath, dir + "/*" + extension);
|
||||
e.Handled = true;
|
||||
};
|
||||
addToIgnore.Items.Add(byExtensionInSameFolder);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue