get_branches_nbr
This commit is contained in:
parent
f71e8ff1b3
commit
1f4d08aff1
|
@ -88,4 +88,12 @@ impl GitRepo {
|
||||||
res
|
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,
|
root : path,
|
||||||
user_opt : user,
|
user_opt : user,
|
||||||
revisions_nbr : gitrepo.get_revisions_nbr(),
|
revisions_nbr : gitrepo.get_revisions_nbr(),
|
||||||
branches_nbr : 7,
|
branches_nbr : gitrepo.get_branches_nbr(),
|
||||||
tags_nbr : 88,
|
tags_nbr : 88,
|
||||||
size : "16 KiB".to_string(),
|
size : "16 KiB".to_string(),
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue