uv/crates/uv-git/src
Charlie Marsh 00fc44012c
Use relative paths for user display (#2559)
## Summary

This PR changes our user-facing representation for paths to use relative
paths, when the path is within the current working directory. This
mirrors what we do in Ruff. (If the path is _outside_ the current
working directory, we print an absolute path.)

Before:

```shell
❯ uv venv .venv2
Using Python 3.12.2 interpreter at: /Users/crmarsh/workspace/uv/.venv/bin/python3
Creating virtualenv at: .venv2
Activate with: source .venv2/bin/activate
```

After:

```shell
❯ cargo run venv .venv2
    Finished dev [unoptimized + debuginfo] target(s) in 0.15s
     Running `target/debug/uv venv .venv2`
Using Python 3.12.2 interpreter at: .venv/bin/python3
Creating virtualenv at: .venv2
Activate with: source .venv2/bin/activate
```

Note that we still want to use the existing `.simplified_display()`
anywhere that the path is being simplified, but _still_ intended for
machine consumption (e.g., when passing to `.current_dir()`).
2024-03-20 09:52:50 -04:00
..
util Clippy pedantic (#1963) 2024-02-25 14:04:05 -05:00
git.rs Use relative paths for user display (#2559) 2024-03-20 09:52:50 -04:00
known_hosts.rs Clippy pedantic (#1963) 2024-02-25 14:04:05 -05:00
lib.rs Retain passwords in Git URLs (#1717) 2024-02-21 00:12:56 +00:00
sha.rs Rename to uv (#1302) 2024-02-15 11:19:46 -06:00
source.rs Remove spawn_blocking from version map (#1966) 2024-02-26 09:44:24 +00:00