@@ -354,18 +354,18 @@ private void RepositoryManagerOnCurrentBranchUpdated(ConfigBranch? branch, Confi
354354 new ActionTask ( CancellationToken . None , ( ) => {
355355 if ( ! Nullable . Equals ( CurrentConfigBranch , branch ) )
356356 {
357- var currentBranch = branch != null ? ( GitBranch ? ) GetLocalGitBranch ( branch . Value ) : null ;
357+ var currentBranch = branch != null ? ( GitBranch ? ) GetLocalGitBranch ( branch . Value ) : null ;
358358
359- CurrentConfigBranch = branch ;
360- CurrentBranch = currentBranch ;
361- UpdateLocalBranches ( ) ;
359+ CurrentConfigBranch = branch ;
360+ CurrentBranch = currentBranch ;
361+ UpdateLocalBranches ( ) ;
362362 }
363363
364364 if ( ! Nullable . Equals ( CurrentConfigRemote , remote ) )
365365 {
366- CurrentConfigRemote = remote ;
367- CurrentRemote = GetGitRemote ( remote . Value ) ;
368- ClearRepositoryInfo ( ) ;
366+ CurrentConfigRemote = remote ;
367+ CurrentRemote = remote . HasValue ? ( GitRemote ? ) GetGitRemote ( remote . Value ) : null ;
368+ ClearRepositoryInfo ( ) ;
369369 }
370370 } ) { Affinity = TaskAffinity . UI } . Start ( ) ;
371371 }
@@ -412,12 +412,10 @@ private void RepositoryManagerOnLocalBranchesUpdated(Dictionary<string, ConfigBr
412412
413413 private void UpdateLocks ( )
414414 {
415- if ( string . IsNullOrEmpty ( CurrentRemote ? . Url ) )
415+ if ( CurrentRemote . HasValue )
416416 {
417- return ;
417+ repositoryManager ? . UpdateLocks ( ) ;
418418 }
419-
420- repositoryManager ? . UpdateLocks ( ) ;
421419 }
422420
423421 private void UpdateLocalBranches ( )
0 commit comments