Merge branch 'sb/submodule-ignore-trailing-slash'
[gitweb.git] / builtin / fsck.c
index 055dfdcf9ed89c2052ebbeae53a7b2a92f9e3b70..f01b81eebfebc1c221e81c44e3f14a4e2781f0a7 100644 (file)
@@ -644,14 +644,8 @@ int cmd_fsck(int argc, const char **argv, const char *prefix)
                fsck_object_dir(get_object_directory());
 
                prepare_alt_odb();
-               for (alt = alt_odb_list; alt; alt = alt->next) {
-                       /* directory name, minus trailing slash */
-                       size_t namelen = alt->name - alt->base - 1;
-                       struct strbuf name = STRBUF_INIT;
-                       strbuf_add(&name, alt->base, namelen);
-                       fsck_object_dir(name.buf);
-                       strbuf_release(&name);
-               }
+               for (alt = alt_odb_list; alt; alt = alt->next)
+                       fsck_object_dir(alt->path);
        }
 
        if (check_full) {