don't iterate binary file changes with (un)stage/revert -p
commitca2bbf4aed5642675804f7ea566e7626fc88d992
authorMark Jamsek <mark@jamsek.dev>
Mon, 4 Nov 2024 11:44:30 +0000 (4 11:44 +0000)
committerThomas Adam <thomas@xteddy.org>
Sun, 10 Nov 2024 11:01:42 +0000 (10 11:01 +0000)
treefef34d4613a37fcd1b5d660e2ee7c430f791063f
parent21615bb29b88b51d50b4e6ba7839751a79c6ae09
don't iterate binary file changes with (un)stage/revert -p

As reported by Johannes Thyssen Tishman, 'got stage -p $binaryfile'
iterates each hunk, and produces unexpected behaviour when answering
'y'. Instead, present the standard "Binary files differ" message and
only allow staging (or unstaging or reverting) the entire binary file.
Includes tests for stage -p but unstage and revert -p tests are still
needed.

tweak + ok stsp@
lib/worktree.c
regress/cmdline/stage.sh