Skip to content

[Backport 2.21-maintenance] libutil/url: fix git+file:./ parse error#10845

Merged
roberth merged 1 commit into2.21-maintenancefrom
backport-9897-to-2.21-maintenance
Jun 4, 2024
Merged

[Backport 2.21-maintenance] libutil/url: fix git+file:./ parse error#10845
roberth merged 1 commit into2.21-maintenancefrom
backport-9897-to-2.21-maintenance

Conversation

@github-actions
Copy link
Copy Markdown

@github-actions github-actions bot commented Jun 4, 2024

Automatic backport to 2.21-maintenance, triggered by a label in #9897.

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 8594f3c)
@github-actions github-actions bot requested a review from edolstra as a code owner June 4, 2024 08:27
@roberth roberth closed this Jun 4, 2024
@roberth roberth reopened this Jun 4, 2024
@roberth roberth enabled auto-merge June 4, 2024 08:46
@roberth roberth merged commit 46b6cfb into 2.21-maintenance Jun 4, 2024
@roberth roberth deleted the backport-9897-to-2.21-maintenance branch June 4, 2024 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants