File tree 2 files changed +9
-5
lines changed
2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -65,8 +65,7 @@ impl ChangesComponent {
65
65
}
66
66
}
67
67
68
- ///
69
- pub fn update ( & mut self , list : & [ StatusItem ] ) -> Result < ( ) > {
68
+ pub fn update ( & mut self ) -> Result < ( ) > {
70
69
if self . is_working_dir {
71
70
if let Ok ( branch_name) = self . branch_name . lookup ( ) {
72
71
self . files . set_title ( format ! (
@@ -75,9 +74,12 @@ impl ChangesComponent {
75
74
) )
76
75
}
77
76
}
77
+ Ok ( ( ) )
78
+ }
78
79
80
+ ///
81
+ pub fn set_items ( & mut self , list : & [ StatusItem ] ) -> Result < ( ) > {
79
82
self . files . update ( list) ?;
80
-
81
83
Ok ( ( ) )
82
84
}
83
85
Original file line number Diff line number Diff line change @@ -202,6 +202,8 @@ impl Status {
202
202
) ) ?;
203
203
self . git_status_stage
204
204
. fetch ( StatusParams :: new ( StatusType :: Stage , true ) ) ?;
205
+
206
+ self . index_wd . update ( ) ?;
205
207
}
206
208
207
209
Ok ( ( ) )
@@ -230,10 +232,10 @@ impl Status {
230
232
231
233
fn update_status ( & mut self ) -> Result < ( ) > {
232
234
let status = self . git_status_stage . last ( ) ?;
233
- self . index . update ( & status. items ) ?;
235
+ self . index . set_items ( & status. items ) ?;
234
236
235
237
let status = self . git_status_workdir . last ( ) ?;
236
- self . index_wd . update ( & status. items ) ?;
238
+ self . index_wd . set_items ( & status. items ) ?;
237
239
238
240
self . update_diff ( ) ?;
239
241
You can’t perform that action at this time.
0 commit comments