lix/src/libexpr/primops
Maximilian Bosch 04daff94e3
libfetchers/git: restore compat with builtins.fetchGit from 2.3
Since fb38459d6e, each `ref` is appended
with `refs/heads` unless it starts with `refs/` already. This regressed
two use-cases that worked fine before:

* Specifying a commit hash as `ref`: now, if `ref` looks like a commit
  hash it will be directly passed to `git fetch`.

* Specifying a tag without `refs/tags` as prefix: now, the fetcher prepends
  `refs/*` to a ref that doesn't start with `refs/` and doesn't look
  like a commit hash. That way, both a branch and a tag specified in
  `ref` can be fetched.

  The order of preference in git is

  * file in `refs/` (e.g. `HEAD`)
  * file in `refs/tags/`
  * file in `refs/heads` (i.e. a branch)

  After fetching `refs/*`, ref is resolved the same way as git does.

Change-Id: Idd49b97cbdc8c6fdc8faa5a48bef3dec25e4ccc3
2024-09-28 14:52:06 +02:00
..
context.cc release notes: add a bunch of them 2024-05-22 21:13:56 +02:00
derivation.nix Format Nix code with nixfmt 2024-04-08 13:00:00 -07:00
fetchClosure.cc chore: rebrand Nix to Lix when it makes sense 2024-06-01 20:31:24 +02:00
fetchMercurial.cc refactor: make HashType and Base enum classes for type safety 2024-08-08 14:53:17 -07:00
fetchTree.cc libfetchers/git: restore compat with builtins.fetchGit from 2.3 2024-09-28 14:52:06 +02:00
fromTOML.cc Stop vendoring toml11 2024-03-27 21:04:00 -04:00