Skip to content

Commit d4a7c53

Browse files
committed
fix: fix MODIFY_STATUS match
1 parent ee6d445 commit d4a7c53

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
# git-head-name
2-
A small binary to get the Git workdir branch or head hash.
1+
111

src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ fn main() {
6767
}
6868
Some(x)
6969
if MODIFY_STATUS.contains(&x)
70-
|| MODIFY_STATUS.contains(&format!("{x} ").as_str()) =>
70+
|| MODIFY_STATUS.contains(&&x[..1])
71+
|| MODIFY_STATUS.contains(&&x[1..2]) =>
7172
{
7273
println!("{s}");
7374
status = 6;

0 commit comments

Comments
 (0)