@@ -26,7 +26,7 @@ use tui::{
26
26
#[ derive( Default , Clone , Copy ) ]
27
27
pub struct StashingOptions {
28
28
pub stash_untracked : bool ,
29
- pub stash_indexed : bool ,
29
+ pub keep_index : bool ,
30
30
}
31
31
32
32
pub struct Stashing {
@@ -56,7 +56,7 @@ impl Stashing {
56
56
) ,
57
57
visible : false ,
58
58
options : StashingOptions {
59
- stash_indexed : true ,
59
+ keep_index : false ,
60
60
stash_untracked : true ,
61
61
} ,
62
62
theme : * theme,
@@ -67,15 +67,9 @@ impl Stashing {
67
67
68
68
///
69
69
pub fn update ( & mut self ) {
70
- let status_type = if self . options . stash_indexed {
71
- StatusType :: Both
72
- } else {
73
- StatusType :: WorkingDir
74
- } ;
75
-
76
70
self . git_status
77
71
. fetch ( StatusParams :: new (
78
- status_type ,
72
+ StatusType :: Both ,
79
73
self . options . stash_untracked ,
80
74
) )
81
75
. unwrap ( ) ;
@@ -115,13 +109,13 @@ impl Stashing {
115
109
bracket_close. clone( ) ,
116
110
Text :: Raw ( Cow :: from( " stash untracked\n " ) ) ,
117
111
bracket_open,
118
- if self . options. stash_indexed {
112
+ if self . options. keep_index {
119
113
option_on. clone( )
120
114
} else {
121
115
option_off. clone( )
122
116
} ,
123
117
bracket_close,
124
- Text :: Raw ( Cow :: from( " stash staged " ) ) ,
118
+ Text :: Raw ( Cow :: from( " keep index " ) ) ,
125
119
]
126
120
}
127
121
}
@@ -206,8 +200,8 @@ impl Component for Stashing {
206
200
true
207
201
}
208
202
keys:: STASHING_TOGGLE_INDEX => {
209
- self . options . stash_indexed =
210
- !self . options . stash_indexed ;
203
+ self . options . keep_index =
204
+ !self . options . keep_index ;
211
205
self . update ( ) ;
212
206
true
213
207
}
0 commit comments