Skip to content

Commit cad0c71

Browse files
committed
Use gix_repo in get_tags
1 parent 8a57155 commit cad0c71

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

asyncgit/src/sync/tags.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
use super::{get_commits_info, CommitId, RepoPath};
2-
use crate::{error::Result, sync::repository::repo};
2+
use crate::{
3+
error::Result,
4+
sync::{gix_repo, repository::repo},
5+
};
36
use scopetime::scope_time;
47
use std::collections::{BTreeMap, HashMap, HashSet};
58

@@ -58,10 +61,8 @@ pub fn get_tags(repo_path: &RepoPath) -> Result<Tags> {
5861
}
5962
};
6063

61-
let gix_repo: gix::Repository =
62-
gix::ThreadSafeRepository::discover_with_environment_overrides(repo_path.gitpath())
63-
.map(Into::into)?;
64-
let platform = gix_repo.references()?;
64+
let repo: gix::Repository = gix_repo(repo_path)?;
65+
let platform = repo.references()?;
6566
for mut reference in (platform.tags()?).flatten() {
6667
let commit = reference.peel_to_commit();
6768
let tag = reference.peel_to_tag();

0 commit comments

Comments
 (0)