Add `diff --short` that lists changes without showing them
[?]
Nov 9, 2020, 10:09 PM
YDKNUL6B4EFM5U2GG36SSEKXHS6XK4OLIWUVE4BUAJ5VYJFHAOIQCDependencies
- [2]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting).
Change contents
- edit in pijul/src/commands/diff.rs at line 22
#[clap(long = "short")]pub short: bool, - edit in pijul/src/commands/diff.rs at line 104
} else if self.short {let mut changes = Vec::new();for ch in change.changes.iter() {changes.push(match ch {Record::FileMove { path, .. } =>format!("MV {}\n", path),Record::FileDel { path, .. } =>format!("D {}\n", path),Record::FileUndel { path, .. } =>format!("UD {}\n", path),Record::FileAdd { path, .. } =>format!("A {}", path),Record::SolveNameConflict { path, .. } =>format!("SC {}", path),Record::UnsolveNameConflict { path, .. } =>format!("UC {}", path),Record::Edit { local: Local { path, .. }, .. } =>format!("M {}", path),Record::Replacement { local: Local { path, .. }, .. } =>format!("R {}", path),Record::SolveOrderConflict { local: Local { path, .. }, .. } =>format!("SC {}", path),Record::UnsolveOrderConflict { local: Local { path, .. }, .. } =>format!("UC {}", path),Record::ResurrectZombies { local: Local { path, .. }, .. } =>format!("RZ {}", path),});}changes.sort_unstable();changes.dedup();for ch in changes { println!("{}", ch); } - edit in libpijul/src/working_copy/filesystem.rs at line 114
eprintln!("Adding {:?}", path); - edit in libpijul/src/working_copy/filesystem.rs at line 126
eprintln!("Adding {:?}", path);