mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-21 21:30:37 +08:00
enhance: the git dir of worktree's owner repository may not named .git
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
@@ -459,7 +459,7 @@ namespace SourceGit.ViewModels
|
||||
{
|
||||
// For worktrees, we need to watch the $GIT_COMMON_DIR instead of the $GIT_DIR.
|
||||
var gitDirForWatcher = _gitDir;
|
||||
if (_gitDir.Replace("\\", "/").IndexOf(".git/worktrees/", StringComparison.Ordinal) > 0)
|
||||
if (_gitDir.Replace("\\", "/").IndexOf("/worktrees/", StringComparison.Ordinal) > 0)
|
||||
{
|
||||
var commonDir = new Commands.QueryGitCommonDir(_fullpath).Result();
|
||||
if (!string.IsNullOrEmpty(commonDir))
|
||||
|
||||
Reference in New Issue
Block a user