mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 20:24:59 +00:00
refactor: move settings of repository, such as filters, commit message, from Preference
to each repository's gitdir.
* avoid invalid repository setting remains in preference.json * supports to restore tabs that not added to the Welcome page
This commit is contained in:
parent
56a42dd6e8
commit
7f389b2e6f
18 changed files with 187 additions and 209 deletions
|
@ -1,5 +1,4 @@
|
|||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SourceGit.ViewModels
|
||||
{
|
||||
|
@ -29,11 +28,10 @@ namespace SourceGit.ViewModels
|
|||
if (!succ)
|
||||
return false;
|
||||
|
||||
var gitDir = Path.GetFullPath(Path.Combine(_targetPath, ".git"));
|
||||
CallUIThread(() =>
|
||||
{
|
||||
var repo = Preference.AddRepository(_targetPath, gitDir);
|
||||
Preference.FindOrAddNodeByRepositoryPath(repo.FullPath, _parentNode, true);
|
||||
var normalizedPath = _targetPath.Replace("\\", "/");
|
||||
Preference.FindOrAddNodeByRepositoryPath(normalizedPath, _parentNode, true);
|
||||
});
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue