B:BD[
3.169] → [
3.169:209]
B:BD[
3.209] → [
5.825:1300]
changes.push(match ch {
Hunk::FileMove { path, .. } => format!("MV {}\n", path),
Hunk::FileDel { path, .. } => format!("D {}\n", path),
Hunk::FileUndel { path, .. } => format!("UD {}\n", path),
Hunk::FileAdd { path, .. } => format!("A {}", path),
Hunk::SolveNameConflict { path, .. } => format!("SC {}", path),
Hunk::UnsolveNameConflict { path, .. } => format!("UC {}", path),
use std::fmt::Write;
match ch {
Hunk::FileMove { path, .. } => {
write!(changes.entry(path).or_insert(String::new()), "MV,")?
}
Hunk::FileDel { path, .. } => {
write!(changes.entry(path).or_insert(String::new()), "D,")?
}
Hunk::FileUndel { path, .. } => {
write!(changes.entry(path).or_insert(String::new()), "UD,")?
}
Hunk::FileAdd { path, .. } => {
write!(changes.entry(path).or_insert(String::new()), "A,")?
}
Hunk::SolveNameConflict { path, .. } => {
write!(changes.entry(path).or_insert(String::new()), "SC,")?
}
Hunk::UnsolveNameConflict { path, .. } => {
write!(changes.entry(path).or_insert(String::new()), "UC,")?
}