Code

pack-check: Sort entries by pack offset before unpacking them.
[git.git] / builtin-verify-pack.c
index d700761e15e5785b8f17b161d5f45925112a214c..4e31c273f48e3983aaf99dc6525982d34b6fed06 100644 (file)
@@ -17,10 +17,10 @@ static int verify_one_pack(const char *path, int verbose)
         * In addition to "foo.idx" we accept "foo.pack" and "foo";
         * normalize these forms to "foo.idx" for add_packed_git().
         */
-       if (has_extension(arg, len, ".pack")) {
+       if (has_extension(arg, ".pack")) {
                strcpy(arg + len - 5, ".idx");
                len--;
-       } else if (!has_extension(arg, len, ".idx")) {
+       } else if (!has_extension(arg, ".idx")) {
                if (len + 4 >= PATH_MAX)
                        return error("name too long: %s.idx", arg);
                strcpy(arg + len, ".idx");
@@ -55,6 +55,7 @@ int cmd_verify_pack(int argc, const char **argv, const char *prefix)
        int no_more_options = 0;
        int nothing_done = 1;
 
+       git_config(git_default_config);
        while (1 < argc) {
                if (!no_more_options && argv[1][0] == '-') {
                        if (!strcmp("-v", argv[1]))