diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2020-07-13 19:22:59 +0200 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2020-07-13 19:22:59 +0200 |
commit | cf9f33995bb0e992b84ade84b3ffa659eab1a9d8 (patch) | |
tree | d718315073f7470e2093250e68a18c7bcdc9634e /src/nix-store/dotgraph.cc | |
parent | 9223603908abaa62711296aa224e1bc3d7fb0a91 (diff) |
Fix gitlab-fetcher to obtain tags and branches
Until now, the `gitlab`-fetcher determined the source's rev by checking
the latest commit of the given `ref` using the
`/repository/branches`-API.
This breaks however when trying to fetch a gitlab-repo by its tag:
```
$ nix repl
nix-repl> builtins.fetchTree gitlab:Ma27/nvim.nix/0.2.0
error: --- Error ------------------------------------------------------------------------------------- nix
unable to download 'https://gitlab.com/api/v4/projects/Ma27%2Fnvim.nix/repository/branches/0.2.0': HTTP error 404 ('')
```
When using the `/commits?ref_name`-endpoint[1] you can pass any kind of
valid ref to the `gitlab`-fetcher.
Please note that this fetches the only first 20 commits on a ref,
unfortunately there's currently no endpoint which only retrieves the
latest commit of any kind of `ref`.
[1] https://docs.gitlab.com/ee/api/commits.html#list-repository-commits
Diffstat (limited to 'src/nix-store/dotgraph.cc')
0 files changed, 0 insertions, 0 deletions