@@ -149,7 +149,7 @@ impl GitRepository {
149
149
ProcessBuilder :: new ( "git" )
150
150
. arg ( "rev-parse" )
151
151
. cwd ( path)
152
- . exec_with_streaming ( & mut silent , & mut silent , true ) ?;
152
+ . exec_with_output ( ) ?;
153
153
154
154
Ok ( GitRepository {
155
155
path : path. to_path_buf ( ) ,
@@ -168,7 +168,7 @@ impl GitRepository {
168
168
ProcessBuilder :: new ( "git" )
169
169
. arg ( "init" )
170
170
. cwd ( path)
171
- . exec_with_streaming ( & mut silent , & mut silent , true ) ?;
171
+ . exec_with_output ( ) ?;
172
172
173
173
Ok ( GitRepository {
174
174
path : path. to_path_buf ( ) ,
@@ -181,7 +181,7 @@ impl GitRepository {
181
181
. arg ( "rev-parse" )
182
182
. arg ( refname)
183
183
. cwd ( & self . path )
184
- . exec_with_streaming ( & mut silent , & mut silent , true ) ?;
184
+ . exec_with_output ( ) ?;
185
185
186
186
let mut result = String :: from_utf8 ( result. stdout ) ?;
187
187
result. truncate ( result. trim_end ( ) . len ( ) ) ;
@@ -289,7 +289,7 @@ impl GitDatabase {
289
289
. arg ( "--short" )
290
290
. arg ( revision. as_str ( ) )
291
291
. cwd ( & self . repo . path )
292
- . exec_with_streaming ( & mut silent , & mut silent , true ) ?;
292
+ . exec_with_output ( ) ?;
293
293
294
294
let mut result = String :: from_utf8 ( output. stdout ) ?;
295
295
result. truncate ( result. trim_end ( ) . len ( ) ) ;
@@ -369,7 +369,7 @@ impl GitCheckout {
369
369
// have a HEAD checked out.
370
370
. arg ( database. repo . path . simplified_display ( ) . to_string ( ) )
371
371
. arg ( into. simplified_display ( ) . to_string ( ) )
372
- . exec_with_streaming ( & mut silent , & mut silent , true ) ?;
372
+ . exec_with_output ( ) ?;
373
373
374
374
let repo = GitRepository :: open ( into) ?;
375
375
let checkout = GitCheckout :: new ( revision, repo) ;
@@ -412,7 +412,7 @@ impl GitCheckout {
412
412
. arg ( "--hard" )
413
413
. arg ( self . revision . as_str ( ) )
414
414
. cwd ( & self . repo . path )
415
- . exec_with_streaming ( & mut silent , & mut silent , true ) ?;
415
+ . exec_with_output ( ) ?;
416
416
417
417
paths:: create ( ok_file) ?;
418
418
Ok ( ( ) )
@@ -426,7 +426,7 @@ impl GitCheckout {
426
426
. arg ( "--recursive" )
427
427
. arg ( "--init" )
428
428
. cwd ( & self . repo . path )
429
- . exec_with_streaming ( & mut silent , & mut silent , true )
429
+ . exec_with_output ( )
430
430
. map ( drop)
431
431
}
432
432
}
@@ -608,13 +608,7 @@ fn fetch_with_cli(
608
608
// We capture the output to avoid streaming it to the user's console during clones.
609
609
// The required `on...line` callbacks currently do nothing.
610
610
// The output appears to be included in error messages by default.
611
- cmd. exec_with_streaming ( & mut silent, & mut silent, true ) ?;
612
- Ok ( ( ) )
613
- }
614
-
615
- /// Callback used with `exec_with_streaming` that silences the output.
616
- #[ allow( clippy:: unnecessary_wraps) ]
617
- fn silent ( _: & str ) -> Result < ( ) > {
611
+ cmd. exec_with_output ( ) ?;
618
612
Ok ( ( ) )
619
613
}
620
614
0 commit comments