git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phillip Wood <phillip.wood123@gmail.com>
To: Leon Michalak <leonmichalak6@gmail.com>, git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>, Jeff King <peff@peff.net>
Subject: Re: Discussion for interactive --patch commands to get --unified support
Date: Fri, 2 May 2025 15:39:25 +0100	[thread overview]
Message-ID: <bf7f6606-e719-4c3d-b7ab-ef7351f66f37@gmail.com> (raw)
In-Reply-To: <CAP9jKjGb-Rcr=RLJEzeFdtrekYM+qmHy+1T1fykU3n9cV4GhGw@mail.gmail.com>

On 29/04/2025 10:16, Leon Michalak wrote:
> 
> (https://stackoverflow.com/questions/6711670/git-show-more-context-when-using-git-add-i-or-git-add-e)
> which mentions you can do `GIT_DIFF_OPTS=-u<number> git add -p` which
> does work however isn't very user friendly or convenient.
This is a question for others on the list rather than Leon - is it 
intentional that the plumbing diff commands respect GIT_DIFF_OPTS? If a 
script that wants to create a diff with a certain number of context 
lines runs `git diff-index -U <context>` is it helpful for that to be 
overridden if GIT_DIFF_OPTS happens to be set in the environment? 
Looking at the history it seems that environment variable used to be the 
only way to override the default context setting but that's not the case 
now.

Best Wishes

Phillip

  parent reply	other threads:[~2025-05-02 14:39 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 [this message]
2025-05-02 16:14   ` Leon Michalak
2025-05-02 16:23     ` Leon Michalak
2025-05-02 16:57     ` Junio C Hamano
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=bf7f6606-e719-4c3d-b7ab-ef7351f66f37@gmail.com \
    --to=phillip.wood123@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=leonmichalak6@gmail.com \
    --cc=peff@peff.net \
    --cc=phillip.wood@dunelm.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).