Re: [PATCH 2/2] Allow http authentication via prompt for http push.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Thu, 19 Mar 2009, Amos King wrote:

> There is now a faux remote created in order to
> be passed to http_init.
> 
> Signed-off-by: Amos King <amos.l.king@xxxxxxxxx>
> ---
>  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.
> +	 */

You might want to pass this through aspell ;-)  Altough it will not 
suggest 'out ->our', I guess...

> +	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);

Would 'fake' not be a more appropriate name than 'remote'?

That would also make the patch 1/2 rather unnecessary (I also have to 
admit that I do not find 'repo' a better name, as we have a repository 
both locally and remotely, and this _is_ the remote repository, not the 
local one).

Ciao,
Dscho

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux