Open
Description
Extracted from #14265.
zig build
could notice from .git/config
, if it exists, that a particular remote's URL matches the URL used from the build.zig.lulz file.
For example,
.git/config
[remote "origin"]
url = git@github.com:ziglang/zig.git
fetch = +refs/heads/*:refs/remotes/origin/*
build.zig.lulz
.{
// ...
.url = "git+ssh://git@github.com:ziglang/zig.git#3ab43988c1cc5e22c84faccd1816df6e8094d9a3",
// ...
}
Zig should be able to conclude that the requested url is the same url as the git clone that contains the build.zig.lulz file itself, and thereby search for the ref 3ab43988c1cc5e22c84faccd1816df6e8094d9a3
in the local clone rather than the network.
Related:
- ability to specify additional build dependency mirrors that affect any package in the full dependency tree #14292
- ability to fetch dependencies via git+ssh protocol #14295
If the ref could not be found in the local clone, an error should be emitted, rather than trying to do any fetching on the user's behalf. The error message could suggest a command to run however, for example, git fetch origin --tags
.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Fetching