summaryrefslogtreecommitdiff
path: root/add-interactive.h
diff options
context:
space:
mode:
authorLeon Michalak <leonmichalak6@gmail.com>2025-07-29 07:01:50 +0000
committerJunio C Hamano <gitster@pobox.com>2025-07-29 08:52:45 -0700
commit2b0a2db2c0bf4870592656e8f50876957db8660c (patch)
tree0a135457df2cec75e8bc75c44ef37f885db5f24f /add-interactive.h
parent97b99a9eb6b3fec7ff46ab68af423b9a08d5a264 (diff)
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>
Diffstat (limited to 'add-interactive.h')
-rw-r--r--add-interactive.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/add-interactive.h b/add-interactive.h
index 693f125e8e..c63f35b14b 100644
--- a/add-interactive.h
+++ b/add-interactive.h
@@ -18,6 +18,7 @@ struct add_i_state {
int use_single_key;
char *interactive_diff_filter, *interactive_diff_algorithm;
+ int context, interhunkcontext;
};
void init_add_i_state(struct add_i_state *s, struct repository *r);