Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions patches/20260212-43a3f3aaf2-url-escape-keyUrls.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/Remote/Git.hs b/Remote/Git.hs
index 6b7dc77d98..4faaea082d 100644
--- a/Remote/Git.hs
+++ b/Remote/Git.hs
@@ -482,7 +482,12 @@ inAnnex' repo rmt st@(State connpool duc _ _ _ _) key
keyUrls :: GitConfig -> Git.Repo -> Remote -> Key -> [String]
keyUrls gc repo r key = map tourl locs'
where
- tourl l = Git.repoLocation repo ++ "/" ++ l
+ tourl l = Git.repoLocation repo ++ "/" ++ escapeURIString escchar l
+ -- Escape characters that are not allowed unescaped in a URI
+ -- path component, but don't escape '/' since the location
+ -- is a path with multiple components.
+ escchar '/' = True
+ escchar c = isUnescapedInURIComponent c
-- If the remote is known to not be bare, try the hash locations
-- used for non-bare repos first, as an optimisation.
locs
Loading