sha1_file: add repository argument to sha1_file_name
[gitweb.git] / builtin / fsck.c
index c736a10a114e7112e7437d4798a849e8a64c8aa4..3ef25fab9712a12edd70700b941dd62203de9d4a 100644 (file)
@@ -719,7 +719,7 @@ int cmd_fsck(int argc, const char **argv, const char *prefix)
 
                fsck_object_dir(get_object_directory());
 
-               prepare_alt_odb();
+               prepare_alt_odb(the_repository);
                alt_odb_list = the_repository->objects->alt_odb_list;
                for (alt = alt_odb_list; alt; alt = alt->next)
                        fsck_object_dir(alt->path);
@@ -732,7 +732,8 @@ int cmd_fsck(int argc, const char **argv, const char *prefix)
                        prepare_packed_git();
 
                        if (show_progress) {
-                               for (p = packed_git; p; p = p->next) {
+                               for (p = get_packed_git(the_repository); p;
+                                    p = p->next) {
                                        if (open_pack_index(p))
                                                continue;
                                        total += p->num_objects;
@@ -740,7 +741,8 @@ int cmd_fsck(int argc, const char **argv, const char *prefix)
 
                                progress = start_progress(_("Checking objects"), total);
                        }
-                       for (p = packed_git; p; p = p->next) {
+                       for (p = get_packed_git(the_repository); p;
+                            p = p->next) {
                                /* verify gives error messages itself */
                                if (verify_pack(p, fsck_obj_buffer,
                                                progress, count))