From: "Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail•com>
To: "tao lv" <thebookofunknowable@gmail•com>, git@vger•kernel.org
Subject: Re: Feature Request: Allow `-` as a Shortcut for `@{-1}` in `git diff`
Date: Tue, 14 Jan 2025 12:14:11 +0100 [thread overview]
Message-ID: <85491d3b-336c-4b48-b16e-962012b4f5f7@app.fastmail.com> (raw)
In-Reply-To: <CAFePT4w4hHZnS0TXGA6-_sA-Vp4f3H_sY2Ue1XreFM3SEM8i2g@mail.gmail.com>
On Tue, Jan 14, 2025, at 12:01, tao lv wrote:
> Hi,
>
> I would like to request a feature for `git diff`: to allow the use of
> `-` as a shortcut for `@{-1}`. Currently, `git merge` and `git
> checkout` both support using `-` as a shortcut for `@{-1}`, and I hope
> this functionality can be extended to `git diff` as well.
>
> Thank you for considering this request.
>
> Best regards
For what it’s worth: a patch to add this for git-branch(1) was rejected in 2022:
https://lore.kernel.org/git/xmqqedwgfpkr.fsf@gitster.g/
--
Kristoffer Haugsbakk
prev parent reply other threads:[~2025-01-14 11:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-14 11:01 Feature Request: Allow `-` as a Shortcut for `@{-1}` in `git diff` tao lv
2025-01-14 11:14 ` Kristoffer Haugsbakk [this message]
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=85491d3b-336c-4b48-b16e-962012b4f5f7@app.fastmail.com \
--to=kristofferhaugsbakk@fastmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=thebookofunknowable@gmail$(echo .)com \
/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