mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 20:24:59 +00:00
fix: avoid duplicated nodes being added into the repository tree
This commit is contained in:
parent
207e82b391
commit
eeb6abb560
4 changed files with 27 additions and 28 deletions
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
@ -114,15 +113,7 @@ namespace SourceGit.ViewModels
|
|||
CallUIThread(() =>
|
||||
{
|
||||
var repo = Preference.AddRepository(path, Path.Combine(path, ".git"));
|
||||
var node = new RepositoryNode()
|
||||
{
|
||||
Id = repo.FullPath,
|
||||
Name = Path.GetFileName(repo.FullPath),
|
||||
Bookmark = 0,
|
||||
IsRepository = true,
|
||||
};
|
||||
Preference.AddNode(node);
|
||||
|
||||
var node = Preference.FindOrAddNodeByRepositoryPath(repo.FullPath, null);
|
||||
_launcher.OpenRepositoryInTab(node, _page);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue