summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7b5201a)
raw | patch | inline | side by side (parent: 7b5201a)
author | Amos King <amos.l.king@gmail.com> | |
Wed, 18 Mar 2009 23:46:41 +0000 (18:46 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 19 Mar 2009 10:28:18 +0000 (03:28 -0700) |
This patch allows http_push to use http authentication via prompts.
You may notice that there is a remote struct that only contains the
url from the repo struct. This struct is a temporary fix for a larger
issue, but gets http authentication via prompts out the door, and
keeps users from having to store passwords in plain text files.
Signed-off-by: Amos King <amos.l.king@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
You may notice that there is a remote struct that only contains the
url from the repo struct. This struct is a temporary fix for a larger
issue, but gets http authentication via prompts out the door, and
keeps users from having to store passwords in plain text files.
Signed-off-by: Amos King <amos.l.king@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
http-push.c | patch | blob | history |
diff --git a/http-push.c b/http-push.c
index dfbb247cfcd815238b40ca1ee1048041a9ddb5a2..962934858e93422f102ff869dd40730709d5824a 100644 (file)
--- a/http-push.c
+++ b/http-push.c
int i;
int new_refs;
struct ref *ref;
+ struct remote *remote;
char *rewritten_url = NULL;
git_extract_argv0_path(argv[0]);
memset(remote_dir_exists, -1, 256);
- http_init(NULL);
+ /*
+ * Create a minimum remote by hand to give to http_init(),
+ * primarily to allow it to look at the URL.
+ */
+ remote = xcalloc(sizeof(*remote), 1);
+ ALLOC_GROW(remote->url, remote->url_nr + 1, remote->url_alloc);
+ remote->url[remote->url_nr++] = repo->url;
+ http_init(remote);
no_pragma_header = curl_slist_append(no_pragma_header, "Pragma:");