{"thread":{"id":"62803","subject":"Feature Request: Allow `-` as a Shortcut for `@{-1}` in `git diff`","startedAt":"2025-01-14T11:01:45Z","lastAt":"2025-01-14T11:14:32Z","messageCount":2,"participants":["tao lv","Kristoffer Haugsbakk"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"510492","messageId":"CAFePT4w4hHZnS0TXGA6-_sA-Vp4f3H_sY2Ue1XreFM3SEM8i2g@mail.gmail.com","threadId":"62803","inReplyTo":null,"subject":"Feature Request: Allow `-` as a Shortcut for `@{-1}` in `git diff`","fromName":"tao lv","fromEmail":"thebookofunknowable@gmail.com","sentAt":"2025-01-14T11:01:34Z","receivedAt":"2025-01-14T11:01:45Z","isPatch":false,"sender":{"key":"thebookofunknowable@gmail.com","avatar":null},"body":"Hi,\n\nI would like to request a feature for `git diff`: to allow the use of\n`-` as a shortcut for `@{-1}`. Currently, `git merge` and `git\ncheckout` both support using `-` as a shortcut for `@{-1}`, and I hope\nthis functionality can be extended to `git diff` as well.\n\nThank you for considering this request.\n\nBest regards\n"},{"id":"510494","messageId":"85491d3b-336c-4b48-b16e-962012b4f5f7@app.fastmail.com","threadId":"62803","inReplyTo":"CAFePT4w4hHZnS0TXGA6-_sA-Vp4f3H_sY2Ue1XreFM3SEM8i2g@mail.gmail.com","subject":"Re: Feature Request: Allow `-` as a Shortcut for `@{-1}` in `git diff`","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2025-01-14T11:14:11Z","receivedAt":"2025-01-14T11:14:32Z","isPatch":false,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"On Tue, Jan 14, 2025, at 12:01, tao lv wrote:\n> Hi,\n>\n> I would like to request a feature for `git diff`: to allow the use of\n> `-` as a shortcut for `@{-1}`. Currently, `git merge` and `git\n> checkout` both support using `-` as a shortcut for `@{-1}`, and I hope\n> this functionality can be extended to `git diff` as well.\n>\n> Thank you for considering this request.\n>\n> Best regards\n\nFor what it’s worth: a patch to add this for git-branch(1) was rejected in 2022:\n\nhttps://lore.kernel.org/git/xmqqedwgfpkr.fsf@gitster.g/\n\n-- \nKristoffer Haugsbakk\n"}]}