improve reliability of fixup_pack_header_footer()
[gitweb.git] / index-pack.c
index 52064befdbbbdf671bd08e369a133d4f1fee03c1..411b80d8150984e96db0775d60e5b8793b07d4a3 100644 (file)
@@ -876,7 +876,9 @@ int main(int argc, char **argv)
        char *index_name_buf = NULL, *keep_name_buf = NULL;
        struct pack_idx_entry **idx_objects;
        unsigned char sha1[20];
+       int nongit = 0;
 
+       setup_git_directory_gently(&nongit);
        git_config(git_index_pack_config, NULL);
 
        for (i = 1; i < argc; i++) {
@@ -980,7 +982,8 @@ int main(int argc, char **argv)
                                nr_objects - nr_objects_initial);
                        stop_progress_msg(&progress, msg);
                        fixup_pack_header_footer(output_fd, sha1,
-                                                curr_pack, nr_objects);
+                                                curr_pack, nr_objects,
+                                                NULL, 0);
                }
                if (nr_deltas != nr_resolved_deltas)
                        die("pack has %d unresolved deltas",