Re: Discussion for interactive --patch commands to get --unified support
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 30, 2025, 14:40 UTC
- Message-ID
- <xmqqo6wd3e7v.fsf@gitster.g>
- In-Reply-To
- <CAP9jKjF5suY6mx19knKwWAEHrTJ_meWhktOuMTFixq0hmFsjuA@mail.gmail.com>
Leon Michalak <leonmichalak6@gmail.com> writes:
Show 5 quoted lines
> With all that being said, I propose the following: > - inheriting `diff.context` and `diff.interhunkcontext` as the > defaults for the various interactive/patch commands > - be able to override these defaults on the command line with > `-U<n>/--unified=<n>` and `--inter-hunk-context=<n>` respectively
I think the usage pattern when people use "add -p" and "diff" are different (with "add -p", you get only one hunk at a time, and you may want a bit wider context to avoid getting disoriented, for example) and I agree that it may be useful to be able to specify different context lengths for them, which the above should cover nicely.