git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Taylor Blau <me@ttaylorr.com>
To: Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH 2/2] git-jump: ignore deleted files in diff mode
Date: Tue, 24 Sep 2024 18:03:35 -0400	[thread overview]
Message-ID: <ZvM3N3+JJNlkpZSa@nand.local> (raw)
In-Reply-To: <20240924205558.GC586150@coredump.intra.peff.net>

On Tue, Sep 24, 2024 at 04:55:58PM -0400, Jeff King wrote:
> On Tue, Sep 17, 2024 at 08:03:33AM -0700, Junio C Hamano wrote:
>
> > Taylor Blau <me@ttaylorr.com> writes:
> >
> > > On Sun, Sep 15, 2024 at 07:20:24AM -0400, Jeff King wrote:
> > >> diff --git a/contrib/git-jump/git-jump b/contrib/git-jump/git-jump
> > >> index 78e7394406..3f69675961 100755
> > >> --- a/contrib/git-jump/git-jump
> > >> +++ b/contrib/git-jump/git-jump
> > >> @@ -44,7 +44,7 @@ open_editor() {
> > >>  mode_diff() {
> > >>  	git diff --no-prefix --relative "$@" |
> > >>  	perl -ne '
> > >> -	if (m{^\+\+\+ (.*)}) { $file = $1; next }
> > >> +	if (m{^\+\+\+ (.*)}) { $file = $1 eq "/dev/null" ? undef : $1; next }
> > >
> > > I was surprised to not see you use `--diff-filter` here, but I think
> > > that that makes sense. You only would want to exclude deletions, since
> > > that would be the only time the post-image is /dev/null AFAICT.
> >
> > So "--diff-filter=d" (lowercase)?
>
> Hmm, yeah, I think that probably would work. In my mind, we are
> accepting arbitrary diffs from the user because of the "$@". But anybody
> who overrides us with
>
>   git jump diff --diff-filter=D
>
> maybe gets what they want/deserve. I think it's mostly academic, and as
> the original has already graduated, I'm inclined to leave it unless
> somebody comes back with some use case.

Yeah, this is definitely all academic. I do not at all mind the
implementation that you went with here.

> (Sorry for the slow reply, I am quite behind due to travel last week).

Hopefully your travel back went smoothly. Welcome back :-).

Thanks,
Taylor

  reply	other threads:[~2024-09-24 22:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-15 11:11 [PATCH 0/2] a few git-jump quality-of-life fixes Jeff King
2024-09-15 11:18 ` [PATCH 1/2] git-jump: always specify column 1 for diff entries Jeff King
2024-09-16 20:13   ` Martin Ågren
2024-09-15 11:20 ` [PATCH 2/2] git-jump: ignore deleted files in diff mode Jeff King
2024-09-16 20:14   ` Martin Ågren
2024-09-17  8:58   ` Taylor Blau
2024-09-17 15:03     ` Junio C Hamano
2024-09-24 20:55       ` Jeff King
2024-09-24 22:03         ` Taylor Blau [this message]
2024-09-25 17:11           ` 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=ZvM3N3+JJNlkpZSa@nand.local \
    --to=me@ttaylorr.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /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).