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

[RFC PATCH 0/3] fast-import: add option command

From
Sverre Rabbelier <srabbelier@gmail.com>
Date
Aug 2, 2009, 05:06 UTC
Message-ID
<1249189570-26576-1-git-send-email-srabbelier@gmail.com>
In-Reply-To
<fabb9a1e0908011829j3843c132ka5081d994aad973f@mail.gmail.com>

Because I am too impatient to wait for a reply to my earlier mail, here is an RFC series that demonstrates how I envision the option command to work.

>From the second patch:
    This allows the frontend to specify any of the supported options as
    long as no non-option command has been given. This way the
    user does not have to include any frontend-specific options, but
    instead she can rely on the frontend to tell fast-import what it
    needs.

This change of course means that old fast-import clients will break upon receiving an 'option' command (or with an argument they don't support), but such clients will break with a clear output stating the reason for the breakage. Newer frontends therefore should only output options if the user tells them to (by means of a flag/config option), or at least allow disabling option output.

The main use case for this is hg-git, which I want to modify so that it uses 'hg fast-export | git fast-import' for the intial import. However, to do that I need the fast-import part to write a marks file, that is, --write-marks=git.marks. To simplify this process for the user, it would be nice if 'hg fast-export' can instead emit an 'option write-marks git.marks' line (hence the test case).

 Sverre Rabbelier (3):
      fast-import: put option parsing code in seperate functions
      fast-import: add option command
      fast-import: test the new option command
 fast-import.c          |  137 ++++++++++++++++++++++++++++++++++++-----------
 t/t9300-fast-import.sh |   33 ++++++++++++
 2 files changed, 138 insertions(+), 32 deletions(-)
Previous: Sverre RabbelierNext: Sverre Rabbelier
Message 2 of 8 in “option directive to fast-import”
  1. Sverre RabbelierAug 2, 2009
  2. 0/3 fast-import: add option commandSverre Rabbelier, Aug 2, 2009
  3. 1/2 fast-import: put option parsing code in seperate functionsSverre Rabbelier, Aug 2, 2009
  4. 2/2 fast-import: add option commandSverre Rabbelier, Aug 2, 2009
  5. 3/3 fast-import: test the new option commandSverre Rabbelier, Aug 2, 2009
  6. 1/3 fast-import: put option parsing code in seperate functionsSverre Rabbelier, Aug 2, 2009
  7. Shawn O. PearceAug 3, 2009
  8. Sverre RabbelierAug 3, 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.