summaryrefslogtreecommitdiffstats
path: root/tests/local.mk
diff options
context:
space:
mode:
authorNikola Knezevic <nikola@knezevic.ch>2020-05-30 12:29:35 +0200
committerNikola Knezevic <nikola@knezevic.ch>2020-05-30 12:29:35 +0200
commit77007d4eabcf7090d1d3fbbdf84a67fb2262cf78 (patch)
tree9425b3eea2f7c0557db09380a9fed7e848f6e228 /tests/local.mk
parentf60ce4fa207a210e23a1142d3a8ead611526e6e1 (diff)
Improve ref validity checking in fetchGit
The previous regex was too strict and did not match what git was allowing. It could lead to `fetchGit` not accepting valid branch names, even though they exist in a repository (for example, branch names containing `/`, which are pretty standard, like `release/1.0` branches). The new regex defines what a branch name should **NOT** contain. It takes the definitions from `refs.c` in https://github.com/git/git and `git help check-ref-format` pages. This change also introduces a test for ref name validity checking, which compares the result from Nix with the result of `git check-ref-format --branch`.
Diffstat (limited to 'tests/local.mk')
-rw-r--r--tests/local.mk1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/local.mk b/tests/local.mk
index 56e5640ca..536661af8 100644
--- a/tests/local.mk
+++ b/tests/local.mk
@@ -18,6 +18,7 @@ nix_tests = \
nar-access.sh \
structured-attrs.sh \
fetchGit.sh \
+ fetchGitRefs.sh \
fetchGitSubmodules.sh \
fetchMercurial.sh \
signing.sh \