Use Simplified instead of Normalized for path prefix stripping (#2071)

## Summary

This directly matches the naming of the `dunce` methods.
This commit is contained in:
Charlie Marsh 2024-02-28 20:44:50 -05:00 committed by GitHub
parent f315d07133
commit ef15098288
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 129 additions and 129 deletions

View file

@ -13,7 +13,7 @@ use reqwest::Client;
use reqwest::StatusCode;
use tracing::{debug, warn};
use url::Url;
use uv_fs::Normalized;
use uv_fs::Simplified;
use crate::util::retry;
use crate::FetchStrategy;
@ -170,7 +170,7 @@ impl GitRemote {
let reference = locked_ref.as_ref().unwrap_or(reference);
if let Some(mut db) = db {
fetch(&mut db.repo, self.url.as_str(), reference, strategy, client)
.with_context(|| format!("failed to fetch into: {}", into.normalized_display()))?;
.with_context(|| format!("failed to fetch into: {}", into.simplified_display()))?;
let resolved_commit_hash = match locked_rev {
Some(rev) => db.contains(rev).then_some(rev),
@ -190,7 +190,7 @@ impl GitRemote {
paths::create_dir_all(into)?;
let mut repo = init(into, true)?;
fetch(&mut repo, self.url.as_str(), reference, strategy, client)
.with_context(|| format!("failed to clone into: {}", into.normalized_display()))?;
.with_context(|| format!("failed to clone into: {}", into.simplified_display()))?;
let rev = match locked_rev {
Some(rev) => rev,
None => reference.resolve(&repo)?,