optimize<Watcher>: do NOT listen changed event on .git/*_HEAD

This commit is contained in:
leo 2021-05-31 10:54:56 +08:00
parent 259473626b
commit 13ab3d1eae

View file

@ -175,7 +175,6 @@ namespace SourceGit.Models {
} else if (e.Name.StartsWith("refs\\stash", StringComparison.Ordinal)) {
updateStashes = DateTime.Now.AddSeconds(.5).ToFileTime();
} else if (e.Name.Equals("HEAD", StringComparison.Ordinal) ||
e.Name.EndsWith("_HEAD", StringComparison.Ordinal) ||
e.Name.StartsWith("refs\\heads\\", StringComparison.Ordinal) ||
e.Name.StartsWith("refs\\remotes\\", StringComparison.Ordinal)) {
updateBranch = DateTime.Now.AddSeconds(.5).ToFileTime();