]> git.ipfire.org Git - thirdparty/git.git/commit
add-patch: respect diff.context configuration
authorLeon Michalak <leonmichalak6@gmail.com>
Tue, 29 Jul 2025 07:01:50 +0000 (07:01 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 29 Jul 2025 15:52:45 +0000 (08:52 -0700)
commit2b0a2db2c0bf4870592656e8f50876957db8660c
tree0a135457df2cec75e8bc75c44ef37f885db5f24f
parent97b99a9eb6b3fec7ff46ab68af423b9a08d5a264
add-patch: respect diff.context configuration

Various builtins that use add-patch infrastructure do not respect
the user's diff.context and diff.interHunkContext file configurations.

The user may be used to seeing their diffs with customized context size,
but not in the patches "git add -p" shows them to pick from.

Teach add-patch infrastructure to read these configuration variables and
pass their values when spawning the underlying plumbing commands as
their command line option.

Signed-off-by: Leon Michalak <leonmichalak6@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
add-interactive.c
add-interactive.h
add-patch.c
t/t3701-add-interactive.sh