File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ public class RenameBranch : Popup
88 public Models . Branch Target
99 {
1010 get ;
11- private set ;
1211 }
1312
1413 [ Required ( ErrorMessage = "Branch name is required!!!" ) ]
@@ -54,8 +53,19 @@ public override Task<bool> Sure()
5453
5554 return Task . Run ( ( ) =>
5655 {
56+ var oldName = Target . FullName ;
5757 var succ = Commands . Branch . Rename ( _repo . FullPath , Target . Name , _name ) ;
58- CallUIThread ( ( ) => _repo . SetWatcherEnabled ( true ) ) ;
58+ CallUIThread ( ( ) =>
59+ {
60+ if ( succ && _repo . Settings . Filters . Contains ( oldName ) )
61+ {
62+ _repo . Settings . Filters . Remove ( oldName ) ;
63+ _repo . Settings . Filters . Add ( $ "refs/heads/{ _name } ") ;
64+ }
65+
66+ _repo . MarkBranchesDirtyManually ( ) ;
67+ _repo . SetWatcherEnabled ( true ) ;
68+ } ) ;
5969 return succ ;
6070 } ) ;
6171 }
Original file line number Diff line number Diff line change @@ -841,7 +841,7 @@ public void RefreshCommits()
841841
842842 if ( _settings . Filters . Count != validFilters . Count )
843843 {
844- Dispatcher . UIThread . Post ( ( ) =>
844+ Dispatcher . UIThread . Invoke ( ( ) =>
845845 {
846846 _settings . Filters . Clear ( ) ;
847847 _settings . Filters . AddRange ( validFilters ) ;
@@ -850,6 +850,9 @@ public void RefreshCommits()
850850 }
851851 else
852852 {
853+ if ( _settings . Filters . Count != 0 )
854+ Dispatcher . UIThread . Invoke ( ( ) => _settings . Filters . Clear ( ) ) ;
855+
853856 limits += "--exclude=refs/stash --all" ;
854857 }
855858
You can’t perform that action at this time.
0 commit comments