Subject: Re: Discussion for interactive --patch commands to get --unified support

From: Junio C Hamano <[email-masked]>
Date: Fri, 02 May 2025 09:57:45 -0700

Leon Michalak <[email-masked]> writes:

> Inheriting the diff.context setting is what scratches my itch the most, although
> also being able to set the context in the command list of `add -i`
> sounds interesting too. Personally, I don't think I would use the
> command line overrides too much myself as most of the time (like with
> diff) I'd like to set the option and forget it but it does have a
> certain consistency to it.

Sounds good.

> Slightly off-topic to the discussion, but does anyone have advice on
> how to deal with providing a sentinel value for something like
> context?

Seeing in diff.c

    static int diff_context_default = 3;
    static int diff_interhunk_context_default;

that they are of signed type, and negative context would not make
sense (would it???), wouldn't -1 be a good "they haven't touched
this from the command line or configuration" value?