lix/src/libutil
Nikola Knezevic 77007d4eab 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`.
2020-05-30 12:29:35 +02:00
..
tests tests/config.cc: add tests for Config::applyConfig 2020-05-27 17:47:18 +02:00
affinity.cc printMsg(lvlError, ...) -> printError(...) etc. 2016-09-21 16:54:53 +02:00
affinity.hh Run the daemon worker on the same CPU as the client 2013-08-07 14:02:04 +02:00
ansicolor.hh nix --help: Group commands 2020-05-05 15:18:23 +02:00
archive.cc Add O(1)-memory copyPath() function 2019-10-27 18:18:58 +01:00
archive.hh Add O(1)-memory copyPath() function 2019-10-27 18:18:58 +01:00
args.cc nix --help: Group commands 2020-05-05 15:18:23 +02:00
args.hh nix --help: Group commands 2020-05-05 15:18:23 +02:00
compression.cc Improve gzip error message 2019-12-13 19:05:26 +01:00
compression.hh Fix Brotli decompression in 'nix log' 2018-08-06 15:40:29 +02:00
config.cc config.cc: extract parts of applyConfigFile into applyConfig 2020-05-27 17:47:18 +02:00
config.hh config.hh: Add documentation 2020-05-27 17:47:18 +02:00
error.cc move implementation to cc 2020-04-15 10:09:43 -06:00
error.hh iomanip no longer needed 2020-04-16 10:48:15 -06:00
finally.hh Add missing #include 2016-11-07 14:35:47 +01:00
hash.cc Allow content-addressable paths to have references 2019-10-21 17:47:24 +02:00
hash.hh Misc changes from the flakes branch 2020-03-24 14:34:47 +01:00
istringstream_nocopy.hh Move istringstream_nocopy to a separate file 2017-03-21 14:43:03 +01:00
json.cc Make std::uncaught_exception warning less noisy 2019-10-09 23:04:11 +02:00
json.hh Make std::uncaught_exception warning less noisy 2019-10-09 23:04:11 +02:00
lazy.hh Figure out the user's home directory if $HOME is not set 2017-05-05 17:08:23 +02:00
local.mk libarchive proof of concept 2019-12-07 22:35:14 +07:00
logging.cc Revert "Merge pull request #3558 from LnL7/ssh-ng-stderr" 2020-05-06 10:54:18 +02:00
logging.hh Logger: Add method for writing to stdout 2020-04-16 18:03:38 +02:00
lru-cache.hh experimental/optional -> optional 2019-03-14 14:10:52 +01:00
monitor-fd.hh monitor-fds: Fix on macOS. 2018-02-14 18:26:37 -05:00
pool.hh RemoteStore: Close connection if an exception occurs 2018-10-16 23:36:15 +02:00
ref.hh Allow setting the state directory as a store parameter 2016-06-02 16:02:48 +02:00
rust-ffi.cc Merge branch 'libarchive' of https://github.com/yorickvP/nix 2019-12-19 14:47:18 +01:00
rust-ffi.hh Prevent uninitialized StorePath creation 2020-02-13 16:12:16 +01:00
serialise.cc experimental/optional -> optional 2019-03-14 14:10:52 +01:00
serialise.hh Remove the drain argument from readFile 2020-04-29 18:43:45 +02:00
sync.hh sync.hh: return cv_status instead of dropping it, in case useful. 2018-06-18 17:31:00 -05:00
tarfile.cc tarfile.cc: Restore timestamps 2019-12-19 15:09:54 +01:00
tarfile.hh libarchive proof of concept 2019-12-07 22:35:14 +07:00
thread-pool.cc Fix a hang in ThreadPool 2017-10-09 15:41:09 +02:00
thread-pool.hh Fix extra ; warnings involving MakeError 2019-11-10 11:24:47 -05:00
types.hh Merge branch 'error-format' of https://github.com/bburdette/nix 2020-04-22 15:29:10 +02:00
url.cc Improve ref validity checking in fetchGit 2020-05-30 12:29:35 +02:00
url.hh Improve ref validity checking in fetchGit 2020-05-30 12:29:35 +02:00
util.cc StringSink pre allocate 2020-04-29 18:44:01 +02:00
util.hh Enable baseNameOf test 2020-05-08 15:07:40 +02:00
xml-writer.cc Cleanup 2019-11-06 16:53:02 +01:00
xml-writer.hh Fix some random -Wconversion warnings 2018-05-02 13:56:34 +02:00