nixpkgs/lib
Léo Gaspard 144a997c8e
lib: fix commitIdFromGitRepo (#117752)
When in the presence of worktrees, it happens that /commondir has a
trailing slash.

In these circumstances, it can lead to `lib.pathType` being passed paths
like `/foo/bar/.git/`, which in turn lead to
`error: attribute '.git' missing`.

With this change, we now make sure send properly-formatted paths to all
other functions.

This, in particular, fixes running NixOS tests on worktrees created by
libgit2 on my machine. (Worktrees created by git itself appear to not
hit the issue.)
2021-03-27 21:16:31 +01:00
..
systems Merge pull request #113212 from lopsided98/kernel-arm-fix 2021-03-21 13:22:53 -04:00
tests lib/modules: better error message if an attr-set of options is expected 2021-03-11 14:55:56 +01:00
asserts.nix lib: move assertMsg and assertOneOf to their own library file 2018-09-06 18:14:27 +02:00
attrsets.nix lib/attrsets: add cartesianProductOfSets function 2021-01-28 23:08:59 +01:00
cli.nix lib/cli: mkKey -> mkOptionName, use generators.mkValueStringDefault 2020-01-23 14:47:38 +01:00
customisation.nix lib: Create makeScopeWithSplicing 2020-11-19 00:07:14 -05:00
debug.nix lib/debug: add traceFnSeqN 2021-01-25 19:25:50 +01:00
default.nix lib/attrsets: add cartesianProductOfSets function 2021-01-28 23:08:59 +01:00
deprecated.nix lib.fake{Sri => Hash}: fix and rename 2020-05-11 23:11:12 +01:00
fetchers.nix
filesystem.nix lib: Add readTree function to filesystem 2020-10-19 16:42:21 -07:00
fixed-points.nix lib: Add composeManyExtensions 2020-11-13 21:37:57 +01:00
generators.nix Revert "lib/generators: fix toPretty throwing on (partially applied) builtins" 2021-02-01 16:27:38 +01:00
kernel.nix Merge pull request #84032 from teto/fix_kernel_merge 2020-05-22 13:32:22 +02:00
licenses.nix licenses.odbl: init at 1.0 2021-03-17 21:52:19 -04:00
lists.nix lib: remove mention of flashplayer in docs 2021-02-08 09:38:41 -08:00
meta.nix lib: implement setPrio 2018-11-22 08:59:48 +00:00
minver.nix Bump minver.nix to 2.2 2020-06-04 13:43:10 +02:00
modules.nix lib/modules: better error message if an attr-set of options is expected 2021-03-11 14:55:56 +01:00
options.nix Revert "Module-builtin assertions, disabling assertions and submodule assertions" 2020-12-18 16:44:37 +01:00
sources.nix lib: fix commitIdFromGitRepo (#117752) 2021-03-27 21:16:31 +01:00
strings-with-deps.nix lib: Use Nix's static scope checking, fix error message, optimize 2020-10-22 13:46:47 +02:00
strings.nix lib/string: drop redundant string in description of toInt. 2020-12-05 14:35:30 +00:00
trivial.nix lib: add importTOML 2020-09-12 16:37:50 +02:00
types.nix lib/types: add description for functionTo 2021-01-31 15:59:13 +01:00
versions.nix lib/versions: expose splitVersion 2019-09-26 17:42:42 +02:00
zip-int-bits.nix lib/trivial: move zipIntBits to its own file 2018-07-26 20:36:45 +02:00