Subject: [PATCH v3 0/3] introduce new option `rework-with-file`

From: Abraham Samuel Adekunle <[email-masked]>
Date: Fri, 6 Feb 2026 16:52:39 +0100

Hello,
After further review from Junio, I have been able to make reworking with a
file during hunk selection an optional feature by passing the `rework-with-file`
flag to the --patch option in the interactive machinery.

With the option, users can navigate in between files and while deciding on
hunks as they wish with the '>' and '<' option for going to the next and
previous file respectively if there are more than one file.

The process shows a prompt which allows reworking with the file and changing
previous decisions if need be, going to the next or previous file if possible
or using 'q' to submit and end the process.

Patch 1 implements the new 'rework-with-file' options, Patch 2 makes some changes
to allow interfile navigation when the option is supplied and Patch 3 modifies
the code to allow the patches to be applied only after all decisions have
been made and session ends when this option is enabled.

Abraham Samuel Adekunle (3):
  interactive -p: add new `--rework-with-file` flag to interactive
    machinery
  add-patch: Allow interfile navigation when selecting hunks
  add-patch: Allow proper 'git apply' when using the --rework-with-file
    flag

 add-interactive.c     |   3 +
 add-interactive.h     |   5 +-
 add-patch.c           | 161 +++++++++++++++++++++++++++++++-----------
 builtin/add.c         |   4 ++
 builtin/checkout.c    |   6 ++
 builtin/reset.c       |   4 ++
 builtin/stash.c       |   8 +++
 t/t9902-completion.sh |   1 +
 8 files changed, 148 insertions(+), 44 deletions(-)

-- 
2.39.5 (Apple Git-154)