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

Re: [PATCH 4/5] sequencer: Expose code that handles files in .git/sequencer

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Aug 10, 2011, 15:34 UTC
Message-ID
<CALkWK0nJUTtNgCHF6CE2-w+3ZwdBrscBRw0e0L8wX86Za0G=DA@mail.gmail.com>
In-Reply-To
<20110810152126.GE31315@elie.gateway.2wire.net>
Hi Jonathan,
Jonathan Nieder writes:
Show 13 quoted lines
> Ramkumar Ramachandra wrote:
>> +struct replay_insn_list **replay_insn_list_append(enum replay_action action,
>> +                                             struct commit *operand,
>> +                                             struct replay_insn_list **next);
>> +void sequencer_read_todo(struct replay_insn_list **todo_list);
>> +void sequencer_read_opts(struct replay_opts **opts_ptr);
>> +int sequencer_create_dir(void);
>> +void sequencer_save_head(const char *head);
>> +void sequencer_save_todo(struct replay_insn_list *todo_list);
>> +void sequencer_save_opts(struct replay_opts *opts);
>
> This looks wrong.  What is the expected calling sequence?  Would it
> be possible to expose fewer functions by moving more to sequencer.c?
Thanks for the early review.  Yes, I agree with you: No caller can
make sense of this API; I want something like sequencer_start,
sequencer_handle_conflict, and sequencer_end, but I'm not sure where
to start.  I would have liked to just move these functions without
exposing them, but that would break cherry-pick/ revert.  So, we're
really faced with two choices:
1. Make this patch enormous by moving as well as refactoring
everything into a beautiful public API.  I suspect this won't be easy
to review at all.
2. Keep this patch as it is, and introduce a future patch to clean up
the API.  This is the approach I was going for.

I can't move these functions bit-by-bit either: a hypothetical sequencer_start will require *everything*. Could you suggest something?

-- Ram
Previous: Jonathan NiederNext: Jonathan Nieder
Message 11 of 16 in “Some preliminary work based on sequencer-stable”
  1. 0/5 Some preliminary work based on sequencer-stableRamkumar Ramachandra, Aug 10, 2011
  2. 1/5 revert: Don't remove the sequencer state on errorRamkumar Ramachandra, Aug 10, 2011
  3. 2/5 sequencer.h: Move data structuresRamkumar Ramachandra, Aug 10, 2011
  4. 3/5 revert: Allow mixed pick and revert instructionsRamkumar Ramachandra, Aug 10, 2011
  5. Jonathan NiederAug 10, 2011
  6. Ramkumar RamachandraAug 11, 2011
  7. Ramkumar RamachandraAug 11, 2011
  8. Jonathan NiederAug 11, 2011
  9. 4/5 sequencer: Expose code that handles files in .git/sequencerRamkumar Ramachandra, Aug 10, 2011
  10. Jonathan NiederAug 10, 2011
  11. Ramkumar RamachandraAug 10, 2011
  12. Jonathan NiederAug 10, 2011
  13. Ramkumar RamachandraAug 11, 2011
  14. Jonathan NiederAug 11, 2011
  15. Ramkumar RamachandraAug 11, 2011
  16. 5/5 sequencer: Remove sequencer state after final commitRamkumar Ramachandra, Aug 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.