Skip to content

Why does cargo need to download git dependencies completely? #14687

Closed
@silence-coding

Description

@silence-coding

Problem

Why does cargo need to download git dependencies completely?

(base) [root@x86 ~]#  cargo check

    Updating git repository `https://code.com/base/cbb-rs.git`
remote: Enumerating objects: 935, done.
remote: Counting objects: 100% (40/40), done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 935 (delta 35), reused 30 (delta 30), pack-reused 895 (from 1)
Receiving objects: 100% (935/935), 239.33 KiB | 633.00 KiB/s, done.
Resolving deltas: 100% (346/346), done.
From https://code.com/base/cbb-rs
 * [new branch]      1.x       -> origin/1.x
 * [new branch]      2.x        -> origin/2.x
 * [new branch]      master                       -> origin/master
 * [new ref]                                      -> origin/HEAD
 * [new tag]         1.0.0                        -> 1.0.0
 * [new tag]         1.0.1                        -> 1.0.1
 * [new tag]         1.0.10                       -> 1.0.10
 * [new tag]         1.0.2                        -> 1.0.2
 * [new tag]         1.0.3                        -> 1.0.3
 * [new tag]         1.0.6                        -> 1.0.6
 * [new tag]         1.0.8                        -> 1.0.8
 * [new tag]         1.0.9                        -> 1.0.9
 * [new tag]         2.0.0                        -> 2.0.0
 * [new tag]         2.0.1                        -> 2.0.1
 * [new tag]         2.0.2                        -> 2.0.2
 * [new tag]         2.0.3                        -> 2.0.3
 * [new tag]         2.0.4                        -> 2.0.4
 * [new tag]         2.0.5                        -> 2.0.5
 * [new tag]         2.0.6                        -> 2.0.6
 * [new tag]         2.0.7                        -> 2.0.7
 * [new tag]         2.0.8                        -> 2.0.8
 * [new tag]         2.0.9                        -> 2.0.9
 * [new tag]         2.1.0                        -> 2.1.0

Proposed Solution

Set depth=1 when git is used for download.

Notes

No response

Metadata

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