summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8fcaca3)
raw | patch | inline | side by side (parent: 8fcaca3)
author | Gustaf Hendeby <hendeby@isy.liu.se> | |
Tue, 16 Mar 2010 17:52:37 +0000 (18:52 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 17 Mar 2010 02:23:24 +0000 (19:23 -0700) |
The previous error message "fatal: Needed a single revision" is not
very informative.
Signed-off-by: Gustaf Hendeby <hendeby@isy.liu.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
very informative.
Signed-off-by: Gustaf Hendeby <hendeby@isy.liu.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-stash.sh | patch | blob | history |
diff --git a/git-stash.sh b/git-stash.sh
index aa47e541ee4fe55254edc3fb59ef534ba4d5be66..59db3dc38e72fda88d521171a174c08b919677a9 100755 (executable)
--- a/git-stash.sh
+++ b/git-stash.sh
}
show_stash () {
+ have_stash || die 'No stash found'
+
flags=$(git rev-parse --no-revs --flags "$@")
if test -z "$flags"
then
flags=--stat
fi
- w_commit=$(git rev-parse --verify --default $ref_stash "$@") &&
- b_commit=$(git rev-parse --verify "$w_commit^") &&
+ w_commit=$(git rev-parse --quiet --verify --default $ref_stash "$@") &&
+ b_commit=$(git rev-parse --quiet --verify "$w_commit^") ||
+ die "'$*' is not a stash"
+
git diff $flags $b_commit $w_commit
}