fix: local changes do not updated after submodule changed (#339)

This commit is contained in:
leo 2024-08-09 14:34:19 +08:00
parent d37f53a4f3
commit ce7420354d
No known key found for this signature in database

View file

@ -182,6 +182,7 @@ namespace SourceGit.Models
if (name.StartsWith("modules", StringComparison.Ordinal) && name.EndsWith("HEAD", StringComparison.Ordinal)) if (name.StartsWith("modules", StringComparison.Ordinal) && name.EndsWith("HEAD", StringComparison.Ordinal))
{ {
_updateSubmodules = DateTime.Now.AddSeconds(1).ToFileTime(); _updateSubmodules = DateTime.Now.AddSeconds(1).ToFileTime();
_updateWC = DateTime.Now.AddSeconds(1).ToFileTime();
} }
else if (name.StartsWith("refs/tags", StringComparison.Ordinal)) else if (name.StartsWith("refs/tags", StringComparison.Ordinal))
{ {
@ -220,7 +221,7 @@ namespace SourceGit.Models
if (name.StartsWith(submodule, StringComparison.Ordinal)) if (name.StartsWith(submodule, StringComparison.Ordinal))
{ {
_updateSubmodules = DateTime.Now.AddSeconds(1).ToFileTime(); _updateSubmodules = DateTime.Now.AddSeconds(1).ToFileTime();
break; return;
} }
} }
} }