pack-objects: compute local/ignore_pack_keep early
[gitweb.git] / http-push.c
index ae2b7f19d2499d9043e3c73b74bc9aa274fc2653..dacada9094efd0c929319f39ca74a908668863c7 100644 (file)
@@ -1312,10 +1312,10 @@ static struct object_list **process_tree(struct tree *tree,
        while (tree_entry(&desc, &entry))
                switch (object_type(entry.mode)) {
                case OBJ_TREE:
-                       p = process_tree(lookup_tree(entry.sha1), p);
+                       p = process_tree(lookup_tree(entry.oid->hash), p);
                        break;
                case OBJ_BLOB:
-                       p = process_blob(lookup_blob(entry.sha1), p);
+                       p = process_blob(lookup_blob(entry.oid->hash), p);
                        break;
                default:
                        /* Subproject commit - not in this repository */
@@ -1692,12 +1692,12 @@ static void run_request_queue(void)
 #endif
 }
 
-int main(int argc, char **argv)
+int cmd_main(int argc, const char **argv)
 {
        struct transfer_request *request;
        struct transfer_request *next_request;
        int nr_refspec = 0;
-       char **refspec = NULL;
+       const char **refspec = NULL;
        struct remote_lock *ref_lock = NULL;
        struct remote_lock *info_ref_lock = NULL;
        struct rev_info revs;
@@ -1709,15 +1709,11 @@ int main(int argc, char **argv)
        int new_refs;
        struct ref *ref, *local_refs;
 
-       git_setup_gettext();
-
-       git_extract_argv0_path(argv[0]);
-
        repo = xcalloc(1, sizeof(*repo));
 
        argv++;
        for (i = 1; i < argc; i++, argv++) {
-               char *arg = *argv;
+               const char *arg = *argv;
 
                if (*arg == '-') {
                        if (!strcmp(arg, "--all")) {