X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=http-push.c;h=fe925609b4024119c6171dd32350a6570bea8516;hb=c8568e139ed2149fbfb7ef9a8d819d5b6b7c554f;hp=ad789829c1c33e00cbcc9e1e1564e645755d49ab;hpb=3e2f62bebfe8e9aeea63849c37c65f25ea001e65;p=git.git diff --git a/http-push.c b/http-push.c index ad789829..fe925609 100644 --- a/http-push.c +++ b/http-push.c @@ -1008,9 +1008,7 @@ static int unlock_remote(struct active_lock *lock) if (lock->owner != NULL) free(lock->owner); free(lock->url); -/* Freeing the token causes a segfault... free(lock->token); -*/ free(lock); return rc; @@ -1239,6 +1237,7 @@ int main(int argc, char **argv) int rc = 0; int i; + setup_git_directory(); setup_ident(); remote = xmalloc(sizeof(*remote)); @@ -1273,6 +1272,9 @@ int main(int argc, char **argv) break; } + if (!remote->url) + usage(http_push_usage); + memset(remote_dir_exists, 0, 256); http_init();