mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 12:15:00 +00:00
enhance: submodule bookmark inherts from parent repo (#1001)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
68946d2140
commit
ce16ac63eb
1 changed files with 6 additions and 2 deletions
|
@ -1161,6 +1161,10 @@ namespace SourceGit.ViewModels
|
||||||
|
|
||||||
public void OpenSubmodule(string submodule)
|
public void OpenSubmodule(string submodule)
|
||||||
{
|
{
|
||||||
|
var selfPage = GetOwnerPage();
|
||||||
|
if (selfPage == null)
|
||||||
|
return;
|
||||||
|
|
||||||
var root = Path.GetFullPath(Path.Combine(_fullpath, submodule));
|
var root = Path.GetFullPath(Path.Combine(_fullpath, submodule));
|
||||||
var normalizedPath = root.Replace("\\", "/");
|
var normalizedPath = root.Replace("\\", "/");
|
||||||
|
|
||||||
|
@ -1171,12 +1175,12 @@ namespace SourceGit.ViewModels
|
||||||
{
|
{
|
||||||
Id = normalizedPath,
|
Id = normalizedPath,
|
||||||
Name = Path.GetFileName(normalizedPath),
|
Name = Path.GetFileName(normalizedPath),
|
||||||
Bookmark = 0,
|
Bookmark = selfPage.Node.Bookmark,
|
||||||
IsRepository = true,
|
IsRepository = true,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
App.GetLauncer()?.OpenRepositoryInTab(node, null);
|
App.GetLauncer().OpenRepositoryInTab(node, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddWorktree()
|
public void AddWorktree()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue