mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-22 05:40:43 +08:00
refactor: file-system watcher
- Use `System.Threading.Interlocked` to read/write data - Use `SourceGit.Models.Watcher.LockContext` to release watcher's lock - New way to detect file changes in submodules - Manually update stashes after `git stash` command complete (#1760) Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
@@ -43,7 +43,7 @@ namespace SourceGit.ViewModels
|
||||
|
||||
public override async Task<bool> Sure()
|
||||
{
|
||||
_repo.SetWatcherEnabled(false);
|
||||
using var lockWatcher = _repo.LockWatcher();
|
||||
ProgressDescription = "Apply patch...";
|
||||
|
||||
var log = _repo.CreateLog("Apply Patch");
|
||||
@@ -54,7 +54,6 @@ namespace SourceGit.ViewModels
|
||||
.ExecAsync();
|
||||
|
||||
log.Complete();
|
||||
_repo.SetWatcherEnabled(true);
|
||||
return succ;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user