pub fn is_annotated_tag(
    repository: &Path,
    target: &str,
) -> Result<bool, Error> {
    let output = process::Command::new("git")
        .args(&["cat-file", "-t", target])
        .current_dir(repository)
        .stdin(process::Stdio::null())
        .stderr(process::Stdio::inherit())
        .output()?;
    if !output.status.success() {
        return Err(Error::Git(format!(
            "`git cat-file -t` returned {}",
            output.status
        )));
    }
    Ok(output.stdout == b"tag\n")
}
/// Determines if a given name or hash is an annotated tag or not
///
/// This will return false for commits, branches (and other references pointing
/// to commits), and light-weight tags.
Determines if a given name or hash is an annotated tag or not
This will return false for commits, branches (and other references pointing
to commits), and light-weight tags.
Determines if a given name or hash is an annotated tag or not This will return false for commits branches ( and other references pointing to commits ) and light - weight tags .
pub fn is_annotated_tag(
    repository: &Path,
    target: &str,
) -> Result<bool, Error> {
    let output = process::Command::new("git")
        .args(&["cat-file", "-t", target])
        .current_dir(repository)
        .stdin(process::Stdio::null())
        .stderr(process::Stdio::inherit())
        .output()?;
    if !output.status.success() {
        return Err(Error::Git(format!(
            "`git cat-file -t` returned {}",
            output.status
        )));
    }
    Ok(output.stdout == b"tag\n")
}
pub fn is_annotated_tag ( repository : & Path , target : & str , ) -> Result < bool , Error > { let output = process :: Command :: new ( " " ) . args ( & [ " " , " " , target ] ) . current_dir ( repository ) . stdin ( process :: Stdio :: null ( ) ) . stderr ( process :: Stdio :: inherit ( ) ) . output ( ) ? ; if ! output . status . success ( ) { return Err ( Error :: Git ( format ! ( " " output status ) ) ) ; } Ok ( output . stdout == b" \n " ) }
Determines if a given name or hash is an annotated tag or not
This will return false for commits, branches (and other references pointing
to commits), and light-weight tags.
Determines if a given name or hash is an annotated tag or not This will return false for commits branches ( and other references pointing to commits ) and light - weight tags .
repository
&Path
target
&str
repository
&Path
target
&str