mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-21 21:30:37 +08:00
fix: worktree file status not updated (#2011)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
@@ -333,14 +333,13 @@ namespace SourceGit.Models
|
||||
|
||||
private bool IsInSubmodule(string folder)
|
||||
{
|
||||
if (string.IsNullOrEmpty(folder) || folder.Equals(_root, StringComparison.Ordinal))
|
||||
return false;
|
||||
|
||||
if (File.Exists($"{folder}/.git"))
|
||||
return true;
|
||||
|
||||
var parent = Path.GetDirectoryName(folder);
|
||||
if (parent == null || parent.Equals(_root, StringComparison.Ordinal))
|
||||
return false;
|
||||
|
||||
return IsInSubmodule(parent);
|
||||
return IsInSubmodule(Path.GetDirectoryName(folder));
|
||||
}
|
||||
|
||||
private readonly IRepository _repo;
|
||||
|
||||
Reference in New Issue
Block a user