From b13e6a76b4f289c6db69ffaa7bd35b7e44f2a391 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sat, 27 Jan 2024 11:19:05 +0100 Subject: [PATCH] parseStorePath: Support leading period --- doc/manual/rl-next/leading-period.md | 10 ++++++++++ tests/unit/libstore/path.cc | 1 + 2 files changed, 11 insertions(+) create mode 100644 doc/manual/rl-next/leading-period.md diff --git a/doc/manual/rl-next/leading-period.md b/doc/manual/rl-next/leading-period.md new file mode 100644 index 000000000..e9a32a74a --- /dev/null +++ b/doc/manual/rl-next/leading-period.md @@ -0,0 +1,10 @@ +--- +synopsis: Store paths are allowed to start with `.` +issues: 912 +prs: 9867 9091 9095 9120 9121 9122 9130 9219 9224 +--- + +Leading periods were allowed by accident in Nix 2.4. The Nix team has considered this to be a bug, but this behavior has since been relied on by users, leading to unnecessary difficulties. +From now on, leading periods are officially, definitively supported. + +Nix versions that denied leading periods are documented [in the issue](https://github.com/NixOS/nix/issues/912#issuecomment-1919583286). diff --git a/tests/unit/libstore/path.cc b/tests/unit/libstore/path.cc index 5485ab8bb..f7b69d5f9 100644 --- a/tests/unit/libstore/path.cc +++ b/tests/unit/libstore/path.cc @@ -62,6 +62,7 @@ TEST_DO_PARSE(underscore, "foo_bar") TEST_DO_PARSE(period, "foo.txt") TEST_DO_PARSE(question_mark, "foo?why") TEST_DO_PARSE(equals_sign, "foo=foo") +TEST_DO_PARSE(dotfile, ".gitignore") #undef TEST_DO_PARSE