Re: [PATCH v2 8/8] rebase: cleanup action handling
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Apr 20, 2022, 10:34 UTC
- Message-ID
- <220420.861qxs82gl.gmgdl@evledraar.gmail.com>
- In-Reply-To
- <b0d21affa788c5ac953617c3f006b19a28f85d79.1650448612.git.gitgitgadget@gmail.com>
On Wed, Apr 20 2022, Phillip Wood via GitGitGadget wrote:
Show 8 quoted lines
> From: Phillip Wood <phillip.wood@dunelm.org.uk> > > Treating the action as a string is a hang over from the scripted > rebase. The last commit removed the only remaining use of the action > that required a string so lets convert the other action users to use > the existing action enum instead. If we ever need the action name as a > string in the future the action_names array exists exactly for that > purpose.
This is very much an existing issue, just noting this since I read this over: We really should just carry that "action_names" in the "switch" statement immediately below the trace2_cmd_mode() call, see "git grep trace2_cmd_mode". I.e. usually we do it in the "callback".
Or actually just add a OPT_CMDMODE_TRACE2(), which would be an OPT_CALLBACK (see parse_opt_show_current_patch for such an example for a cmdmode callback) that would take the "--continue" string, log "continue" etc (do we really need to munge "edit-todo" to "edit_todo").
But I digress, this code looks fine, thanks.