fix: Fixed the problem that the switching branch of the worktree repo is not displayed

This commit is contained in:
方祝立 2024-05-07 10:29:24 +08:00
parent 9aa723ec49
commit 0e0d3d64b4

View file

@ -180,7 +180,8 @@ namespace SourceGit.Models
}
else if (name.Equals("HEAD", StringComparison.Ordinal) ||
name.StartsWith("refs/heads/", StringComparison.Ordinal) ||
name.StartsWith("refs/remotes/", StringComparison.Ordinal))
name.StartsWith("refs/remotes/", StringComparison.Ordinal) ||
(name.StartsWith("worktrees/", StringComparison.Ordinal) && name.EndsWith("/HEAD", StringComparison.Ordinal)))
{
_updateBranch = DateTime.Now.AddSeconds(.5).ToFileTime();
}