* Feature Request: Allow `-` as a Shortcut for `@{-1}` in `git diff`
@ 2025-01-14 11:01 tao lv
2025-01-14 11:14 ` Kristoffer Haugsbakk
0 siblings, 1 reply; 2+ messages in thread
From: tao lv @ 2025-01-14 11:01 UTC (permalink / raw)
To: git
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Feature Request: Allow `-` as a Shortcut for `@{-1}` in `git diff`
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
0 siblings, 0 replies; 2+ messages in thread
From: Kristoffer Haugsbakk @ 2025-01-14 11:14 UTC (permalink / raw)
To: tao lv, git
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-14 11:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox