Compare commits

...

2 Commits

Author SHA1 Message Date
Fouad Matin
09ce495f15 fix: fmt 2025-10-18 16:41:25 -07:00
Fouad Matin
e68b4617e3 fix(command_safety): git checkout should ask user 2025-10-15 13:16:08 -07:00

View File

@@ -22,7 +22,10 @@ fn is_dangerous_to_call_with_exec(command: &[String]) -> bool {
match cmd0 {
Some(cmd) if cmd.ends_with("git") || cmd.ends_with("/git") => {
matches!(command.get(1).map(String::as_str), Some("reset" | "rm"))
matches!(
command.get(1).map(String::as_str),
Some("reset" | "rm" | "checkout")
)
}
Some("rm") => matches!(command.get(1).map(String::as_str), Some("-f" | "-rf")),