@@ -30,6 +30,11 @@ public string GitDir
30
30
get ;
31
31
}
32
32
33
+ public string GitCommonDir
34
+ {
35
+ get ;
36
+ }
37
+
33
38
public Models . RepositorySettings Settings
34
39
{
35
40
get => _settings ;
@@ -504,17 +509,17 @@ public Repository(bool isBare, string path, string gitDir)
504
509
if ( ! Path . IsPathRooted ( commonDir ) )
505
510
commonDir = new DirectoryInfo ( Path . Combine ( GitDir , commonDir ) ) . FullName ;
506
511
507
- _gitCommonDir = commonDir ;
512
+ GitCommonDir = commonDir ;
508
513
}
509
514
else
510
515
{
511
- _gitCommonDir = GitDir ;
516
+ GitCommonDir = GitDir ;
512
517
}
513
518
}
514
519
515
520
public void Open ( )
516
521
{
517
- var settingsFile = Path . Combine ( _gitCommonDir , "sourcegit.settings" ) ;
522
+ var settingsFile = Path . Combine ( GitCommonDir , "sourcegit.settings" ) ;
518
523
if ( File . Exists ( settingsFile ) )
519
524
{
520
525
try
@@ -534,7 +539,7 @@ public void Open()
534
539
535
540
try
536
541
{
537
- _watcher = new Models . Watcher ( this , FullPath , _gitCommonDir ) ;
542
+ _watcher = new Models . Watcher ( this , FullPath , GitCommonDir ) ;
538
543
}
539
544
catch ( Exception ex )
540
545
{
@@ -574,7 +579,7 @@ public void Close()
574
579
if ( ! _isWorktree )
575
580
{
576
581
_settings . LastCommitMessage = _workingCopy . CommitMessage ;
577
- using var stream = File . Create ( Path . Combine ( _gitCommonDir , "sourcegit.settings" ) ) ;
582
+ using var stream = File . Create ( Path . Combine ( GitCommonDir , "sourcegit.settings" ) ) ;
578
583
JsonSerializer . Serialize ( stream , _settings , JsonCodeGen . Default . RepositorySettings ) ;
579
584
}
580
585
@@ -2039,7 +2044,6 @@ private void FetchInBackground(object sender)
2039
2044
}
2040
2045
2041
2046
private readonly bool _isWorktree = false ;
2042
- private readonly string _gitCommonDir = null ;
2043
2047
private Models . RepositorySettings _settings = null ;
2044
2048
private Models . FilterMode _historiesFilterMode = Models . FilterMode . None ;
2045
2049
private bool _hasAllowedSignersFile = false ;
0 commit comments