We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e80014a + 14cd458 commit 5d4bd79Copy full SHA for 5d4bd79
git-stash.sh
@@ -210,14 +210,18 @@ list_stash () {
210
}
211
212
show_stash () {
213
+ have_stash || die 'No stash found'
214
+
215
flags=$(git rev-parse --no-revs --flags "$@")
216
if test -z "$flags"
217
then
218
flags=--stat
219
fi
220
- w_commit=$(git rev-parse --verify --default $ref_stash "$@") &&
- b_commit=$(git rev-parse --verify "$w_commit^") &&
221
+ w_commit=$(git rev-parse --quiet --verify --default $ref_stash "$@") &&
222
+ b_commit=$(git rev-parse --quiet --verify "$w_commit^") ||
223
+ die "'$*' is not a stash"
224
225
git diff $flags $b_commit $w_commit
226
227
0 commit comments