Collapse None and Some(false) variants of force_cache since they are treated the same

dblsaiko
Mar 31, 2024, 4:45 PM
SAV7FVGQKT27FSBA4PKQIW4AXPFG5CAEQTDEC5JABRIE653GGREAC

Dependencies

  • [2] DO2Y5TY5 Tag synchronisation
  • [3] FKUPWOP7 Removing the `--tag` option to push and pull
  • [4] IVLLXQ5Z Improved push/pull reporting
  • [5] YD7QFAD7 Simplifying pijul::remote::PushDelta
  • [6] OYN2YVPA Create `pijul_remote` crate
  • [7] TCFJMFFE Using state_from_prefix and hash_from_prefix on remotes to complete (or find) hashes and states
  • [*] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).

Change contents

  • replacement in pijul-remote/src/lib.rs at line 706
    [3.10978][3.10978:11013]()
    force_cache: Option<bool>,
    [3.10978]
    [3.11013]
    force_cache: bool,
  • replacement in pijul-remote/src/lib.rs at line 772
    [2.11519][2.11519:11662]()
    let should_cache = if let Some(true) = force_cache {
    true
    } else {
    remote_unrecs.is_empty()
    };
    [2.11519]
    [2.11662]
    let should_cache = force_cache || remote_unrecs.is_empty();
  • replacement in pijul/src/commands/pushpull.rs at line 477
    [3.19542][3.19542:19582]()
    Some(self.force_cache),
    [3.19542]
    [3.19582]
    self.force_cache,
  • edit in pijul/src/commands/pushpull.rs at line 649
    [3.21045][3.21045:21173]()
    let force_cache = if self.force_cache {
    Some(self.force_cache)
    } else {
    None
    };
  • replacement in pijul/src/commands/pushpull.rs at line 654
    [3.21315][3.21315:21344]()
    force_cache,
    [3.21315]
    [3.21344]
    self.force_cache,