Merge refs/heads/master from .
[gitweb.git] / fsck-cache.c
index 6115514d4f0974d70abbe84aa35d001ec3316a82..8091780193b94c9855855656538c64f4a707a212 100644 (file)
@@ -445,7 +445,7 @@ int main(int argc, char **argv)
                        continue;
                }
                if (*arg == '-')
-                       usage("git-fsck-cache [--tags] [[--unreachable] [--cache] [--standalone | --full] <head-sha1>*]");
+                       usage("git-fsck-cache [--tags] [--root] [[--unreachable] [--cache] [--standalone | --full] [--strict] <head-sha1>*]");
        }
 
        if (standalone && check_full)
@@ -456,13 +456,13 @@ int main(int argc, char **argv)
        fsck_head_link();
        fsck_object_dir(get_object_directory());
        if (check_full) {
-               int j;
+               struct alternate_object_database *alt;
                struct packed_git *p;
                prepare_alt_odb();
-               for (j = 0; alt_odb[j].base; j++) {
+               for (alt = alt_odb_list; alt; alt = alt->next) {
                        char namebuf[PATH_MAX];
-                       int namelen = alt_odb[j].name - alt_odb[j].base;
-                       memcpy(namebuf, alt_odb[j].base, namelen);
+                       int namelen = alt->name - alt->base;
+                       memcpy(namebuf, alt->base, namelen);
                        namebuf[namelen - 1] = 0;
                        fsck_object_dir(namebuf);
                }