File tree Expand file tree Collapse file tree 3 files changed +18
-14
lines changed Expand file tree Collapse file tree 3 files changed +18
-14
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## Unreleased
9
9
10
+ ## Fixed
11
+ - appropriate error message when pulling deleted remote branch ([ #911 ] ( https://github.com/extrawurst/gitui/issues/991 ) )
12
+
10
13
## [ 0.17.1] - 2021-09-10
11
14
12
15
** fuzzy find files**
Original file line number Diff line number Diff line change @@ -385,7 +385,7 @@ impl App {
385
385
self . compare_commits_popup . update_git ( ev) ?;
386
386
self . push_popup . update_git ( ev) ?;
387
387
self . push_tags_popup . update_git ( ev) ?;
388
- self . pull_popup . update_git ( ev) ? ;
388
+ self . pull_popup . update_git ( ev) ;
389
389
self . select_branch_popup . update_git ( ev) ?;
390
390
}
391
391
@@ -686,7 +686,11 @@ impl App {
686
686
flags. insert ( NeedsUpdate :: ALL ) ;
687
687
}
688
688
InternalEvent :: Pull ( branch) => {
689
- self . pull_popup . fetch ( branch) ?;
689
+ if let Err ( error) = self . pull_popup . fetch ( branch) {
690
+ self . queue . push ( InternalEvent :: ShowErrorMsg (
691
+ error. to_string ( ) ,
692
+ ) ) ;
693
+ }
690
694
flags. insert ( NeedsUpdate :: ALL ) ;
691
695
}
692
696
InternalEvent :: PushTags => {
Original file line number Diff line number Diff line change @@ -110,17 +110,18 @@ impl PullComponent {
110
110
}
111
111
112
112
///
113
- pub fn update_git (
114
- & mut self ,
115
- ev : AsyncGitNotification ,
116
- ) -> Result < ( ) > {
113
+ pub fn update_git ( & mut self , ev : AsyncGitNotification ) {
117
114
if self . is_visible ( ) {
118
115
if let AsyncGitNotification :: Fetch = ev {
119
- self . update ( ) ?;
116
+ if let Err ( error) = self . update ( ) {
117
+ self . pending = false ;
118
+ self . hide ( ) ;
119
+ self . queue . push ( InternalEvent :: ShowErrorMsg (
120
+ format ! ( "fetch failed:\n {}" , error) ,
121
+ ) ) ;
122
+ }
120
123
}
121
124
}
122
-
123
- Ok ( ( ) )
124
125
}
125
126
126
127
///
@@ -135,11 +136,7 @@ impl PullComponent {
135
136
if err. is_empty ( ) {
136
137
self . try_ff_merge ( ) ?;
137
138
} else {
138
- self . pending = false ;
139
- self . hide ( ) ;
140
- self . queue . push ( InternalEvent :: ShowErrorMsg (
141
- format ! ( "fetch failed:\n {}" , err) ,
142
- ) ) ;
139
+ anyhow:: bail!( err) ;
143
140
}
144
141
}
145
142
}
You can’t perform that action at this time.
0 commit comments