lix/src
Maximilian Bosch 629af83b2d
Provide a more meaningful error-message for builtins.fetchGit if a revision can't be checked out
A common pitfall when using e.g. `builtins.fetchGit` is the `fatal: not
a tree object`-error when trying to fetch a revision of a git-repository
that isn't on the `master` branch and no `ref` is specified.

In order to make clear what's the problem, I added a simple check
whether the revision in question exists and if it doesn't a more
meaningful error-message is displayed:

```
nix-repl> builtins.fetchGit { url = "https://github.com/owner/myrepo"; rev = "<commit not on master>"; }
moderror: --- Error -------------------------------------------------------------------- nix
Cannot find Git revision 'bf1cc5c648e6aed7360448a3745bb2fe4fbbf0e9' in ref 'master' of repository 'https://gitlab.com/Ma27/nvim.nix'! Please make sure that the rev exists on the ref you've specified or add allRefs = true; to fetchGit.
```

Closes #2431
2020-12-22 10:46:00 +01:00
..
build-remote Lower verbosity for 'Failed to find a machine' message 2020-12-01 13:43:36 +01:00
cpptoml Revert the enum struct change 2020-06-18 22:11:26 +00:00
libexpr Merge pull request #4355 from Infinisil/private-value-type 2020-12-21 12:38:47 +01:00
libfetchers Provide a more meaningful error-message for builtins.fetchGit if a revision can't be checked out 2020-12-22 10:46:00 +01:00
libmain Ask for confirmation before allowing flake Nix configuration settings 2020-11-26 12:37:23 +01:00
libstore Overhaul store subclassing 2020-12-20 15:47:14 +00:00
libutil Add lvlNotice log level 2020-12-10 16:41:24 +01:00
nix Replace Value type setters with mk* functions 2020-12-18 21:48:22 +01:00
nix-build nix-build: Fix #4197 output order regression 2020-11-13 17:49:27 +01:00
nix-channel Remove static variable name clashes 2020-10-06 13:49:20 +02:00
nix-collect-garbage Remove static variable name clashes 2020-10-06 13:49:20 +02:00
nix-copy-closure Remove static variable name clashes 2020-10-06 13:49:20 +02:00
nix-daemon Remove static variable name clashes 2020-10-06 13:49:20 +02:00
nix-env Rename Value::normalType() -> Value::type() 2020-12-17 14:45:45 +01:00
nix-instantiate Split out local-fs-store.hh 2020-10-09 20:18:08 +00:00
nix-prefetch-url Remove static variable name clashes 2020-10-06 13:49:20 +02:00
nix-store Allow substituting paths when building remotely using ssh-ng:// 2020-11-05 20:12:37 +01:00
resolve-system-dependencies lstat() cleanup 2020-09-23 19:17:28 +02:00