git stash: Give friendlier errors when there is nothing to apply
git stash: Give friendlier errors when there is nothing to apply

The change makes sure a stash (given or default) exists before
checking if the working tree is dirty.

If the default stash is requested, the old message was scary and
included a 'fatal' error from rev-parse:
     fatal: Needed a single revision
     : no valid stashed state found

It is replaced with a friendlier 'Nothing to apply' error, similar to
'git stash branch'.

If a specific stash is specified, the 'Needed a single revision' errors
from rev-parse are suppressed.

Signed-off-by: Ori Avtalion <6c720b6ece72a4972cc39d6436cb370514e267ec@avtalion.name>
Acked-by: Thomas Rast <18f23ef7096473d837b7404952f13710423b8b63@student.ethz.ch>
Acked-by: Nanako Shiraishi <7d97fbf70141dda63063292abadb698cc511a125@lavabit.com>
Signed-off-by: Junio C Hamano <a6723cc3f76163bf7adb636a73ac3b0ceb3e6b9b@pobox.com>

destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git