Index: use a bare repository rather than a non-bare repository without checkout · Issue #9503 · rust-lang/cargo (original) (raw)

Ever since #4015 , Cargo avoids checking out the index as a working directory; however, cargo still creates the repository as a non-bare repository with a working directory that just doesn't have any files checked out.

Ideally, I'd love to store this as a bare repository instead, where git doesn't expect to have a working directory.

This would have a few advantages:

(This was discussed briefly in a Cargo team meeting; I'm filing this issue as a follow-up.)

If we don't worry about a one-time re-download of the index, we could solve this by just switching to a bare repository.