From 0e0d3d64b46f2887b738cd0fc7899b25c89cdd49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A5=9D=E7=AB=8B?= Date: Tue, 7 May 2024 10:29:24 +0800 Subject: [PATCH] fix: Fixed the problem that the switching branch of the worktree repo is not displayed --- src/Models/Watcher.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Models/Watcher.cs b/src/Models/Watcher.cs index e6e30fb0..e4eb6851 100644 --- a/src/Models/Watcher.cs +++ b/src/Models/Watcher.cs @@ -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(); }