1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-15 06:52:43 +01:00
nix/src/libutil
Bryan Lai c45b2b06d0 libutil/url: fix git+file:./ parse error
Previously, the "file:./" prefix was not correctly recognized in
fixGitURL; instead, it was mistaken as a file path, which resulted in a
parsed url of the form "file://file:./".

This commit fixes the issue by properly detecting the "file:" prefix.
Note, however, that unlike "file://", the "file:./" URI is _not_
standardized, but has been widely used to referred to relative file
paths. In particular, the "git+file:./" did work for nix<=2.18, and was
broken since nix 2.19.0.

Finally, this commit fixes the issue completely for the 2.19 series, but
is still inadequate for the 2.20 series due to new behaviors from the
switch to libgit2. However, it does improve the correctness of parsing
even though it is not yet a complete solution.

(cherry picked from commit 8594f3cd5a)
2024-06-04 08:27:08 +00:00
..
args Fix nix shebang interaction with #8131 overhaul completions 2023-11-07 13:24:01 -05:00
abstract-setting-to-json.hh Make toJSONObject const 2023-11-06 16:00:25 +01:00
ansicolor.hh Finish converting existing comments for internal API docs (#8146) 2023-04-07 13:55:28 +00:00
archive.cc Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
archive.hh Make ParseSink a bit better 2023-11-01 02:36:43 -04:00
args.cc Shebang parser: add virtual destructor 2023-11-19 01:48:08 +01:00
args.hh parseShebangs: Make strings with backtick sequences representable 2023-11-07 13:24:01 -05:00
callback.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
canon-path.cc Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
canon-path.hh Merge remote-tracking branch 'upstream/master' into source-path 2023-04-17 11:41:50 +02:00
cgroup.cc Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
cgroup.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
chunked-vector.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
closure.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
comparator.hh Allow dynamic derivation deps in inputDrvs 2023-09-07 10:39:37 -04:00
compression.cc Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
compression.hh Rename and protect BufferedSink::write 2023-04-07 09:21:50 +02:00
compute-levels.cc Add x86_64 compute levels as additional system types 2021-02-22 09:11:15 +01:00
compute-levels.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
config-impl.hh Fix moves in appendOrSet 2023-11-06 16:00:25 +01:00
config.cc Fixup docs 2023-11-09 07:08:56 +01:00
config.hh Make toJSONObject const 2023-11-06 16:00:25 +01:00
current-process.cc Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
current-process.hh Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
environment-variables.cc Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
environment-variables.hh Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
error.cc Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
error.hh traces: Do not print unknown location 2023-09-03 13:44:32 +02:00
experimental-features.cc reword description for the fetch-tree experimental feature 2023-12-04 16:56:46 +01:00
experimental-features.hh Git object hashing in libutil 2023-11-10 11:02:44 -05:00
file-descriptor.cc Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
file-descriptor.hh Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
file-system.cc Copy the output of fixed-output derivations before registering them 2024-03-01 09:43:42 +01:00
file-system.hh Copy the output of fixed-output derivations before registering them 2024-03-01 09:43:42 +01:00
finally.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
fmt.hh fmt(): Handle std::string_view 2023-11-01 16:33:22 +01:00
fs-sink.cc Make ParseSink a bit better 2023-11-01 02:36:43 -04:00
fs-sink.hh Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
git.cc Git object hashing in libutil 2023-11-10 11:02:44 -05:00
git.hh Git object hashing in libutil 2023-11-10 11:02:44 -05:00
hash.cc Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
hash.hh Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
hilite.cc Fix incorrect comment in hiliteMatches 2022-06-05 20:30:18 +02:00
hilite.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
json-impls.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
json-utils.cc Fix derivation load assertion errors 2023-08-05 01:34:30 +02:00
json-utils.hh Fix derivation load assertion errors 2023-08-05 01:34:30 +02:00
local.mk Overhaul completions, redo #6693 (#8131) 2023-10-23 15:03:11 +02:00
logging.cc Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
logging.hh Finish converting existing comments for internal API docs (#8146) 2023-04-07 13:55:28 +00:00
lru-cache.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
memory-source-accessor.cc Create MemorySink 2023-11-10 11:02:37 -05:00
memory-source-accessor.hh Create MemorySink 2023-11-10 11:02:37 -05:00
monitor-fd.hh Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
namespaces.cc Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
namespaces.hh Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
pool.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
posix-source-accessor.cc Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
posix-source-accessor.hh SourceAccessor: Change the main interface from lstat() to maybeLstat() 2023-11-01 15:26:07 +01:00
processes.cc Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
processes.hh Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
ref.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
references.cc Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
references.hh Don't assume the type of string::size_type 2023-06-15 21:24:14 +02:00
regex-combinators.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
serialise.cc Use BackedStringView 2024-01-19 10:14:17 +01:00
serialise.hh Use BackedStringView 2024-01-19 10:14:17 +01:00
signals.cc Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
signals.hh Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
source-accessor.cc Merge FSAccessor into SourceAccessor 2023-11-01 17:09:28 +01:00
source-accessor.hh Merge FSAccessor into SourceAccessor 2023-11-01 17:09:28 +01:00
split.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
suggestions.cc Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
suggestions.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
sync.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
tarfile.cc Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
tarfile.hh TarArchive: Remove a duplicate constant and increase the buffer size 2023-04-25 16:43:10 +02:00
terminal.cc Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
terminal.hh Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
thread-pool.cc Make some more threads receive interrupts 2024-01-04 16:06:41 +00:00
thread-pool.hh Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
topo-sort.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
types.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
unix-domain-socket.cc Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
unix-domain-socket.hh Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
url-parts.hh schemeRegex -> schemeNameRegex 2023-12-13 21:09:22 +01:00
url.cc libutil/url: fix git+file:./ parse error 2024-06-04 08:27:08 +00:00
url.hh isValidSchemeName: Add function 2023-12-13 21:08:13 +01:00
users.cc Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
users.hh Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
util.cc nix: Reserve shebang line syntax and only parse double backtick quotes 2023-11-07 13:24:01 -05:00
util.hh nix: Reserve shebang line syntax and only parse double backtick quotes 2023-11-07 13:24:01 -05:00
variant-wrapper.hh Fixing #7479 2023-08-18 11:44:00 -04:00
xml-writer.cc xml-writer: Remove std aliases 2022-02-25 16:13:02 +01:00
xml-writer.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00