1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

add sparse url in cargo package guide (#26937)

Hello,

The current package guide for cargo gives you only the git index, with
the HTTP Index stabilized being used as default for crates.io and being
better for most use-cases.

However, it's not documented that gitea supports the sparse spec, and it
does not require the _crates-index git repo for the sparse api.

I personally think we should push users to use the sparse instead of the
git repository. (Even let users disable crates-index repos if they only
want to use sparse)
This commit is contained in:
merlleu
2023-09-13 06:14:10 +02:00
committed by GitHub
parent aaeec2a392
commit e6a059a3d0
3 changed files with 14 additions and 5 deletions

View File

@@ -50,7 +50,8 @@ Cargo 将可用软件包的信息存储在一个存储在 git 仓库中的软件
default = "gitea"
[registries.gitea]
index = "https://gitea.example.com/{owner}/_cargo-index.git"
index = "sparse+https://gitea.example.com/api/packages/{owner}/cargo/" # Sparse index
# index = "https://gitea.example.com/{owner}/_cargo-index.git" # Git
[net]
git-fetch-with-cli = true