mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 04:04:59 +00: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:
parent
5845ef3eb6
commit
398b14695c
1 changed files with 1 additions and 1 deletions
|
@ -459,7 +459,7 @@ namespace SourceGit.ViewModels
|
||||||
{
|
{
|
||||||
// For worktrees, we need to watch the $GIT_COMMON_DIR instead of the $GIT_DIR.
|
// For worktrees, we need to watch the $GIT_COMMON_DIR instead of the $GIT_DIR.
|
||||||
var gitDirForWatcher = _gitDir;
|
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();
|
var commonDir = new Commands.QueryGitCommonDir(_fullpath).Result();
|
||||||
if (!string.IsNullOrEmpty(commonDir))
|
if (!string.IsNullOrEmpty(commonDir))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue