get_tags_nbr

This commit is contained in:
hubert 2021-07-23 13:47:41 +02:00
parent 1f4d08aff1
commit 5f6f7b7efe
2 changed files with 7 additions and 1 deletions

View File

@ -96,4 +96,10 @@ impl GitRepo {
res
}
pub fn get_tags_nbr(&self) -> u32 {
let mut res = 0;
self.git2.tag_foreach(|_,_| {res = res + 1;true});
res
}
}

View File

@ -120,7 +120,7 @@ pub async fn git_main<T : AuthValidator>(
user_opt : user,
revisions_nbr : gitrepo.get_revisions_nbr(),
branches_nbr : gitrepo.get_branches_nbr(),
tags_nbr : 88,
tags_nbr : gitrepo.get_tags_nbr(),
size : "16 KiB".to_string(),
})
}