public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Leon Michalak <leonmichalak6@gmail•com>
Cc: git@vger•kernel.org,  Jeff King <peff@peff•net>,
	phillip.wood@dunelm•org.uk
Subject: Re: Discussion for interactive --patch commands to get --unified support
Date: Fri, 02 May 2025 09:57:45 -0700	[thread overview]
Message-ID: <xmqqfrhnuf06.fsf@gitster.g> (raw)
In-Reply-To: <CAP9jKjG+khoUmRpVJ8om-bs_qjB=VFCj3p3h0VSaBHVnqPLNVg@mail.gmail.com> (Leon Michalak's message of "Fri, 2 May 2025 17:14:22 +0100")

Leon Michalak <leonmichalak6@gmail•com> 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?

  parent reply	other threads:[~2025-05-02 16:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-29  9:16 Discussion for interactive --patch commands to get --unified support Leon Michalak
2025-04-29 16:48 ` Junio C Hamano
2025-04-29 22:09 ` Jeff King
2025-04-30  8:04   ` Leon Michalak
2025-04-30 14:40     ` Junio C Hamano
2025-05-02 14:33   ` Phillip Wood
2025-05-02 14:39 ` Phillip Wood
2025-05-02 16:14   ` Leon Michalak
2025-05-02 16:23     ` Leon Michalak
2025-05-02 16:57     ` Junio C Hamano [this message]
2025-05-02 17:13       ` Leon Michalak
2025-05-02 18:36         ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqfrhnuf06.fsf@gitster.g \
    --to=gitster@pobox$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=leonmichalak6@gmail$(echo .)com \
    --cc=peff@peff$(echo .)net \
    --cc=phillip.wood@dunelm$(echo .)org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox