mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-26 20:00:59 +08:00
feature: support --signoff for git commit command (#591)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
@@ -60,6 +60,12 @@ namespace SourceGit.ViewModels
|
||||
set => SetProperty(ref _httpProxy, value);
|
||||
}
|
||||
|
||||
public bool EnableSignOffForCommit
|
||||
{
|
||||
get => _repo.Settings.EnableSignOffForCommit;
|
||||
set => _repo.Settings.EnableSignOffForCommit = value;
|
||||
}
|
||||
|
||||
public bool EnableAutoFetch
|
||||
{
|
||||
get => _repo.Settings.EnableAutoFetch;
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace SourceGit.ViewModels
|
||||
|
||||
return Task.Run(() =>
|
||||
{
|
||||
var succ = new Commands.Commit(_repo.FullPath, _message, true).Exec();
|
||||
var succ = new Commands.Commit(_repo.FullPath, _message, true, _repo.Settings.EnableSignOffForCommit).Run();
|
||||
CallUIThread(() => _repo.SetWatcherEnabled(true));
|
||||
return succ;
|
||||
});
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace SourceGit.ViewModels
|
||||
{
|
||||
var succ = new Commands.Reset(_repo.FullPath, Target.SHA, "--soft").Exec();
|
||||
if (succ)
|
||||
succ = new Commands.Commit(_repo.FullPath, _message, true).Exec();
|
||||
succ = new Commands.Commit(_repo.FullPath, _message, true, _repo.Settings.EnableSignOffForCommit).Run();
|
||||
CallUIThread(() => _repo.SetWatcherEnabled(true));
|
||||
return succ;
|
||||
});
|
||||
|
||||
@@ -1311,7 +1311,7 @@ namespace SourceGit.ViewModels
|
||||
succ = new Commands.Add(_repo.FullPath, _repo.IncludeUntracked).Exec();
|
||||
|
||||
if (succ)
|
||||
succ = new Commands.Commit(_repo.FullPath, _commitMessage, _useAmend).Exec();
|
||||
succ = new Commands.Commit(_repo.FullPath, _commitMessage, _useAmend, _repo.Settings.EnableSignOffForCommit).Run();
|
||||
|
||||
Dispatcher.UIThread.Post(() =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user