From: Ori Avtalion Date: Tue, 11 Aug 2009 11:12:13 +0000 (+0300) Subject: git stash: Give friendlier errors when there is nothing to apply X-Git-Tag: v1.6.5-rc0~44^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/5fd448f1142c61da31b28c74d7d340938ab0e01d?ds=inline;hp=5fd448f1142c61da31b28c74d7d340938ab0e01d 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 Acked-by: Thomas Rast Acked-by: Nanako Shiraishi Signed-off-by: Junio C Hamano ---