Current state: return zero instead of an Option if there is no change on the channel
[?]
Dec 15, 2020, 10:29 AM
6RVT5X4LTRP5XHVDESXMIC2DHMT5MUQ24ZDWEBJ4XYTF6LJXK7CACDependencies
- [2]
VO5OQW4WRemoving anyhow in libpijul - [3]
CVAT6LN3Fixing git import, and adding more useful feedback (with `RUST_LOG="pijul=info"`) - [4]
BXD3IQYNFixing --features git - [5]
R3H7D42UDebugging `pijul git`: proper error reporting - [6]
WZVCLZKYaddress clippy lints - [7]
I52XSRUHMassive cleanup, and simplification - [8]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting).
Change contents
- replacement in pijul/src/commands/protocol.rs at line 201
if txn.current_state(&channel.borrow()) == Some(state) && extra.is_empty() {if txn.current_state(&channel.borrow()) == state && extra.is_empty() { - replacement in pijul/src/commands/git.rs at line 651
return Ok(txn.current_state(&channel.borrow()).unwrap());return Ok(txn.current_state(&channel.borrow())); - replacement in pijul/src/commands/git.rs at line 676[3.160242]→[3.160242:160306](∅→∅),[3.160306]→[3.333:434](∅→∅),[3.434]→[3.160364:160370](∅→∅),[3.160364]→[3.160364:160370](∅→∅)
if let Some(state) = state {Ok(state)} else {Ok(txn.current_state(&channel.borrow()).unwrap_or(Merkle::zero()))}Ok(state) - replacement in pijul/src/commands/git.rs at line 736
Ok((n, Some(hash), Some(m)))Ok((n, Some(hash), m)) - replacement in libpijul/src/pristine/mod.rs at line 392
) -> Option<Merkle> {) -> Merkle { - edit in libpijul/src/pristine/mod.rs at line 396
.unwrap_or(Merkle::zero()) - replacement in libpijul/src/lib.rs at line 405
fn current_state(&self, channel: &pristine::Channel<Self>) -> Option<pristine::Merkle> {fn current_state(&self, channel: &pristine::Channel<Self>) -> pristine::Merkle {