mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
enhance: only when the repository has submodules will the submodule information be updated at the same time after the branch information changes
This commit is contained in:
parent
e2da0d3643
commit
f59af0afcf
1 changed files with 6 additions and 1 deletions
|
@ -198,8 +198,13 @@ namespace SourceGit.Models
|
|||
(name.StartsWith("worktrees/", StringComparison.Ordinal) && name.EndsWith("/HEAD", StringComparison.Ordinal)))
|
||||
{
|
||||
_updateBranch = DateTime.Now.AddSeconds(.5).ToFileTime();
|
||||
|
||||
lock (_submodules)
|
||||
{
|
||||
if (_submodules.Count > 0)
|
||||
_updateSubmodules = DateTime.Now.AddSeconds(1).ToFileTime();
|
||||
}
|
||||
}
|
||||
else if (name.StartsWith("objects/", StringComparison.Ordinal) || name.Equals("index", StringComparison.Ordinal))
|
||||
{
|
||||
_updateWC = DateTime.Now.AddSeconds(1).ToFileTime();
|
||||
|
|
Loading…
Reference in a new issue