git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 19, 2009, 16:59 UTC
Message-ID
<alpine.DEB.1.00.0903191755270.6357@intel-tinevez-2-302>
In-Reply-To
<d8c371a80903190812w59febbd3qc6bc3d70ce85f76e@mail.gmail.com>
Hi,
On Thu, 19 Mar 2009, Amos King wrote:
Show 21 quoted lines
> 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.
> +	 */

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

Show 6 quoted lines
> +	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

Previous: Amos KingNext: Amos King
Message 2 of 7 in “Allow http authentication via prompt for http push.”
  1. 2/2 Allow http authentication via prompt for http push.Amos King, Mar 19, 2009
  2. Johannes SchindelinMar 19, 2009
  3. Amos KingMar 19, 2009
  4. Michael J GruberMar 20, 2009
  5. Amos KingMar 20, 2009
  6. Michael J GruberMar 20, 2009
  7. Amos KingMar 19, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.