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

Re: [PATCH 2/2] Add a remote helper to interact with mediawiki (fetch & push)

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Aug 31, 2011, 11:54 UTC
Message-ID
<vpqobz53ig3.fsf@bauges.imag.fr>
In-Reply-To
<20110830035608.GB6647@elie.gateway.2wire.net>
Jonathan Nieder <jrnieder@gmail.com> writes:
> Here's an old attempt to make the documentation a little easier to read,
> and hopefully also to add to.
Thanks, that helps. I wish we had all this earlier ;-).
> +Git sends the remote helper a list of commands on standard input, one
> +per line.  The first command is always the 'capabilities' command, 

Do we want to set this in stone? Wouldn't a Git implementation calling "option" before "capabilities" be correct?

> +Capabilities
> +~~~~~~~~~~~~
(perhaps name the section "Overview of Capabilities"?)
[...]
Show 18 quoted lines
> +'refspec' <refspec>::
> +	This modifies the 'import' capability, allowing the produced
> +	fast-import stream to modify refs in a private namespace
> +	instead of writing to refs/heads or refs/remotes directly.
> +	It is recommended that all importers providing the 'import'
> +	capability use this.
> ++
> +A helper advertising the capability
> +`refspec refs/heads/{asterisk}:refs/svn/origin/branches/{asterisk}`
> +is saying that, when it is asked to `import refs/heads/topic`, the
> +stream it outputs will update the `refs/svn/origin/branches/topic`
> +ref.
> ++
> +This capability can be advertised multiple times.  The first
> +applicable refspec takes precedence.  The left-hand of refspecs
> +advertised with this capability must cover all refs reported by
> +the list command.  If no 'refspec' capability is advertised,
> +there is an implied `refspec {asterisk}:{asterisk}`.

Since this "Capabilities" section is meant to be an overview, I'd shorten this to

+'refspec' <refspec>:: + This modifies the 'import' capability, allowing the produced + fast-import stream to modify refs in a private namespace + instead of writing to refs/heads or refs/remotes directly.

and drop the detailed explanation here.
> +Capabilities for Fetching
> +~~~~~~~~~~~~~~~~~~~~~~~~~
[...]
> +'refspec' <refspec>::
> +	This modifies the 'import' capability.

Since this would be the "detailed explanation" part, this is the one readers will read more carefully, so I'd put the recommandation right here:

+ It is recommended that all importers providing the 'import' + capability use this.

and of course, keep this:
Show 13 quoted lines
> ++
> +A helper advertising
> +`refspec refs/heads/{asterisk}:refs/svn/origin/branches/{asterisk}`
> +in its capabilities is saying that, when it handles
> +`import refs/heads/topic`, the stream it outputs will update the
> +`refs/svn/origin/branches/topic` ref.
> ++
> +This capability can be advertised multiple times.  The first
> +applicable refspec takes precedence.  The left-hand of refspecs
> +advertised with this capability must cover all refs reported by
> +the list command.  If no 'refspec' capability is advertised,
> +there is an implied `refspec {asterisk}:{asterisk}`.
> +
-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Junio C HamanoNext: Jonathan Nieder
Message 9 of 43 in “fast-import: initialize variable require_explicit_termination”
  1. 1/2 fast-import: initialize variable require_explicit_terminationMatthieu Moy, Aug 26, 2011
  2. 2/2 Add a remote helper to interact with mediawiki (fetch & push)Matthieu Moy, Aug 26, 2011
  3. Junio C HamanoAug 26, 2011
  4. Sverre RabbelierAug 29, 2011
  5. Junio C HamanoAug 29, 2011
  6. Sverre RabbelierAug 29, 2011
  7. Jonathan NiederAug 30, 2011
  8. Junio C HamanoAug 30, 2011
  9. Matthieu MoyAug 31, 2011
  10. Jonathan NiederSep 1, 2011
  11. done feature in remote-helpers (was Re: [PATCH 2/2] Add a remote helper to interact with mediawiki (fetch & push))Matthieu Moy, Aug 31, 2011
  12. Sverre RabbelierAug 31, 2011
  13. Matthieu MoyAug 31, 2011
  14. Sverre RabbelierAug 31, 2011
  15. Matthieu MoyAug 31, 2011
  16. Sverre RabbelierAug 31, 2011
  17. git-remote-helpers.txt: explain how import works with multiple refsMatthieu Moy, Aug 31, 2011
  18. (short) documentation for the testgit remote helperMatthieu Moy, Aug 31, 2011
  19. Sverre RabbelierSep 1, 2011
  20. Matthieu MoySep 1, 2011
  21. 1/2 Documentation/git-remote-helpers: explain how import works with multiple refsMatthieu Moy, Sep 1, 2011
  22. 2/2 (short) documentation for the testgit remote helperMatthieu Moy, Sep 1, 2011
  23. Sverre RabbelierSep 1, 2011
  24. Sverre RabbelierSep 1, 2011
  25. Sverre RabbelierSep 1, 2011
  26. Jonathan NiederSep 1, 2011
  27. Matthieu MoySep 3, 2011
  28. Add a remote helper to interact with mediawiki (fetch & push)Matthieu Moy, Aug 26, 2011
  29. Add a remote helper to interact with mediawiki (fetch & push)Matthieu Moy, Aug 31, 2011
  30. Sverre RabbelierAug 31, 2011
  31. Matthieu MoyAug 31, 2011
  32. Junio C HamanoSep 1, 2011
  33. Matthieu MoySep 1, 2011
  34. 0/2 Git-MediaWikiMatthieu Moy, Sep 1, 2011
  35. 1/2 Add a remote helper to interact with mediawiki (fetch & push)Matthieu Moy, Sep 1, 2011
  36. 2/2 git-remote-mediawiki: allow push to set MediaWiki metadataMatthieu Moy, Sep 1, 2011
  37. Clean termination of remote-helpers (was Re: [PATCH 2/2] Add a remote helper to interact with mediawiki (fetch & push))Matthieu Moy, Aug 31, 2011
  38. Sverre RabbelierAug 31, 2011
  39. Matthieu MoyAug 31, 2011
  40. Sverre RabbelierAug 31, 2011
  41. Junio C HamanoAug 26, 2011
  42. Matthieu MoyAug 26, 2011
  43. Junio C HamanoAug 26, 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.