threads / discuss / 51784

"show" in git-stash(1)

Subject: "show" in git-stash(1)

## tl;dr

One message between Sep 2, 2019 and Sep 2, 2019.

replies: 0people: 1as markdown or json

Ulrich Windl· Sep 2, 2019, 07:01 UTC · lore
Hi!
Reading the (somewhat older) manual page GIT-STASH(1)  for "show" I found:
       show [<stash>]
           Show the changes recorded in the stash as a diff between the
           stashed state and its original parent. When no <stash> is given,
           shows the latest one. By default, the command shows the diffstat,
           but it will accept any format known to git diff (e.g., git stash
           show -p stash@{1} to view the second most recent stash in patch
           form). You can use stash.showStat and/or stash.showPatch config
           variables to change the default behavior.
The syntax summary suggested that there are no further "interesting options", but somewhat later googling for "git diff against a stash" (a very frequently asked question, BTW) showed that a diff output is enabled if there are diff options like "-u". Agreed, it is explained further down in the text, but users reading manual pages "efficiently" may miss that ;-)

Why not change the syntax to something like "show [diff-option]... [<stash>] ?

Regards,# Ulrich

← back to recent threads