git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git diff ^! syntax stopped working for stashes in Git 2.28

From
TJTim Jaacks <tim.jaacks@garz-fricke.com>
Date
Sep 12, 2022, 09:57 UTC
Message-ID
<6f729c8c43c4409faf6a11a69791f45a@garz-fricke.com>
Hello,
I noticed that the following syntax to show the changes of a stash stopped working in Git 2.28:
  git diff stash@{0}^!
It still works on commits and HEAD, though:
  git diff f27984d^!
  git diff HEAD^!
And diffing against the stash's parent works as well:
  git diff stash@{0}^1 stash@{0}
I assume this is a bug. Can anybody confirm this? I verified the behavior change trying different Git versions via docker:
  docker run -it --rm --user $(id -u):$(id -g) -v $HOME:$HOME:rw -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro -v $PWD:$PWD:rw -w $PWD bitnami/git:2.27.0 diff stash@{0}^!
With v2.27.0 the above syntax works, with v2.28.0 and later it doesn't.

Kind regards, Tim

-- 
Tim Jaacks
SOFTWARE DEVELOPER
SECO Northern Europe GmbH

Schlachthofstrasse 20
21079 Hamburg
Germany
T: +49 40 791899-183
E: tim.jaacks@seco.com

Register: Amtsgericht Hamburg, HRB 148893
Represented by: Dirk Finstel, Marc-Michael Braun, Massimo Mauri
Next: René Scharfe
Message 1 of 6 in “git diff ^! syntax stopped working for stashes in Git 2.28”
  1. Tim JaacksSep 12, 2022
  2. René ScharfeSep 12, 2022
  3. Chris TorekSep 12, 2022
  4. René ScharfeSep 14, 2022
  5. AW: git diff ^! syntax stopped working for stashes in Git 2.28Tim Jaacks, Sep 28, 2022
  6. René ScharfeSep 28, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.