We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e9bc7fc commit 6cad70dCopy full SHA for 6cad70d
src/ViewModels/Repository.cs
@@ -1219,12 +1219,17 @@ public void RefreshBranches()
1219
public void RefreshWorktrees()
1220
{
1221
var worktrees = new Commands.Worktree(_fullpath).ReadAllAsync().Result;
1222
+ string commonDir = null;
1223
+ if (worktrees.Count > 0)
1224
+ commonDir = new Commands.QueryGitCommonDir(_fullpath).GetResultAsync().Result;
1225
var cleaned = new List<Models.Worktree>();
1226
1227
foreach (var worktree in worktrees)
1228
1229
if (worktree.IsBare || worktree.FullPath.Equals(_fullpath))
1230
continue;
1231
+ if (!string.IsNullOrEmpty(commonDir) && worktree.FullPath.Equals(commonDir))
1232
+ continue;
1233
1234
cleaned.Add(worktree);
1235
}
0 commit comments