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

Re: [PATCH 07/14] revert: Introduce struct to keep command-line options

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Jul 12, 2011, 06:14 UTC
Message-ID
<CALkWK0mnhsCZoz0PLBAEL_Z9MOSfGDYTWj6ToNqyutxvfkfNCA@mail.gmail.com>
In-Reply-To
<20110706120616.GQ15682@elie>
Hi Jonathan,

Sorry about the delayed replay -- I intended to reply to this earlier; I'm not sure why I didn't.

Jonathan Nieder writes:
Show 10 quoted lines
>> My justification: in later steps, we'd want to be able to mix
>> "pick" and "revert" instructions in the same instruction sheet.  This
>> will essentially require the parser to return a commit + a replay_opts
>> struct (which will contain the action information).
>
> Side note: is it intended to support insns like
>
>  pick A..B
>
> ?

I wouldn't point to that instruction specifically, but yes- I plan to support complex instructions in future.

Show 5 quoted lines
> Anyway, the above explanation about the intended use for "struct
> replay_opts" (it needs to be small, I guess?) would be a good thing
> to add to the commit message, too.  Basically, whatever information a
> person needs in order to understand the design is a useful thing to
> add.

I'm not yet sure about this. On a related note, I'd like to ask: will we encounter two commands like "am" and "revert" which have the same command-line option name for two different functionality? If not, I'd probably like to stick to the per-session opts for as long as possible (ie. until someone finds a good usecase + implementation for per-action command-line options).

Show 7 quoted lines
>> Yes, I'm definitely considering exposing parse_args in the future,
>> especially since I want to support command-line options in my
>> instruction sheet.
>
> Hm, I am not sure what to think about this direction (is the git
> sequencer actually just a fast git shell?  in that case, why is pick
> spelled "pick" instead of "cherry-pick"?).  Maybe it's a good thing.

This is a very important question. Yes, it's intentionally named "pick" and not "cherry-pick" because I don't want the Sequencer to merely be a fast git shell. That's part of the reason I don't want arbitrary command-line options on the insn sheet. I want the possibility of accommodating complex instructions in the insn sheet (single instructions that might even involve talking to more than one git command). For the same reason, I also felt that "action" is the most appropriate name for the first word in each line in the insn sheet. What I'd call an "instruction" is an action + the relevant option(s) picked up from the opts sheet.

-- Ram
Previous: Jonathan NiederNext: Junio C Hamano
Message 19 of 55 in “[GSoC update] Sequencer: The insn sheet format”
  1. Ramkumar RamachandraJul 6, 2011
  2. 01/14 advice: Introduce error_resolve_conflictRamkumar Ramachandra, Jul 6, 2011
  3. Jonathan NiederJul 6, 2011
  4. Ramkumar RamachandraJul 6, 2011
  5. Jonathan NiederJul 6, 2011
  6. 02/14 revert: Inline add_message_to_msg functionRamkumar Ramachandra, Jul 6, 2011
  7. 03/14 revert: Don't check lone argument in get_encodingRamkumar Ramachandra, Jul 6, 2011
  8. 04/14 revert: Rename no_replay to record_originRamkumar Ramachandra, Jul 6, 2011
  9. 05/14 revert: Propogate errors upwards from do_pick_commitRamkumar Ramachandra, Jul 6, 2011
  10. Jonathan NiederJul 6, 2011
  11. Ramkumar RamachandraJul 6, 2011
  12. 06/14 revert: Eliminate global "commit" variableRamkumar Ramachandra, Jul 6, 2011
  13. Jonathan NiederJul 6, 2011
  14. Ramkumar RamachandraJul 6, 2011
  15. 07/14 revert: Introduce struct to keep command-line optionsRamkumar Ramachandra, Jul 6, 2011
  16. Jonathan NiederJul 6, 2011
  17. Ramkumar RamachandraJul 6, 2011
  18. Jonathan NiederJul 6, 2011
  19. Ramkumar RamachandraJul 12, 2011
  20. Junio C HamanoJul 6, 2011
  21. Ramkumar RamachandraJul 12, 2011
  22. Jonathan NiederJul 12, 2011
  23. 08/14 revert: Separate cmdline parsing from functional codeRamkumar Ramachandra, Jul 6, 2011
  24. Jonathan NiederJul 6, 2011
  25. Ramkumar RamachandraJul 6, 2011
  26. 09/14 revert: Don't create invalid replay_opts in parse_argsRamkumar Ramachandra, Jul 6, 2011
  27. Jonathan NiederJul 6, 2011
  28. 10/14 revert: Persist data for continuationRamkumar Ramachandra, Jul 6, 2011
  29. Jonathan NiederJul 6, 2011
  30. Ramkumar RamachandraJul 6, 2011
  31. Junio C HamanoJul 6, 2011
  32. 11/14 revert: Introduce a layer of indirection over pick_commitsRamkumar Ramachandra, Jul 6, 2011
  33. Jonathan NiederJul 6, 2011
  34. Ramkumar RamachandraJul 6, 2011
  35. Jonathan NiederJul 6, 2011
  36. Ramkumar RamachandraJul 6, 2011
  37. Jonathan NiederJul 6, 2011
  38. Junio C HamanoJul 6, 2011
  39. Ramkumar RamachandraJul 7, 2011
  40. 12/14 revert: Introduce --reset to cleanup sequencer dataRamkumar Ramachandra, Jul 6, 2011
  41. Jonathan NiederJul 6, 2011
  42. Ramkumar RamachandraJul 6, 2011
  43. Ramkumar RamachandraJul 6, 2011
  44. Jonathan NiederJul 6, 2011
  45. Jonathan NiederJul 6, 2011
  46. Ramkumar RamachandraJul 7, 2011
  47. 13/14 revert: Introduce --continue to continue the operationRamkumar Ramachandra, Jul 6, 2011
  48. Jonathan NiederJul 6, 2011
  49. Junio C HamanoJul 6, 2011
  50. Drew NorthupJul 6, 2011
  51. Ramkumar RamachandraJul 7, 2011
  52. 14/14 revert: Change insn sheet formatRamkumar Ramachandra, Jul 6, 2011
  53. Jonathan NiederJul 6, 2011
  54. Ramkumar RamachandraJul 6, 2011
  55. Jonathan NiederJul 6, 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.