mirror of
https://github.com/gitui-org/gitui
synced 2026-05-24 09:28:21 +00:00
Use gix_repo in get_tags
This commit is contained in:
parent
2374e00302
commit
f40ce7bfb3
1 changed files with 5 additions and 4 deletions
|
|
@ -1,5 +1,8 @@
|
||||||
use super::{get_commits_info, CommitId, RepoPath};
|
use super::{get_commits_info, CommitId, RepoPath};
|
||||||
use crate::{error::Result, sync::repository::repo};
|
use crate::{
|
||||||
|
error::Result,
|
||||||
|
sync::{gix_repo, repository::repo},
|
||||||
|
};
|
||||||
use scopetime::scope_time;
|
use scopetime::scope_time;
|
||||||
use std::collections::{BTreeMap, HashMap, HashSet};
|
use std::collections::{BTreeMap, HashMap, HashSet};
|
||||||
|
|
||||||
|
|
@ -58,9 +61,7 @@ pub fn get_tags(repo_path: &RepoPath) -> Result<Tags> {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let gix_repo: gix::Repository =
|
let gix_repo: gix::Repository = gix_repo(repo_path)?;
|
||||||
gix::ThreadSafeRepository::discover_with_environment_overrides(repo_path.gitpath())
|
|
||||||
.map(Into::into)?;
|
|
||||||
let platform = gix_repo.references()?;
|
let platform = gix_repo.references()?;
|
||||||
for mut reference in (platform.tags()?).flatten() {
|
for mut reference in (platform.tags()?).flatten() {
|
||||||
let commit = reference.peel_to_commit();
|
let commit = reference.peel_to_commit();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue