sequencer: start removing private fields from public API
commita3152edc97ff37f61387c6b222c68bc4f8b19bee
authorPhillip Wood <phillip.wood@dunelm.org.uk>
Thu, 18 Apr 2024 13:14:06 +0000 (18 14:14 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 18 Apr 2024 20:33:41 +0000 (18 13:33 -0700)
tree86706fd5e59e68587ae52ac2ccd9f1bda767efac
parent42aae6a49af1be6108c3133af881cb9429aa3d35
sequencer: start removing private fields from public API

"struct replay_opts" has a number of fields that are for internal
use. While they are marked as private having them in a public struct is
a distraction for callers and means that every time the internal details
are changed we have to recompile all the files that include sequencer.h
even though the public API is unchanged. This commit starts the process
of removing the private fields by adding an opaque pointer to a "struct
replay_ctx" to "struct replay_opts" and moving the "reflog_message"
member to the new private struct.

The sequencer currently updates the state files on disc each time it
processes a command in the todo list. This is an artifact of the
scripted implementation and makes the code hard to reason about as it is
not possible to get a complete view of the state in memory. In the
future we will add new members to "struct replay_ctx" to remedy this and
avoid writing state to disc unless the sequencer stops for user
interaction.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sequencer.c
sequencer.h