-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
A-gitArea: anything dealing with gitArea: anything dealing with gitA-testing-cargo-itselfArea: cargo's testsArea: cargo's testsC-bugCategory: bugCategory: bugS-acceptedStatus: Issue or feature is accepted, and has a team member available to help mentor or reviewStatus: Issue or feature is accepted, and has a team member available to help mentor or review
Description
Problem
When building rustc from a downloaded tarball (in this case, 1.40.0) that is inside a worktree of a bare git repo, Cargo will notice the .git directory and attempt to list files and die while trying.
Steps
- Download a Rust source tarball
- Unpack it and check it into a git repository
- Create a bare clone of that git repository
- Use "git worktree" to create a checkout of the bare git repository.
- Attempt to build rustc (e.g.
./x.py install)
(This obviously isn't minimized, but is the original environment in which I encountered the problem. I expect the problem would occur when trying to use a path source in any worktree.)
Possible Solution(s)
- Use
list-treebased on the current worktree rather thanlist-files - Fall back to non-git base path sources in the event of a bare repo
Notes
This is related to #4131 but actually caused our CI to start failing because the backend switched to bare repos from normal clones to save disk.
I created a separate issue because it is not restricted to cargo publish and is not just a workflow issue.
Output of cargo version: cargo 1.40.0-dev
Metadata
Metadata
Assignees
Labels
A-gitArea: anything dealing with gitArea: anything dealing with gitA-testing-cargo-itselfArea: cargo's testsArea: cargo's testsC-bugCategory: bugCategory: bugS-acceptedStatus: Issue or feature is accepted, and has a team member available to help mentor or reviewStatus: Issue or feature is accepted, and has a team member available to help mentor or review