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

Re: [PATCH 0/8] Sequencer Foundations

From
Christian Couder <christian.couder@gmail.com>
Date
May 12, 2011, 08:19 UTC
Message-ID
<BANLkTi=zXWojMOfe9sECUu-X9euCjr4i3w@mail.gmail.com>
In-Reply-To
<20110511131356.GI2676@elie>
Hi,
On Wed, May 11, 2011 at 3:14 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 11 quoted lines
> Ramkumar Ramachandra wrote:
>
>> Ramkumar Ramachandra (8):
>>   revert: Improve error handling by cascading errors upwards
>>   revert: Make "commit" and "me" local variables
>>   revert: Introduce a struct to parse command-line options into
>>   revert: Separate cmdline argument handling from the functional code
>>   revert: Catch incompatible command-line options early
>>   revert: Introduce head, todo, done files to persist state
>>   revert: Implement parsing --continue, --abort and --skip
>>   revert: Implement --abort processing
I had no time to look at this yet but I will try do to so in the coming days.
Show 23 quoted lines
> The heart is patch 6/8.  I have not thought about this deeply yet, but
> I wonder if it would be simpler if the behavior of "git cherry-pick
> 1..10" looked like this:
>
> . if there is state in .git/sequencer already, error out
> . lock .git/sequencer/head with the lockfile API to prevent
>  concurrent access
> . write current state, including remaining commits to cherry-pick
> . unlock .git/sequencer/head
> . cherry-pick commit #1
> . lock sequencer, check state, update state, unlock
> . cherry-pick commit #2
>  ...
>
> This way, even if cherry-picking causes git to segfault, the sequencer
> state is in good order and we know where to pick up.  More
> importantly, massive refactoring of the merge_recursive API would not
> be needed to keep everything in working order.  An atexit and sigchain
> handler could be added to print advice for the reader about how to
> resume, but that's just an extra hint and it's okay if it sometimes
> doesn't happen sometimes.
>
> What do you think?

I think that the risk at this point might be to overengineer things and to lose time, and then we will perhaps find out that we need to do some refactoring of the merge_recursive API anyway. If we have cherry-pick with --abort, --continue and --skip that just works as well or nearly as well (because it's new) as other stuff it will be already a very good thing. And with enough tests we will hopefully be able to build and refactor safely after that. Maybe we will eventually find out that what you suggest is in fact needed even for cherry-pick with --abort, --continue and --skip, but for now I would prefer trying to make it work with as few changes and work as possible.

Thanks, Christian.

Previous: Jonathan NiederNext: Jonathan Nieder
Message 32 of 39 in “Sequencer Foundations”
  1. 0/8 Sequencer FoundationsRamkumar Ramachandra, May 11, 2011
  2. 1/8 revert: Improve error handling by cascading errors upwardsRamkumar Ramachandra, May 11, 2011
  3. Jonathan NiederMay 11, 2011
  4. Ramkumar RamachandraMay 13, 2011
  5. Ramkumar RamachandraMay 19, 2011
  6. 2/8 revert: Make "commit" and "me" local variablesRamkumar Ramachandra, May 11, 2011
  7. Jonathan NiederMay 11, 2011
  8. Ramkumar RamachandraMay 13, 2011
  9. Daniel BarkalowMay 13, 2011
  10. 3/8 revert: Introduce a struct to parse command-line options intoRamkumar Ramachandra, May 11, 2011
  11. Jonathan NiederMay 11, 2011
  12. Ramkumar RamachandraMay 13, 2011
  13. Jonathan NiederMay 13, 2011
  14. Ramkumar RamachandraMay 13, 2011
  15. 4/8 revert: Separate cmdline argument handling from the functional codeRamkumar Ramachandra, May 11, 2011
  16. Jonathan NiederMay 11, 2011
  17. Ramkumar RamachandraMay 13, 2011
  18. Ramkumar RamachandraMay 13, 2011
  19. Jonathan NiederMay 13, 2011
  20. 5/8 revert: Catch incompatible command-line options earlyRamkumar Ramachandra, May 11, 2011
  21. Jonathan NiederMay 11, 2011
  22. Ramkumar RamachandraMay 13, 2011
  23. 6/8 revert: Introduce head, todo, done files to persist stateRamkumar Ramachandra, May 11, 2011
  24. Jonathan NiederMay 11, 2011
  25. Ramkumar RamachandraMay 13, 2011
  26. 7/8 revert: Implement parsing --continue, --abort and --skipRamkumar Ramachandra, May 11, 2011
  27. Jonathan NiederMay 11, 2011
  28. Ramkumar RamachandraMay 13, 2011
  29. Jonathan NiederMay 13, 2011
  30. 8/8 revert: Implement --abort processingRamkumar Ramachandra, May 11, 2011
  31. Jonathan NiederMay 11, 2011
  32. Christian CouderMay 12, 2011
  33. Jonathan NiederMay 12, 2011
  34. Jonathan NiederMay 12, 2011
  35. Christian CouderMay 13, 2011
  36. Jonathan NiederMay 13, 2011
  37. Christian CouderMay 16, 2011
  38. Jonathan NiederMay 19, 2011
  39. Ramkumar RamachandraMay 20, 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.