Re: Discussion for interactive --patch commands to get --unified support
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 2, 2025, 16:57 UTC
- Message-ID
- <xmqqfrhnuf06.fsf@gitster.g>
- In-Reply-To
- <CAP9jKjG+khoUmRpVJ8om-bs_qjB=VFCj3p3h0VSaBHVnqPLNVg@mail.gmail.com>
Leon Michalak <leonmichalak6@gmail.com> writes:
Show 6 quoted lines
> 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?