fn exec(args: &[&str]) -> Result<String> {
    debug!("git {}", args.join(" "));
    let s = Command::new("git").args(args).output()?;
    if !s.status.success() {
        bail!("Subprocess failure from git: {}", s.status.code().unwrap_or(1001))
    }
    let out: String = String::from_utf8_lossy(&s.stdout).into();
    let err: String = String::from_utf8_lossy(&s.stderr).into();
    if !err.is_empty() {
        warn!("{} stderr: {}", args.join(" "), err);
    }
    debug!("{}", out);
    Ok(out)
}
// Dumb git wrapper that validates output or bails
Dumb git wrapper that validates output or bails
Dumb git wrapper that validates output or bails
fn exec(args: &[&str]) -> Result<String> {
    debug!("git {}", args.join(" "));
    let s = Command::new("git").args(args).output()?;
    if !s.status.success() {
        bail!("Subprocess failure from git: {}", s.status.code().unwrap_or(1001))
    }
    let out: String = String::from_utf8_lossy(&s.stdout).into();
    let err: String = String::from_utf8_lossy(&s.stderr).into();
    if !err.is_empty() {
        warn!("{} stderr: {}", args.join(" "), err);
    }
    debug!("{}", out);
    Ok(out)
}
fn exec ( args : & [ & str ] ) -> Result < String > { debug ! ( " " args join ( " " ) ) ; let s = Command :: new ( " " ) . args ( args ) . output ( ) ? ; if ! s . status . success ( ) { bail ! ( " " s status code ( ) unwrap_or ( 1001 ) ) } let out : String = String :: from_utf8_lossy ( & s . stdout ) . into ( ) ; let err : String = String :: from_utf8_lossy ( & s . stderr ) . into ( ) ; if ! err . is_empty ( ) { warn ! ( " " args join ( " " ) err ) ; } debug ! ( " " out ) ; Ok ( out ) }
Dumb git wrapper that validates output or bails
Dumb git wrapper that validates output or bails
args
&[&str]
args
&[&str]