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@xxxxxxxxxxxx> 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