File tree Expand file tree Collapse file tree 1 file changed +4
-14
lines changed
Expand file tree Collapse file tree 1 file changed +4
-14
lines changed Original file line number Diff line number Diff line change 11use std:: collections:: HashMap ;
2+ use std:: io;
23use std:: process:: { Child , Command , Stdio } ;
3- use std:: { fmt, io} ;
44
55use log:: debug;
66
77use crate :: { paramparsing, Operation } ;
88
9- #[ derive( Debug , Clone ) ]
10- struct InvalidHelper ;
11-
12- impl fmt:: Display for InvalidHelper {
13- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
14- write ! ( f, "Invalid credential helper name" )
15- }
16- }
17- impl std:: error:: Error for InvalidHelper { }
18-
199fn spawn_helper ( helper : & str , operation : Operation ) -> io:: Result < Child > {
20- let helpercmd = helper. trim_matches ( '\'' ) ;
10+ let helpercmd = helper. trim ( ) ;
2111 let helpercmd = if helpercmd. starts_with ( '/' ) {
22- String :: from ( helper )
12+ String :: from ( helpercmd )
2313 } else {
24- format ! ( "git credential-{}" , helper )
14+ format ! ( "git credential-{}" , helpercmd )
2515 } ;
2616
2717 debug ! ( "Running credential helper '{}'" , helpercmd) ;
You can’t perform that action at this time.
0 commit comments