History

improve path normalization; a new ignored test (#450)

Sebastian Thiel committed 4 years ago

Commit ece5a3f1 parent 5e260da3 files · +27 −3Browse files

Showing the changes to git-credentials/src/program (1 of 3 files). Show all

Unified · Split

git-credentials/src/program/cascade.rs+3−1
@@ -1,6 +1,7 @@
1use crate::helper::Action;1use crate::helper::Action;
2use crate::program::Cascade;2use crate::program::Cascade;
3use crate::{helper, protocol, Program};3use crate::{helper, protocol, Program};
4use bstr::ByteSlice;
4 5
5/// Initialization6/// Initialization
6impl Cascade {7impl Cascade {
@@ -52,7 +53,8 @@ impl Cascade { · 45 unmodified lines
52 }53 }
53 host54 host
54 });55 });
55 ctx.path = if url.path == "/" { None } else { url.path.into() };56 let path = url.path.trim_with(|b| b == '/');
57 ctx.path = (!path.is_empty()).then(|| path.into());
56 Some(ctx.clone())58 Some(ctx.clone())
57 }59 }
58 _ => None,60 _ => None,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t