@@ -354,18 +354,18 @@ private void RepositoryManagerOnCurrentBranchUpdated(ConfigBranch? branch, Confi
354
354
new ActionTask ( CancellationToken . None , ( ) => {
355
355
if ( ! Nullable . Equals ( CurrentConfigBranch , branch ) )
356
356
{
357
- var currentBranch = branch != null ? ( GitBranch ? ) GetLocalGitBranch ( branch . Value ) : null ;
357
+ var currentBranch = branch != null ? ( GitBranch ? ) GetLocalGitBranch ( branch . Value ) : null ;
358
358
359
- CurrentConfigBranch = branch ;
360
- CurrentBranch = currentBranch ;
361
- UpdateLocalBranches ( ) ;
359
+ CurrentConfigBranch = branch ;
360
+ CurrentBranch = currentBranch ;
361
+ UpdateLocalBranches ( ) ;
362
362
}
363
363
364
364
if ( ! Nullable . Equals ( CurrentConfigRemote , remote ) )
365
365
{
366
- CurrentConfigRemote = remote ;
367
- CurrentRemote = GetGitRemote ( remote . Value ) ;
368
- ClearRepositoryInfo ( ) ;
366
+ CurrentConfigRemote = remote ;
367
+ CurrentRemote = remote . HasValue ? ( GitRemote ? ) GetGitRemote ( remote . Value ) : null ;
368
+ ClearRepositoryInfo ( ) ;
369
369
}
370
370
} ) { Affinity = TaskAffinity . UI } . Start ( ) ;
371
371
}
@@ -412,12 +412,10 @@ private void RepositoryManagerOnLocalBranchesUpdated(Dictionary<string, ConfigBr
412
412
413
413
private void UpdateLocks ( )
414
414
{
415
- if ( string . IsNullOrEmpty ( CurrentRemote ? . Url ) )
415
+ if ( CurrentRemote . HasValue )
416
416
{
417
- return ;
417
+ repositoryManager ? . UpdateLocks ( ) ;
418
418
}
419
-
420
- repositoryManager ? . UpdateLocks ( ) ;
421
419
}
422
420
423
421
private void UpdateLocalBranches ( )
0 commit comments