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:
@@ -8,7 +8,8 @@
|
||||
default = "gitea"
|
||||
|
||||
[registries.gitea]
|
||||
index = "<gitea-origin-url data-url="{{AppSubUrl}}/{{.PackageDescriptor.Owner.Name}}/_cargo-index.git"></gitea-origin-url>"
|
||||
index = "<gitea-origin-url data-url="sparse+{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/cargo/"></gitea-origin-url>" # Sparse index
|
||||
# index = "<gitea-origin-url data-url="{{AppSubUrl}}/{{.PackageDescriptor.Owner.Name}}/_cargo-index.git"></gitea-origin-url>" # Git
|
||||
|
||||
[net]
|
||||
git-fetch-with-cli = true</code></pre></div>
|
||||
|
Reference in New Issue
Block a user