lix/src/libfetchers
Maximilian Bosch cf9f33995b
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
2020-07-13 19:22:59 +02:00
..
attrs.cc
attrs.hh
cache.cc
cache.hh Shut up a clang warning 2020-07-03 14:50:07 +02:00
fetchers.cc Revert the enum struct change 2020-06-18 22:11:26 +00:00
fetchers.hh
git.cc Support building flakes from a shallow Git repo 2020-07-01 14:57:59 +02:00
github.cc Fix gitlab-fetcher to obtain tags and branches 2020-07-13 19:22:59 +02:00
indirect.cc
local.mk
mercurial.cc Revert the enum struct change 2020-06-18 22:11:26 +00:00
path.cc Revert the enum struct change 2020-06-18 22:11:26 +00:00
registry.cc Add --inputs-from to use flake inputs as registry entries 2020-07-01 20:25:13 +02:00
registry.hh
tarball.cc Merge remote-tracking branch 'origin/master' into flakes 2020-06-26 08:46:46 +02:00