pub async fn values_vs_git(svc: &str, conf: &Config, region: &Region) -> Result<bool> {
    let after = as_yaml(&svc, conf, region).await?;

    // move git to get before state:
    let merge_base = git::merge_base()?;
    git::checkout(&merge_base)?;

    let needs_stash = git::needs_stash();
    if needs_stash {
        git::stash_push()?;
    }

    // compute before state
    let (before_conf, before_region) = Config::new(ConfigState::Base, &region.name).await?;
    let before = as_yaml(&svc, &before_conf, &before_region).await?;

    // move git back
    if needs_stash {
        git::stash_pop()?;
    }
    git::checkout("-")?;

    // display diff
    shell_diff(&before, &after, "before", "after")
}
/// Fast local git compare of the crd
///
/// Should be pretty safe. Stashes existing work, checks out master, compares,
/// then goes back to previous branch and pops the stash.
///
/// Because this does fiddle with git state while running it is not the default implementation.
Fast local git compare of the crd
Should be pretty safe. Stashes existing work, checks out master, compares,
then goes back to previous branch and pops the stash.

Because this does fiddle with git state while running it is not the default implementation.
Fast local git compare of the crd Should be pretty safe . Stashes existing work checks out master compares then goes back to previous branch and pops the stash . Because this does fiddle with git state while running it is not the default implementation .
pub async fn values_vs_git(svc: &str, conf: &Config, region: &Region) -> Result<bool> {
    let after = as_yaml(&svc, conf, region).await?;
    // move git to get before state:
    let merge_base = git::merge_base()?;
    git::checkout(&merge_base)?;
    let needs_stash = git::needs_stash();
    if needs_stash {
        git::stash_push()?;
    }
    // compute before state
    let (before_conf, before_region) = Config::new(ConfigState::Base, &region.name).await?;
    let before = as_yaml(&svc, &before_conf, &before_region).await?;
    // move git back
    if needs_stash {
        git::stash_pop()?;
    }
    git::checkout("-")?;
    // display diff
    shell_diff(&before, &after, "before", "after")
}
pub async fn values_vs_git ( svc : & str , conf : & Config , region : & Region ) -> Result < bool > { let after = as_yaml ( & svc , conf , region ) . await ? ; // move git to get before state: let merge_base = git :: merge_base ( ) ? ; git :: checkout ( & merge_base ) ? ; let needs_stash = git :: needs_stash ( ) ; if needs_stash { git :: stash_push ( ) ? ; } // compute before state let ( before_conf , before_region ) = Config :: new ( ConfigState :: Base , & region . name ) . await ? ; let before = as_yaml ( & svc , & before_conf , & before_region ) . await ? ; // move git back if needs_stash { git :: stash_pop ( ) ? ; } git :: checkout ( " " ) ? ; // display diff shell_diff ( & before , & after , " " , " " ) }
Fast local git compare of the crd
Should be pretty safe.
Fast local git compare of the crd Should be pretty safe .
svc
&str
conf
&Config
region
&Region
svc
&str
conf
&Config
region
&Region