Re: [PATCH v2 0/1] Allow reworking with a file when making hunk decisions
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 27, 2026, 17:04 UTC
- Message-ID
- <xmqqtsw7f0mz.fsf@gitster.g>
- In-Reply-To
- <cover.1769522219.git.abrahamadekunle50@gmail.com>
Abraham Samuel Adekunle <abrahamadekunle50@gmail.com> writes:
> 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.
An obvious alternative would be to treat the files as a ring, going next from the last one would take you to the first one, etc., but I think what you described is just as good.
> 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.
I forgot to mention this in the previous review, but this would be a change that existing users may be surprised by. We _might_ need to introduce a flag to enable this as a new and optional feature.
> 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.
The users do need to _knowingly_ leave some hunks undecided and apply what they already decided to use, and I think 'q' is an appropriate option to use. It is what the current system does, and I do not think it changes with this new feature.
Thanks.