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

Re: [PATCH 1/2] git-remote-mediawiki: reset private ref after non-dumb push

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Aug 21, 2013, 20:26 UTC
Message-ID
<vpqy57u7pue.fsf@anie.imag.fr>
In-Reply-To
<xmqq1u5nudq8.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 21 quoted lines
>> diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl
>> index f8d7d2c..13919ad 100755
>> --- a/contrib/mw-to-git/git-remote-mediawiki.perl
>> +++ b/contrib/mw-to-git/git-remote-mediawiki.perl
>> @@ -53,6 +53,7 @@ if (@ARGV != 2) {
>>  
>>  my $remotename = $ARGV[0];
>>  my $url = $ARGV[1];
>> +my $reset_private_ref_to = undef;
>>  
>>  # Accept both space-separated and multiple keys in config file.
>>  # Spaces should be written as _ anyway because we'll use chomp.
>> @@ -161,6 +162,9 @@ sub parse_command {
>>  	my ($line) = @_;
>>  	my @cmd = split(/ /, $line);
>>  	if (!defined $cmd[0]) {
>> +		if ($reset_private_ref_to) {
>> +			run_git("update-ref -m \"Git-MediaWiki non-dumb push\" refs/mediawiki/$remotename/master $reset_private_ref_to");
>> +		}
>
> So reset-private-ref-to is recorded for a non-dumb push, but...
> ... it is set for dumb-push?  I am confused.

Oops, I'm the one who did the confusion indeed. It should be s/non-dumb/dumb/ here and in the subject line.

Don't merge this one, I've fixed locally and will resend (this or another fix, depending on the outcome of the discussion).

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Junio C Hamano
Message 4 of 4 in “git-remote-mediawiki: reset private ref after non-dumb push”
  1. 1/2 git-remote-mediawiki: reset private ref after non-dumb pushMatthieu Moy, Aug 21, 2013
  2. 2/2 git-remote-mediawiki: add test and check Makefile targetsMatthieu Moy, Aug 21, 2013
  3. Junio C HamanoAug 21, 2013
  4. Matthieu MoyAug 21, 2013

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.