mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-23 05:05:00 +00:00
style: add .editorconfig for code formatting. see issu #25
This commit is contained in:
parent
a8eeea4f78
commit
18aaa0a143
225 changed files with 7781 additions and 3911 deletions
|
@ -1,40 +1,47 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SourceGit.ViewModels {
|
||||
public class Reword : Popup {
|
||||
public Models.Commit Head {
|
||||
namespace SourceGit.ViewModels
|
||||
{
|
||||
public class Reword : Popup
|
||||
{
|
||||
public Models.Commit Head
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
[Required(ErrorMessage = "Commit message is required!!!")]
|
||||
public string Message {
|
||||
public string Message
|
||||
{
|
||||
get => _message;
|
||||
set => SetProperty(ref _message, value, true);
|
||||
}
|
||||
|
||||
public Reword(Repository repo, Models.Commit head) {
|
||||
public Reword(Repository repo, Models.Commit head)
|
||||
{
|
||||
_repo = repo;
|
||||
Head = head;
|
||||
Message = head.FullMessage;
|
||||
View = new Views.Reword() { DataContext = this };
|
||||
}
|
||||
|
||||
public override Task<bool> Sure() {
|
||||
public override Task<bool> Sure()
|
||||
{
|
||||
if (_message == Head.FullMessage) return null;
|
||||
|
||||
_repo.SetWatcherEnabled(false);
|
||||
ProgressDescription = $"Editing head commit message ...";
|
||||
|
||||
return Task.Run(() => {
|
||||
return Task.Run(() =>
|
||||
{
|
||||
var succ = new Commands.Commit(_repo.FullPath, _message, true, true).Exec();
|
||||
CallUIThread(() => _repo.SetWatcherEnabled(true));
|
||||
return succ;
|
||||
});
|
||||
}
|
||||
|
||||
private Repository _repo = null;
|
||||
private readonly Repository _repo = null;
|
||||
private string _message = string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue