First read all stdin when applying a patch, in order to avoid blocking

pmeunier
Feb 27, 2023, 5:37 PM
RFLKHQ2YJ3C547LMBM47Q5GHOUVYVT5LIUQVAA3GBGKQTJX6NOMQC

Dependencies

  • [2] M2C6QW2A Avoid serialising twice in order to save the changes' signatures
  • [3] 4H6GNDAI Prevent `pijul apply` from creating empty channels
  • [4] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).
  • [5] EUZFFJSO Updating Pijul with the latest changes in Libpijul
  • [6] R3H7D42U Debugging `pijul git`: proper error reporting
  • [7] I24UEJQL Various post-fire fixes
  • [8] E7UUQQCC Apply changes with prefixes in .pijul/changes
  • [*] A3RM526Y Integrating identity malleability

Change contents

  • edit in pijul/src/commands/apply.rs at line 31
    [10.25009]
    [3.17504]
    let mut hashes = Vec::new();
    if self.change.is_empty() {
    let mut change = std::io::BufReader::new(std::io::stdin());
    let mut change = libpijul::change::Change::read(&mut change, &mut HashMap::default())?;
    hashes.push(
    repo.changes
    .save_change(&mut change, |_, _| Ok::<_, anyhow::Error>(()))?,
    )
    }
  • edit in pijul/src/commands/apply.rs at line 59
    [3.195413][3.779:816]()
    let mut hashes = Vec::new();
  • edit in pijul/src/commands/apply.rs at line 79
    [3.937][3.937:978](),[3.978][3.195722:195794](),[3.195722][3.195722:195794](),[3.195794][2.679:930]()
    }
    if hashes.is_empty() {
    let mut change = std::io::BufReader::new(std::io::stdin());
    let mut change = libpijul::change::Change::read(&mut change, &mut HashMap::default())?;
    hashes.push(
    repo.changes
    .save_change(&mut change, |_, _| Ok::<_, anyhow::Error>(()))?,
    )