Skip to content

Commit ee6d445

Browse files
committed
faet: fill MODIFY_STATUS
1 parent 5b07e84 commit ee6d445

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/main.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ pub struct Repo {
2828
// pub remote: Option<Remote>,
2929
}
3030

31+
const MODIFY_STATUS: &[&str] = &["M", "A", "T", "D", "R", "C", "U"];
32+
3133
fn main() {
3234
env_logger::init();
3335

@@ -56,14 +58,17 @@ fn main() {
5658
.split('\n')
5759
.map(|x| x.rsplit_once(" "))
5860
.flatten()
59-
.map(|x| x.0.trim());
61+
.map(|x| x.0);
6062

6163
match out.next() {
6264
None => {
6365
println!("{s}");
6466
status = 5;
6567
}
66-
Some("M") | Some("A") => {
68+
Some(x)
69+
if MODIFY_STATUS.contains(&x)
70+
|| MODIFY_STATUS.contains(&format!("{x} ").as_str()) =>
71+
{
6772
println!("{s}");
6873
status = 6;
6974
}

0 commit comments

Comments
 (0)