[PATCH v2 0/1] Allow reworking with a file when making hunk decisions
- From
Abraham Samuel Adekunle <abrahamadekunle50@gmail.com>
- Date
- Jan 27, 2026, 15:43 UTC
- Message-ID
- <cover.1769522219.git.abrahamadekunle50@gmail.com>
- In-Reply-To
- <cover.1769164663.git.abrahamadekunle50@gmail.com>
Hello, After review and suggestions from Junio, I have been able to add the '<' and '>' options for going to the previous file and next file respectively. If there is only one file, neither of the options will be available, if we are in the second of three or more file, both '<' and '>' will be available and if we are at the last file, only '<' will be available.
This will enable simultaneous hunk decisions between between files. After all decisions have been made in a file, a prompt shows which asks "All hunks decided. What now?" that allows reworking with the file, moving to the next or previous file as the case may be.
Since all hunks in the file have been decided, if the user navigates to a particular hunk with 'K' or 'J' and redecides on an already decided hunk with options such as, 'y' or 'n', the user is taken back to the first hunk with the "what now?" prompt shown.
The decision to use 'q' as a submit is because after some or all the decisions have been made in a file, 'q' submits them as is even though in the `help_patch_text` it say `q` will not stage the current hunk and all hunks after it. This is not true if hunks decisions have been made and the user navigates with 'K' and 'J' or uses 'a' to select all hunks and 'q' after wards
I have not attempted to work on the t/3701-interactive.sh yet but this will be done after concensus on the UI when all hunks have been decided.
Abraham Samuel Adekunle (1): Allow reworking with a file after deciding on all its hunks
add-patch.c | 139 ++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 102 insertions(+), 37 deletions(-)
-- 2.39.5 (Apple Git-154)