mirror of
https://forge.pointfixe.fr/hubert/gitust.git
synced 2026-02-04 10:37:28 +01:00
get_branches_nbr
This commit is contained in:
@@ -88,4 +88,12 @@ impl GitRepo {
|
||||
res
|
||||
}
|
||||
|
||||
pub fn get_branches_nbr(&self) -> u32 {
|
||||
let mut res = 0;
|
||||
for _ in self.git2.branches(Some(BranchType::Local)){
|
||||
res = res + 1;
|
||||
}
|
||||
res
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ pub async fn git_main<T : AuthValidator>(
|
||||
root : path,
|
||||
user_opt : user,
|
||||
revisions_nbr : gitrepo.get_revisions_nbr(),
|
||||
branches_nbr : 7,
|
||||
branches_nbr : gitrepo.get_branches_nbr(),
|
||||
tags_nbr : 88,
|
||||
size : "16 KiB".to_string(),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user