fn rev_is_tag(repo: &git2::Repository, rev: &git2::Oid) -> bool {
        // gather up all the tags, if there are none then its not a tag
        let tags = match repo.tag_names(None) {
            Ok(t) => t,
            Err(_) => return false,
        };

        // walk through all the tags and resolve them to their commitish
        // return true if we find a tag that matches our revision
        tags.iter()
            .filter_map(|tag| tag)
            .filter_map(|tag| repo.revparse_single(tag).ok())
            .filter_map(|tag| tag.peel(git2::ObjectType::Commit).ok())
            .any(|t| t.id() == *rev)
    }
/// attempts to determine if the specific revision is a tag
attempts to determine if the specific revision is a tag
attempts to determine if the specific revision is a tag
fn rev_is_tag(repo: &git2::Repository, rev: &git2::Oid) -> bool {
        // gather up all the tags, if there are none then its not a tag
        let tags = match repo.tag_names(None) {
            Ok(t) => t,
            Err(_) => return false,
        };
        // walk through all the tags and resolve them to their commitish
        // return true if we find a tag that matches our revision
        tags.iter()
            .filter_map(|tag| tag)
            .filter_map(|tag| repo.revparse_single(tag).ok())
            .filter_map(|tag| tag.peel(git2::ObjectType::Commit).ok())
            .any(|t| t.id() == *rev)
    }
fn rev_is_tag ( repo : & git2 :: Repository , rev : & git2 :: Oid ) -> bool { // gather up all the tags, if there are none then its not a tag let tags = match repo . tag_names ( None ) { Ok ( t ) => t , Err ( _ ) => return false , } ; // walk through all the tags and resolve them to their commitish // return true if we find a tag that matches our revision tags . iter ( ) . filter_map ( | tag | tag ) . filter_map ( | tag | repo . revparse_single ( tag ) . ok ( ) ) . filter_map ( | tag | tag . peel ( git2 :: ObjectType :: Commit ) . ok ( ) ) . any ( | t | t . id ( ) == * rev ) }
attempts to determine if the specific revision is a tag
attempts to determine if the specific revision is a tag
repo
&git2::Repository
rev
&git2::Oid
repo
&git2::Repository
rev
&git2::Oid