Add missing git feature dep to preserve_executable_bit test#12850
Add missing git feature dep to preserve_executable_bit test#12850charliermarsh merged 1 commit intoastral-sh:mainfrom
Conversation
Without the `git` feature, it fails with: ``` error: Failed to initialize Git repository at `/home/mgorny/.local/share/uv/tests/.tmp01wGGK/temp/preserve_executable_bit` stdout: stderr: error: `git` operations are not allowed — are you missing a cfg for the `git` feature? ```
|
@konstin -- Do you know why this test uses Git? I think |
|
We first check if we are in a git repository in Can we rely on errors such as |
|
But doesn't "init a Git repo" return |
|
Our shims put a First we take the uv/crates/uv-configuration/src/vcs.rs Line 97 in 0c801f8 But that was a check for an existing git repo, so we ignore it: uv/crates/uv/src/commands/project/init.rs Line 1203 in 42dcea0 When we finally initialize the repo, we can run the git shim, but it errors on execution: uv/crates/uv-configuration/src/vcs.rs Line 52 in 0c801f8 If we want to handle this better, we should find a way to better tell apart "there is no git repo" (this is fine) from "git errored" (don't use git at all) in the first check. |
|
I tried to make this more resilient: #12895 |
Summary
Without the
gitfeature, it fails with:Test Plan