Merge branch 'bw/submodule-is-active'
[gitweb.git] / http-push.c
index d0b29ac982028a26c97ebd24f1b3f2cbf188e503..f0e3108f716f8376ba924c4db1ea6f44b8bd60b9 100644 (file)
@@ -1431,11 +1431,9 @@ static void one_remote_ref(const char *refname)
         */
        if (repo->can_update_info_refs && !has_object_file(&ref->old_oid)) {
                obj = lookup_unknown_object(ref->old_oid.hash);
-               if (obj) {
-                       fprintf(stderr, "  fetch %s for %s\n",
-                               oid_to_hex(&ref->old_oid), refname);
-                       add_fetch_request(obj);
-               }
+               fprintf(stderr, "  fetch %s for %s\n",
+                       oid_to_hex(&ref->old_oid), refname);
+               add_fetch_request(obj);
        }
 
        ref->next = remote_refs;
@@ -1692,12 +1690,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 +1707,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")) {