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
attrsets.nix
cli.nix
customisation.nix
debug.nix
default.nix
deprecated.nix
fetchers.nix
filesystem.nix
fixed-points.nix
generators.nix
kernel.nix
licenses.nix licenses.odbl: init at 1.0 2021-03-17 21:52:19 -04:00
lists.nix
meta.nix
minver.nix
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
sources.nix lib: fix commitIdFromGitRepo (#117752) 2021-03-27 21:16:31 +01:00
strings-with-deps.nix
strings.nix
trivial.nix
types.nix
versions.nix
zip-int-bits.nix