From: Phillip Wood Date: Mon, 07 Sep 2026 16:40:12 GMT Subject: Re: [PATCH v2 2/3] sequencer: run auto maintenance once a sequence is done Message-ID: <1e9f7b72-9f77-46e9-950e-df60b5a0539f@gmail.com> In-Reply-To: Hi Thomas On 07/09/2026 17:36, Thomas Bachem wrote: > >> Anyway this change is at the end of pick_commits(), just before we >> finish so looks like the right place to call run_auto_maintenance() > > Patrick would rather have one exit shared by both rebase backends. In > my reply to him I've proposed moving the call out of the sequencer > into builtin/rebase.c and builtin/revert.c, the way am.c leaves it to > rebase.c today. Say if you'd rather keep it here. That works for we and means we don't have to sprinkle calls to run_auto_maintenance() around to accommodate the different code paths for single and multiple picks. >> It is a shame the single pick variants of "git cherry-pick" and "git >> revert" do not share the same code path as the multiple pick variants. >> continue_single_pick() runs "git commit" without calling >> run_git_commit() which is also unfortunate, but means that we could just >> rely and "git commit" to call run_auto_maintenance() for us. > > That works until the next patch, which turns auto maintenance off in > every command the sequencer spawns, this "git commit" included. So > somebody has to run it afterwards. With the call in builtin/revert.c, > cherry-pick does that itself once the continue returns. Sounds good Thanks Phillip > >> Do we want to assert that we don't run auto maintenance up to this point? > > Yes, I'll add that, and the next patch will extend this test instead > of adding its own. > >> Using test_grep here would mean we get some useful test output if there >> are not matches in the file. Without that test_line_count just says the >> line count didn't match and prints an empty file. > > Will do. > > Thanks, > Thomas