Jeff King d3e847c107 credential: add function for parsing url components
All of the components of a credential struct can be found in
a URL.  For example, the URL:

  http://foo:bar@example.com/repo.git

contains:

  protocol=http
  host=example.com
  path=repo.git
  username=foo
  password=bar

We want to be able to turn URLs into broken-down credential
structs so that we know two things:

  1. Which parts of the username/password we still need

  2. What the context of the request is (for prompting or
     as a key for storing credentials).

This code is based on http_auth_init in http.c, but needed a
few modifications in order to get all of the components that
the credential object is interested in.

Once the http code is switched over to the credential API,
then http_auth_init can just go away.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-11 23:16:24 -08:00
..
2011-09-07 11:18:18 -07:00
2011-08-08 09:30:12 -07:00
2011-11-08 16:38:14 -08:00
2011-08-30 12:35:51 -07:00
2011-09-06 11:42:12 -07:00
2011-05-19 10:55:54 -07:00
2011-03-11 10:59:16 -05:00
2011-10-05 12:36:23 -07:00
2011-10-23 21:48:06 -07:00
2010-07-05 13:39:02 -07:00
2011-11-08 16:38:14 -08:00
2010-07-20 16:59:17 -07:00