Order of removing paths when outputting a repo

pmeunier
Feb 27, 2023, 11:26 AM
PEUUYRZ5MHYM2IQTN3ASXPIFZSK5KI32LIHWM6RIWVRRXIQ5GTNQC

Dependencies

  • [2] GJZWSXHQ Do not remove files not tracked in the new channel when outputting
  • [*] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).

Change contents

  • edit in libpijul/src/output/output.rs at line 855
    [2.413]
    [4.685577]
    // In order to avoid killing a directory before killing the files
    // inside, sort the longest paths first.
    let mut dead: Vec<_> = dead.iter().collect();
    dead.sort_by(|a, b| {
    let cmp = b.1.1.cmp(&a.1.1);
    use std::cmp::Ordering;
    if let Ordering::Equal = cmp {
    b.cmp(&a)
    } else {
    cmp
    }
    });