We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0731960 commit d42c274Copy full SHA for d42c274
src/repo.rs
@@ -1963,6 +1963,20 @@ impl Repository {
1963
}
1964
1965
1966
+ /// Lookup a tag object by prefix hash from the repository.
1967
+ pub fn find_tag_by_prefix(&self, prefix_hash: &str) -> Result<Tag<'_>, Error> {
1968
+ let mut raw = ptr::null_mut();
1969
+ unsafe {
1970
+ try_call!(raw::git_tag_lookup_prefix(
1971
+ &mut raw,
1972
+ self.raw,
1973
+ Oid::from_str(prefix_hash)?.raw(),
1974
+ prefix_hash.len()
1975
+ ));
1976
+ Ok(Binding::from_raw(raw))
1977
+ }
1978
1979
+
1980
/// Delete an existing tag reference.
1981
///
1982
/// The tag name will be checked for validity, see `tag` for some rules
0 commit comments