File tree 3 files changed +14
-8
lines changed
3 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ mod error {
17
17
} ,
18
18
}
19
19
}
20
- use crate :: bstr:: ByteVec ;
20
+ use crate :: bstr:: { ByteSlice , ByteVec } ;
21
21
pub use error:: Error ;
22
22
23
23
impl Snapshot < ' _ > {
@@ -45,14 +45,17 @@ impl Snapshot<'_> {
45
45
match section. header ( ) . subsection_name ( ) {
46
46
Some ( _) => { }
47
47
None => {
48
- for value in section. values ( "helper" ) {
48
+ for value in section. values ( "helper" ) . into_iter ( ) . filter ( |v| !v . trim ( ) . is_empty ( ) ) {
49
49
programs. push ( git_credentials:: Program :: from_custom_definition ( value. into_owned ( ) ) ) ;
50
50
}
51
51
if let Some ( Some ( user) ) = ( !url_had_user_initially) . then ( || {
52
- section. value ( "username" ) . and_then ( |n| {
53
- let n: Vec < _ > = Cow :: into_owned ( n) . into ( ) ;
54
- n. into_string ( ) . ok ( )
55
- } )
52
+ section
53
+ . value ( "username" )
54
+ . filter ( |n| !n. trim ( ) . is_empty ( ) )
55
+ . and_then ( |n| {
56
+ let n: Vec < _ > = Cow :: into_owned ( n) . into ( ) ;
57
+ n. into_string ( ) . ok ( )
58
+ } )
56
59
} ) {
57
60
url. set_user ( Some ( user) ) ;
58
61
}
Original file line number Diff line number Diff line change @@ -199,8 +199,8 @@ git clone --shared base credential-helpers
199
199
} >> baseline.git
200
200
}
201
201
202
- git config credential.helper ' '
203
- git config credential.helper global
202
+ git config credential.helper " "
203
+ git config --add credential.helper global
204
204
git config credential.https://example.com:8080.helper example-with-port
205
205
git config credential.https://example.com:8080/path.helper example-with-port-and-path
206
206
git config credential.https://example.com:8080/path.usehttppath 1
Original file line number Diff line number Diff line change @@ -317,6 +317,9 @@ fn scripted_fixture_repo_read_only_with_args_inner(
317
317
. stderr ( std:: process:: Stdio :: piped ( ) )
318
318
. current_dir ( & script_result_directory)
319
319
. env_remove ( "GIT_DIR" )
320
+ . env_remove ( "GIT_ASKPASS" )
321
+ . env_remove ( "SSH_ASKPASS" )
322
+ . env ( "GIT_TERMINAL_PROMPT" , "false" )
320
323
. env ( "GIT_AUTHOR_DATE" , "2000-01-01 00:00:00 +0000" )
321
324
. env ( "GIT_AUTHOR_EMAIL" , "author@example.com" )
322
325
. env ( "GIT_AUTHOR_NAME" , "author" )
You can’t perform that action at this time.
0 commit comments