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

Re: [PATCHv3 1/2] Add a remote helper to interact with mediawiki, pull & clone handled

From
Jeff King <peff@peff.net>
Date
Jun 10, 2011, 00:21 UTC
Message-ID
<20110610002137.GA11585@sigill.intra.peff.net>
In-Reply-To
<1307625360-10973-1-git-send-email-jeremie.nikaes@ensimag.imag.fr>
On Thu, Jun 09, 2011 at 03:15:59PM +0200, Jeremie Nikaes wrote:
> Partial cloning is supported using the following syntax :
> "git clone mediawiki::http://wikiurl##A_Page##Another_Page"
> As always, this url is kept in .git/config, helping to always keep
> track of these specific pages

Earlier today I posted a 10-patch series to allow git to handle something like:

  git clone \
    -c mediawiki.page=GitWorkflows \
    -c mediawiki.page=Tig \
    https://git.wiki.kernel.org

and set that config into the .git/config file. The patch for the mediawiki helper to actually read and use it (instead of the "##" syntax in the url) is just:

---
diff --git a/contrib/mw-to-git/git-remote-mediawiki b/contrib/mw-to-git/git-remote-mediawiki
index fd26f87..75c3537 100755
--- a/contrib/mw-to-git/git-remote-mediawiki
+++ b/contrib/mw-to-git/git-remote-mediawiki
@@ -11,10 +11,9 @@ use warnings;
 my $slash_replacement = "%2F";
 
 my $remotename = $ARGV[0];
-# Current syntax to fetch only a set of pages mediawiki::http://mediawikiurl##A_Page##Another_Page
-my @pages_titles = split(/##/,$ARGV[1]);
-my $url = shift (@pages_titles);
-
+my $url = $ARGV[1];
+my @pages_titles = `git config --get-all mediawiki.page`;
+chomp @pages_titles;
 
 # commands parser
 my $entry;
Previous: Jeff KingNext: Arnaud Lacurie
Message 8 of 10 in “[PATCHv3 1/2] Add a remote helper to interact with mediawiki, pull & clone handled”
  1. Jeremie NikaesJun 9, 2011
  2. 2/2 Git-remote-mediawiki: Add push supportJeremie Nikaes, Jun 9, 2011
  3. Junio C HamanoJun 9, 2011
  4. Sverre RabbelierJun 9, 2011
  5. Jérémie NIKAESJun 9, 2011
  6. Sverre RabbelierJun 9, 2011
  7. Jeff KingJun 9, 2011
  8. Jeff KingJun 10, 2011
  9. Arnaud LacurieJun 10, 2011
  10. Jeff KingJun 10, 2011

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.