feat: quiet diff
This commit is contained in:
+22
-1
@@ -104,8 +104,8 @@ fn main() -> Result<()> {
|
|||||||
added.exclude_ignored();
|
added.exclude_ignored();
|
||||||
removed.exclude_ignored();
|
removed.exclude_ignored();
|
||||||
|
|
||||||
|
if !args.quiet {
|
||||||
let mut s = "Official\n".to_string();
|
let mut s = "Official\n".to_string();
|
||||||
|
|
||||||
// official added
|
// official added
|
||||||
added
|
added
|
||||||
.official
|
.official
|
||||||
@@ -130,6 +130,27 @@ fn main() -> Result<()> {
|
|||||||
.for_each(|x| s += &format!("[-] {}\n", x));
|
.for_each(|x| s += &format!("[-] {}\n", x));
|
||||||
|
|
||||||
println!("{}", s);
|
println!("{}", s);
|
||||||
|
} else {
|
||||||
|
let mut s = String::new();
|
||||||
|
|
||||||
|
added
|
||||||
|
.official
|
||||||
|
.iter()
|
||||||
|
.for_each(|x| s += &format!("+ {}\n", x));
|
||||||
|
added
|
||||||
|
.foreign
|
||||||
|
.iter()
|
||||||
|
.for_each(|x| s += &format!("+ {}\n", x));
|
||||||
|
removed
|
||||||
|
.official
|
||||||
|
.iter()
|
||||||
|
.for_each(|x| s += &format!("- {}\n", x));
|
||||||
|
removed
|
||||||
|
.foreign
|
||||||
|
.iter()
|
||||||
|
.for_each(|x| s += &format!("- {}\n", x));
|
||||||
|
print!("{}", s);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Commands::Pure { all } => todo!(),
|
Commands::Pure { all } => todo!(),
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user