style: add .editorconfig for code formatting. see issu #25

This commit is contained in:
leo 2024-03-18 09:37:06 +08:00
parent a8eeea4f78
commit 18aaa0a143
225 changed files with 7781 additions and 3911 deletions

View file

@ -1,35 +1,42 @@
using System.Threading.Tasks;
namespace SourceGit.ViewModels {
public class FastForwardWithoutCheckout : Popup {
public Models.Branch Local {
namespace SourceGit.ViewModels
{
public class FastForwardWithoutCheckout : Popup
{
public Models.Branch Local
{
get;
private set;
}
public Models.Branch To {
public Models.Branch To
{
get;
private set;
}
public FastForwardWithoutCheckout(Repository repo, Models.Branch local, Models.Branch upstream) {
public FastForwardWithoutCheckout(Repository repo, Models.Branch local, Models.Branch upstream)
{
_repo = repo;
Local = local;
To = upstream;
View = new Views.FastForwardWithoutCheckout() { DataContext = this };
}
public override Task<bool> Sure() {
public override Task<bool> Sure()
{
_repo.SetWatcherEnabled(false);
ProgressDescription = "Fast-Forward ...";
return Task.Run(() => {
return Task.Run(() =>
{
new Commands.Fetch(_repo.FullPath, To.Remote, Local.Name, To.Name, SetProgressDescription).Exec();
CallUIThread(() => _repo.SetWatcherEnabled(true));
return true;
});
}
private Repository _repo = null;
private readonly Repository _repo = null;
}
}
}