Fixing a bug when outputting after a pull, when a path to be output is a string-prefix of another one without being a path-prefix of that other one

pmeunier
Feb 27, 2023, 7:33 AM
5XCNW4EVBUVSZPDPGLHQOZJOUWMMSCLK7QTXF7GNS3L5Q2G2MLCAC

Dependencies

  • [2] ILZ44DEY simplify outputting with no touched paths
  • [3] EUZFFJSO Updating Pijul with the latest changes in Libpijul
  • [4] 6ZPDI7QG pull uses None as the base case path when outputing repo
  • [5] DO2Y5TY5 Tag synchronisation
  • [6] FKUPWOP7 Removing the `--tag` option to push and pull
  • [7] 2D7P2VKJ Change completions (where the whole progress bar story started)
  • [8] Y6EVFMTA Don't output files if they aren't in the current channel
  • [*] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).

Change contents

  • replacement in pijul/src/commands/pushpull.rs at line 543
    [2.112][3.151:184](),[3.1301][3.151:184]()
    let mut last = None;
    [2.112]
    [3.4806]
    let mut last: Option<&str> = None;
  • replacement in pijul/src/commands/pushpull.rs at line 554
    [3.214][3.214:294]()
    Some(last_path) if path.starts_with(last_path) => continue,
    [3.214]
    [3.294]
    Some(last_path) => {
    // If `last_path` is a prefix (in the path sense) of `path`, skip.
    if last_path.len() < path.len() {
    let (pre_last, post_last) = path.split_at(last_path.len());
    if pre_last == last_path && post_last.starts_with("/") {
    continue
    }
    }
    },