stop stripping project and user prefixes

This commit is contained in:
2026-05-07 01:29:07 +00:00
parent b76c650874
commit f3e765b578

View File

@@ -407,7 +407,7 @@ impl<'a> ReqResp<'a> for (Request<'a>, Response<'_>) {
self
}
}
(method, ["/", user, repo], params, _) if let Some(user) = user.strip_prefix('~') => {
(method, ["/", user, repo], params, _) if user.starts_with('~') => {
if matches!(method, GET) {
let revision = match params.as_ref().and_then(|x| x.iter().filter_map(|y| ["branch", "commit", "tag"].contains(&y.0).then(|| y)).last()) {
Some(("branch", branch)) => Some(Revision::Branch(branch.to_string())),
@@ -422,7 +422,7 @@ impl<'a> ReqResp<'a> for (Request<'a>, Response<'_>) {
self
}
}
(method, ["/", project], _, _) if let Some(project) = project.strip_prefix('+') => {
(method, ["/", project], _, _) if project.starts_with('+') => {
if matches!(method, GET) {
todo!()
} else {