Skip to content

Index: use a bare repository rather than a non-bare repository without checkout #9503

Open
@joshtriplett

Description

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:

  • Git tools would understand the repository better, making it easier to explore and understand and debug.
  • Tools that want to check .cargo into git (for caching or testing or other purposes) would be able to do so; git can track a repo.git bare repository, but cannot track a .git directory.

(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.

Metadata

Assignees

No one assigned

    Labels

    A-gitArea: anything dealing with gitC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-triageStatus: This issue is waiting on initial triage.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions