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

Re: [PATCH/RFC] add git credential login to remote mediawiki

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Jun 12, 2012, 14:51 UTC
Message-ID
<vpq8vfsoa6x.fsf@bauges.imag.fr>
In-Reply-To
<1339512125-32761-1-git-send-email-Javier.Roucher-Iglesias@ensimag.imag.fr>
Javier.Roucher-Iglesias@ensimag.imag.fr writes:
>  # MediaWiki API instance, created lazily.
> +sub run_credential {
How is the code related to the comment right above?
> +	my $Prog = "git credential $op";
> +	open2 (*Reader, *Writer, $Prog);
> +	print Writer $msg;
> +	close (Writer);
No space before "(" for function calls (already mentionned twice).
>  my $mediawiki;

Didn't I already mention (twice?) that this declaration was meant to stay right above mw_connect_maybe?

> +			run_credential("reject");
> +#			exit 1;

Do you, or do you not want to "exit 1". Either remove this, or uncomment it.

>  sub mw_connect_maybe {
> +
>  	if ($mediawiki) {
Why do you add this blank line? (already mentionned)
Show 16 quoted lines
> -	if ($wiki_login) {
> -		if (!$mediawiki->login({
> -			lgname => $wiki_login,
> -			lgpassword => $wiki_passwd,
> -			lgdomain => $wiki_domain,
> -		})) {
> -			print STDERR "Failed to log in mediawiki user \"$wiki_login\" on $url\n";
> -			print STDERR "(error " .
> -			    $mediawiki->{error}->{code} . ': ' .
> -			    $mediawiki->{error}->{details} . ")\n";
> -			exit 1;
> -		} else {
> -			print STDERR "Logged in with user \"$wiki_login\".\n";
> -		}
> -	}
> +	ask_credential();

This means you can't use the wiki anonymously anymore. This is an unacceptable regression.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: javier.roucher-iglesias@ensimag.imag.frNext: roucherj
Message 2 of 4 in “add git credential login to remote mediawiki”
  1. add git credential login to remote mediawikijavier.roucher-iglesias@ensimag.imag.fr, Jun 12, 2012
  2. Matthieu MoyJun 12, 2012
  3. roucherjJun 12, 2012
  4. Matthieu MoyJun 12, 2012

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.