Add `diff --short` that lists changes without showing them

[?]
Nov 9, 2020, 10:09 PM
YDKNUL6B4EFM5U2GG36SSEKXHS6XK4OLIWUVE4BUAJ5VYJFHAOIQC

Dependencies

  • [2] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).

Change contents

  • edit in pijul/src/commands/diff.rs at line 22
    [2.174004]
    [2.174004]
    #[clap(long = "short")]
    pub short: bool,
  • edit in pijul/src/commands/diff.rs at line 104
    [2.177020]
    [2.177020]
    } 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
    [2.212689][2.212689:212753]()
    eprintln!("Adding {:?}", path);
  • edit in libpijul/src/working_copy/filesystem.rs at line 126
    [2.213373][2.213373:213429]()
    eprintln!("Adding {:?}", path);