git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] Allow http authentication via prompt for http push.
@ 2009-03-19 15:12 Amos King
  2009-03-19 16:59 ` Johannes Schindelin
  0 siblings, 1 reply; 7+ messages in thread
From: Amos King @ 2009-03-19 15:12 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Johannes Schindelin

There is now a faux remote created in order to
be passed to http_init.

Signed-off-by: Amos King <amos.l.king@gmail.com>
---
 http-push.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/http-push.c b/http-push.c
index 9ac2664..468d5af 100644
--- a/http-push.c
+++ b/http-push.c
@@ -2195,7 +2195,16 @@ int main(int argc, char **argv)

 	memset(remote_dir_exists, -1, 256);

-	http_init(NULL);
+	/*
+	 * This is a faked remote so that http_init can
+	 * get the correct data for builidng out athorization.
+	 */
+	struct remote *remote;
+	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:");

-- 
1.6.2.GIT

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-03-20 13:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-19 15:12 [PATCH 2/2] Allow http authentication via prompt for http push Amos King
2009-03-19 16:59 ` Johannes Schindelin
2009-03-19 19:02   ` Amos King
2009-03-20  8:49     ` Michael J Gruber
2009-03-20 12:38       ` Amos King
2009-03-20 13:25         ` Michael J Gruber
2009-03-19 23:22   ` Amos King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).