We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 083909b + 0a72c18 commit fbce7bbCopy full SHA for fbce7bb
git-repository/examples/stats.rs
@@ -49,9 +49,9 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
49
50
// let num_branches = repo.branches()?;
51
// let num_branches = repo.branches.remote("origin")?;
52
- let num_branches = repo.references()?.prefixed("refs/heads/")?.count();
53
- let num_remote_branches = repo.references()?.prefixed("refs/remotes/")?.count();
54
- let num_tags = repo.references()?.prefixed("refs/tags/")?.count();
+ let num_branches = repo.references()?.local_branches()?.count();
+ let num_remote_branches = repo.references()?.remote_branches()?.count();
+ let num_tags = repo.references()?.tags()?.count();
55
let broken_refs = repo
56
.references()?
57
.all()?
0 commit comments