This is what I have been using currently although the perfectionist in me says that a user could pass `--unified=-1` and the code would treat that as if nothing was passed by the user. In practice, I guess this doesn't really matter. I think that was probably a needed sanity check, thanks On Fri, 2 May 2025, 17:57 Junio C Hamano, <gitster@xxxxxxxxx> wrote: > > Leon Michalak <leonmichalak6@xxxxxxxxx> 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?