Fixing a panic with reset --dry-run and no input

[?]
Dec 4, 2020, 9:10 PM
QYY37T6YMICHA57GBXBBR4OYE2A76SFDKXPDKIKSEDDXCNQVC5CAC

Dependencies

  • [2] L4JXJHWX pijul/*: reorganize imports and remove extern crate
  • [3] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).
  • [4] SNZ3OAMC use native external subcommand support instead of hand-rolled one
  • [5] NLGQAH4H Credit and reset relative to current directory instead of the root

Change contents

  • edit in pijul/src/main.rs at line 144
    [3.86849][3.86849:86917]()
    #[error("Cannot dry-reset multiple files")]
    CannotDryReset,
  • edit in pijul/src/commands/reset.rs at line 3
    [2.1314]
    [2.1314]
    use anyhow::bail;
  • replacement in pijul/src/commands/reset.rs at line 49
    [3.98844][3.98844:98940]()
    if self.files.len() > 1 {
    return Err(Error::CannotDryReset.into());
    [3.98844]
    [3.98940]
    if self.files.len() != 1 {
    bail!("reset --dry-run needs exactly one file");