mirror of
https://github.com/NixOS/nix.git
synced 2025-12-21 16:31:07 +01:00
libfetchers/git-utils: Be more correct about validating refnames
Turns out there's a much better API for this that doesn't have the footguns of the previous method. isLegalRefName is somewhat of a misnomer, since it's mainly used to validate user inputs that can be either references, branch names, psedorefs or tags.
This commit is contained in:
parent
959c244a12
commit
5d1178b817
4 changed files with 29 additions and 45 deletions
|
|
@ -59,6 +59,9 @@ invalid_ref() {
|
|||
}
|
||||
|
||||
|
||||
valid_ref 'A/b'
|
||||
valid_ref 'AaA/b'
|
||||
valid_ref 'FOO/BAR/BAZ'
|
||||
valid_ref 'foox'
|
||||
valid_ref '1337'
|
||||
valid_ref 'foo.baz'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue