Fix path prefix striping on Windows.

[?]
Dec 23, 2020, 5:19 PM
Y7YAFMFFJY3SQ3GYN3SS4V3FZWMH3B5L65AXQBXOR5XARSMF5JJQC

Dependencies

  • [2] GJNJ75U5 Canonicalise paths (reset and credit) before stripping off the prefix
  • [3] QYY37T6Y Fixing a panic with reset --dry-run and no input
  • [4] NLGQAH4H Credit and reset relative to current directory instead of the root
  • [5] KWAMD2KR A few fixes in the documentation comments
  • [6] BZSC7VMY address clippy lints
  • [7] MU5GSJAW Partial push and pull (WARNING: breaks the existing protocol)
  • [8] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).
  • [9] 4H2XTVJ2 Fix some mistakes in the docs
  • [10] AEPEFS7O Write help for each argument
  • [*] L4JXJHWX pijul/*: reorganize imports and remove extern crate

Change contents

  • edit in pijul/src/commands/reset.rs at line 4
    [3.18]
    [12.1314]
    use canonical_path::CanonicalPathBuf;
  • edit in pijul/src/commands/reset.rs at line 41
    [4.98455]
    [4.98455]
    let repo_path = CanonicalPathBuf::canonicalize(&repo.path)?;
  • replacement in pijul/src/commands/reset.rs at line 56
    [4.99092][4.99092:99169]()
    let path = root.strip_prefix(&repo.path)?.to_str().unwrap();
    [4.99092]
    [4.99169]
    let path = root.strip_prefix(&repo_path)?.to_str().unwrap();
  • replacement in pijul/src/commands/reset.rs at line 62
    [2.58][4.97:174](),[4.97][4.97:174]()
    let path = root.strip_prefix(&repo.path)?.to_str().unwrap();
    [2.58]
    [4.99322]
    let path = root.strip_prefix(&repo_path)?.to_str().unwrap();
  • replacement in pijul/src/commands/reset.rs at line 114
    [4.101310][4.101310:101391]()
    let path = root.strip_prefix(&repo.path)?.to_str().unwrap();
    [4.101310]
    [4.101391]
    let path = root.strip_prefix(&repo_path)?.to_str().unwrap();
  • edit in pijul/src/commands/file_operations.rs at line 42
    [4.169908]
    [4.169908]
    let repo_path = CanonicalPathBuf::canonicalize(&repo.path)?;
  • replacement in pijul/src/commands/file_operations.rs at line 51
    [4.170280][4.170280:170398]()
    let source = source.strip_prefix(&repo.path)?;
    let target = target.strip_prefix(&repo.path)?;
    [4.170280]
    [4.170398]
    let source = source.strip_prefix(&repo_path)?;
    let target = target.strip_prefix(&repo_path)?;
  • edit in pijul/src/commands/file_operations.rs at line 164
    [4.172786]
    [4.172786]
    let repo_path = CanonicalPathBuf::canonicalize(&repo.path)?;
  • replacement in pijul/src/commands/file_operations.rs at line 177
    [4.173175][4.173175:173248]()
    let path = if let Ok(path) = path.strip_prefix(&repo.path) {
    [4.173175]
    [4.173248]
    let path = if let Ok(path) = path.strip_prefix(&repo_path.as_path()) {
  • edit in pijul/src/commands/credit.rs at line 4
    [12.2811]
    [12.2811]
    use canonical_path::CanonicalPathBuf;
  • edit in pijul/src/commands/credit.rs at line 43
    [4.179828]
    [4.179828]
    let repo_path = CanonicalPathBuf::canonicalize(&repo.path)?;
  • replacement in pijul/src/commands/credit.rs at line 46
    [4.179954][4.179954:180027]()
    let path = root.strip_prefix(&repo.path)?.to_str().unwrap();
    [4.179954]
    [4.180027]
    let path = root.strip_prefix(&repo_path.as_path())?.to_str().unwrap();
  • replacement in pijul/src/commands/credit.rs at line 52
    [2.113][4.260:333](),[4.260][4.260:333]()
    let path = root.strip_prefix(&repo.path)?.to_str().unwrap();
    [2.113]
    [4.180164]
    let path = root.strip_prefix(&repo_path.as_path())?.to_str().unwrap();