]> git.ipfire.org Git - thirdparty/git.git/blobdiff - packfile.c
l10n: fr.po v2.22.0.rnd1
[thirdparty/git.git] / packfile.c
index cdf6b6ec3443cfe3fcabb55a4475a9fc64c8543b..9f52af928131e8bf9f72a1afccdcb0831e6daf9f 100644 (file)
@@ -903,25 +903,25 @@ static void prepare_packed_git(struct repository *r);
  * all unreachable objects about to be pruned, in which case they're not really
  * interesting as a measure of repo size in the first place.
  */
-unsigned long approximate_object_count(void)
+unsigned long repo_approximate_object_count(struct repository *r)
 {
-       if (!the_repository->objects->approximate_object_count_valid) {
+       if (!r->objects->approximate_object_count_valid) {
                unsigned long count;
                struct multi_pack_index *m;
                struct packed_git *p;
 
-               prepare_packed_git(the_repository);
+               prepare_packed_git(r);
                count = 0;
-               for (m = get_multi_pack_index(the_repository); m; m = m->next)
+               for (m = get_multi_pack_index(r); m; m = m->next)
                        count += m->num_objects;
-               for (p = the_repository->objects->packed_git; p; p = p->next) {
+               for (p = r->objects->packed_git; p; p = p->next) {
                        if (open_pack_index(p))
                                continue;
                        count += p->num_objects;
                }
-               the_repository->objects->approximate_object_count = count;
+               r->objects->approximate_object_count = count;
        }
-       return the_repository->objects->approximate_object_count;
+       return r->objects->approximate_object_count;
 }
 
 static void *get_next_packed_git(const void *p)