File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
13
13
14
14
### Added
15
15
- allow reverting a commit from the commit log ([ #927 ] ( https://github.com/extrawurst/gitui/issues/927 ) )
16
+ - disable pull cmd on local-only branches ([ #1047 ] ( https://github.com/extrawurst/gitui/issues/1047 ) )
16
17
17
18
### Fixed
18
19
- Keep commit message when pre-commit hook fails ([ #1035 ] ( https://github.com/extrawurst/gitui/issues/1035 ) )
Original file line number Diff line number Diff line change @@ -572,10 +572,8 @@ impl Status {
572
572
}
573
573
574
574
fn pull ( & self ) {
575
- if self . has_remotes ( ) {
576
- if let Some ( branch) = self . git_branch_name . last ( ) {
577
- self . queue . push ( InternalEvent :: Pull ( branch) ) ;
578
- }
575
+ if let Some ( branch) = self . git_branch_name . last ( ) {
576
+ self . queue . push ( InternalEvent :: Pull ( branch) ) ;
579
577
}
580
578
}
581
579
@@ -606,7 +604,7 @@ impl Status {
606
604
}
607
605
608
606
fn can_pull ( & self ) -> bool {
609
- self . has_remotes ( )
607
+ self . has_remotes ( ) && self . git_branch_state . is_some ( )
610
608
}
611
609
612
610
fn can_abort_merge ( & self ) -> bool {
@@ -875,6 +873,7 @@ impl Component for Status {
875
873
Ok ( EventState :: Consumed )
876
874
} else if k == self . key_config . keys . pull
877
875
&& !self . is_focus_on_diff ( )
876
+ && self . can_pull ( )
878
877
{
879
878
self . pull ( ) ;
880
879
Ok ( EventState :: Consumed )
You can’t perform that action at this time.
0 commit comments