aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-stash.sh14
1 files changed, 2 insertions, 12 deletions
diff --git a/git-stash.sh b/git-stash.sh
index ff1edc918..7ce818bd1 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -210,19 +210,9 @@ list_stash () {
}
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 --quiet --verify --default $ref_stash "$@") &&
- b_commit=$(git rev-parse --quiet --verify "$w_commit^") ||
- die "'$*' is not a stash"
+ assert_stash_like "$@"
- git diff $flags $b_commit $w_commit
+ git diff ${FLAGS:---stat} $b_commit $w_commit
}
#