@@ -24,6 +24,7 @@ pub enum Error {
2424 } ,
2525}
2626
27+ /// Lifecycle
2728impl State {
2829 /// Obtain a process as defined in `driver` suitable for a given `operation. `rela_path` may be used to substitute the current
2930 /// file for use in the invoked `SingleFile` process.
@@ -40,7 +41,7 @@ impl State {
4041 let client = match self . running . remove ( process) {
4142 Some ( c) => c,
4243 None => {
43- let ( child, cmd) = spawn_driver ( process. clone ( ) ) ?;
44+ let ( child, cmd) = spawn_driver ( process. clone ( ) , & self . context ) ?;
4445 process:: Client :: handshake ( child, "git-filter" , & [ 2 ] , & [ "clean" , "smudge" , "delay" ] ) . map_err (
4546 |err| Error :: ProcessHandshake {
4647 source : err,
@@ -79,20 +80,25 @@ impl State {
7980 None => return Ok ( None ) ,
8081 } ;
8182
82- let ( child, command) = spawn_driver ( cmd) ?;
83+ let ( child, command) = spawn_driver ( cmd, & self . context ) ?;
8384 Ok ( Some ( Process :: SingleFile { child, command } ) )
8485 }
8586 }
8687 }
8788}
8889
89- fn spawn_driver ( cmd : BString ) -> Result < ( std:: process:: Child , std:: process:: Command ) , Error > {
90+ fn spawn_driver (
91+ cmd : BString ,
92+ context : & gix_command:: Context ,
93+ ) -> Result < ( std:: process:: Child , std:: process:: Command ) , Error > {
9094 let mut cmd: std:: process:: Command = gix_command:: prepare ( gix_path:: from_bstr ( cmd) . into_owned ( ) )
9195 . with_shell ( )
96+ . with_context ( context. clone ( ) )
9297 . stdin ( Stdio :: piped ( ) )
9398 . stdout ( Stdio :: piped ( ) )
9499 . stderr ( Stdio :: inherit ( ) )
95100 . into ( ) ;
101+ gix_trace:: debug!( cmd = ?cmd, "launching filter driver" ) ;
96102 let child = match cmd. spawn ( ) {
97103 Ok ( child) => child,
98104 Err ( err) => {
0 commit comments