]> git.ipfire.org Git - thirdparty/git.git/commit
add-patch: quit without skipping undecided hunks
authorRené Scharfe <l.s.r@web.de>
Sat, 25 Oct 2025 05:46:42 +0000 (07:46 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sat, 25 Oct 2025 16:45:07 +0000 (09:45 -0700)
commit13768117f5e174a7a0403607532e33a7dc40b969
tree04e710083a9b21374afaaa7f3c563408c1aaa8f3
parent4e98b730f18d59b670ee57b803e5048b9d14b968
add-patch: quit without skipping undecided hunks

Option q implies d, i.e., it marks any undecided hunks towards the
bottom of the hunk array as skipped.  This is unnecessary; later code
treats undecided and skipped hunks the same: The only functions that
use UNDECIDED_HUNK and SKIP_HUNK are patch_update_file() itself (but
not after its big for loop) and its helpers get_first_undecided() and
display_hunks().

Streamline the handling of option q by quitting immediately.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
add-patch.c