Migrate from `pijul::current_dir` to `std::env::current_dir`

finchie
Jul 14, 2023, 11:51 AM
GYGLQPVXZHCXO62KMR62GBKBGB5EXIC2GYPM53LJFXRKPGBJAARQC

Dependencies

  • [2] 4RV7T4SR Migrate from `pijul::config` to `pijul-config`
  • [3] PIQCNEEB Upgrading to Clap 3.0.0-alpha.5
  • [4] 6ZHY3XTG Updating deprecated methods in clap
  • [5] LZOGKBJX new command `pijul client` for authenticating to a HTTP server
  • [6] GJNJ75U5 Canonicalise paths (reset and credit) before stripping off the prefix
  • [7] TI7PCK7J Update `pijul/src/main.rs` to use new identity management
  • [8] YN63NUZO Sanakirja 1.0
  • [9] SNZ3OAMC use native external subcommand support instead of hand-rolled one
  • [10] VO5OQW4W Removing anyhow in libpijul
  • [11] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).
  • [12] L4JXJHWX pijul/*: reorganize imports and remove extern crate
  • [13] NLGQAH4H Credit and reset relative to current directory instead of the root
  • [14] JL4WKA5P Implement the Sanakirja concurrency model in a cross-process way
  • [15] Y7YAFMFF Fix path prefix striping on Windows.
  • [16] FMKKWCFV Better clap attributes
  • [17] EEBKW7VT Keys and identities
  • [18] EUZFFJSO Updating Pijul with the latest changes in Libpijul
  • [19] I24UEJQL Various post-fire fixes
  • [20] TEDGMEHF Introduce subcommand for completion-script generation.
  • [21] QL6K2ZM3 Tags
  • [22] CCLLB7OI Upgrading to Sanakirja 0.15 + version bump

Change contents

  • edit in pijul/src/repository.rs at line 1
    [3.21431]
    [3.21516]
    use std::env::current_dir;
  • edit in pijul/src/repository.rs at line 4
    [3.21541][2.0:24]()
    use crate::current_dir;
  • edit in pijul/src/main.rs at line 8
    [3.84299][3.578:602]()
    use std::path::PathBuf;
  • edit in pijul/src/main.rs at line 9
    [3.603][3.11240:11258]()
    use anyhow::bail;
  • edit in pijul/src/main.rs at line 271
    [3.137][3.89705:89714](),[3.687][3.89705:89714](),[3.89705][3.89705:89714](),[3.89714][3.11259:11441]()
    }
    }
    pub fn current_dir() -> Result<PathBuf, anyhow::Error> {
    if let Ok(cur) = std::env::current_dir() {
    Ok(cur)
    } else {
    bail!("Cannot access working directory")
  • replacement in pijul/src/commands/reset.rs at line 78
    [3.99262][3.0:54]()
    let mut root = crate::current_dir()?;
    [3.99262]
    [3.54]
    let mut root = std::env::current_dir()?;
  • replacement in pijul/src/commands/credit.rs at line 48
    [3.180112][3.175:225]()
    let mut root = crate::current_dir()?;
    [3.180112]
    [3.225]
    let mut root = std::env::current_dir()?;