This repository was archived by the owner on Dec 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +194
-78
lines changed
UnityExtension/Assets/Editor/GitHub.Unity Expand file tree Collapse file tree 2 files changed +194
-78
lines changed Original file line number Diff line number Diff line change @@ -323,6 +323,9 @@ private void CacheContainer_OnCacheInvalidated(CacheType cacheType)
323
323
case CacheType . GitUserCache :
324
324
break ;
325
325
326
+ case CacheType . RepositoryInfoCache :
327
+ break ;
328
+
326
329
default :
327
330
throw new ArgumentOutOfRangeException ( nameof ( cacheType ) , cacheType , null ) ;
328
331
}
@@ -442,7 +445,7 @@ private void RepositoryManager_OnCurrentBranchAndRemoteUpdated(ConfigBranch? bra
442
445
{
443
446
CurrentConfigRemote = remote ;
444
447
CurrentRemote = GetGitRemote ( remote . Value ) ;
445
- UpdateRepositoryInfo ( ) ;
448
+ ClearRepositoryInfo ( ) ;
446
449
}
447
450
} ) { Affinity = TaskAffinity . UI } . Start ( ) ;
448
451
}
@@ -485,20 +488,10 @@ private void UpdateLocalBranches()
485
488
LocalBranches = LocalConfigBranches . Values . Select ( GetLocalGitBranch ) . ToArray ( ) ;
486
489
}
487
490
488
- private void UpdateRepositoryInfo ( )
491
+ private void ClearRepositoryInfo ( )
489
492
{
490
- if ( CurrentRemote . HasValue )
491
- {
492
- CloneUrl = new UriString ( CurrentRemote . Value . Url ) ;
493
- Name = CloneUrl . RepositoryName ;
494
- Logger . Trace ( "CloneUrl: {0}" , CloneUrl . ToString ( ) ) ;
495
- }
496
- else
497
- {
498
- CloneUrl = null ;
499
- Name = LocalPath . FileName ;
500
- Logger . Trace ( "CloneUrl: [NULL]" ) ;
501
- }
493
+ CloneUrl = null ;
494
+ Name = null ;
502
495
}
503
496
504
497
private void RepositoryManager_OnLocalBranchRemoved ( string name )
You can’t perform that action at this time.
0 commit comments