mirror of
https://github.com/astral-sh/uv.git
synced 2025-11-03 05:03:46 +00:00
Previously, we were always asking Cargo to rebuild `uv-cli` if `.git/HEAD` had changed. But in a worktree, `.git` is a file, not a directory. And the file contains the path to git's internal worktree state, which also has its own `HEAD` file. So in the case of a worktree, we read the file and tell Cargo to watch the worktree-specific `HEAD` file instead of `.git/head`. The main thing this fixes is that, previously, in a worktree, `cargo build` would *always* re-compile `uv` even if nothing changed. This doesn't impact or fix anything in "typical" clones of uv though. Only in worktrees. Closes #6196, Closes #6197 |
||
|---|---|---|
| .. | ||
| src | ||
| build.rs | ||
| Cargo.toml | ||