lix/src/libfetchers
Bjørn Forsman edd606ae62 fetchGit: don't prefix "refs/heads/" on ref = "HEAD"
This fixes builtins.fetchGit { url = ...; ref = "HEAD"; }, that works in
stable nix (v2.3.10), but is broken in nix master:

  $ ./result/bin/nix repl
  Welcome to Nix version 2.4pre19700101_dd77f71. Type :? for help.

  nix-repl> builtins.fetchGit { url = "https://github.com/NixOS/nix"; ref = "HEAD"; }
  fetching Git repository 'https://github.com/NixOS/nix'fatal: couldn't find remote ref refs/heads/HEAD
  error: program 'git' failed with exit code 128

The documentation for builtins.fetchGit says ref = "HEAD" is the
default, so it should also be supported to explicitly pass it.

I came across this issue because poetry2nix can use ref = "HEAD" in some
situations.

Fixes #4674.
2021-03-30 11:21:38 +02:00
..
attrs.cc Fix conversion from JSON to fetch attributes 2021-01-05 02:06:25 +00:00
attrs.hh Capitalize JSON for consistency 2020-10-28 17:54:28 -05:00
cache.cc Capitalize JSON for consistency 2020-10-28 17:54:28 -05:00
cache.hh Shut up a clang warning 2020-07-03 14:50:07 +02:00
fetchers.cc Add traces to errors while updating flake lock file 2021-01-27 14:02:54 +01:00
fetchers.hh libfetchers/tarball: Lock on effectiveUrl 2021-03-02 21:56:50 +08:00
git.cc fetchGit: don't prefix "refs/heads/" on ref = "HEAD" 2021-03-30 11:21:38 +02:00
github.cc libfetchers/tarball: Lock on effectiveUrl 2021-03-02 21:56:50 +08:00
indirect.cc Remove static variable name clashes 2020-10-06 13:49:20 +02:00
local.mk StorePath: Rewrite in C++ 2020-06-16 14:28:41 +02:00
mercurial.cc Cast variants fully for libc++10 2020-12-23 23:41:58 -06:00
path.cc string2Int(): Return std::optional 2021-01-08 12:22:21 +01:00
registry.cc Use the appropriate config dir for the registry 2021-03-19 15:20:47 -04:00
registry.hh Remove TreeInfo 2020-05-30 00:44:11 +02:00
tarball.cc libfetchers/tarball: Lock on effectiveUrl 2021-03-02 21:56:50 +08:00