X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=http-push.c;h=ad1a6c90967b36365563de210ec2d066ae9d979a;hb=750054cd3f1298bc9e113a47eaa6346923e08c19;hp=00e83dcec1d973b069d4c75105aed96634b00994;hpb=0984e3a77246c536f938f53ecded99533fb31667;p=git.git diff --git a/http-push.c b/http-push.c index 00e83dcec..ad1a6c909 100644 --- a/http-push.c +++ b/http-push.c @@ -1792,8 +1792,6 @@ int main(int argc, char **argv) git_extract_argv0_path(argv[0]); - setup_git_directory(); - repo = xcalloc(sizeof(*repo), 1); argv++; @@ -1827,6 +1825,8 @@ int main(int argc, char **argv) force_delete = 1; continue; } + if (!strcmp(arg, "-h")) + usage(http_push_usage); } if (!repo->url) { char *path = strstr(arg, "//"); @@ -1854,6 +1854,8 @@ int main(int argc, char **argv) if (delete_branch && nr_refspec != 1) die("You must specify only one branch name when deleting a remote branch"); + setup_git_directory(); + memset(remote_dir_exists, -1, 256); /*