summaryrefslogtreecommitdiff
path: root/git-stash.sh
diff options
context:
space:
mode:
Diffstat (limited to 'git-stash.sh')
-rwxr-xr-xgit-stash.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/git-stash.sh b/git-stash.sh
index d4cf818be9..cc28368b01 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -442,6 +442,8 @@ apply_stash () {
assert_stash_like "$@"
git update-index -q --refresh || die "$(gettext "unable to refresh index")"
+ git diff-index --cached --quiet --ignore-submodules HEAD -- ||
+ die "$(gettext "Cannot apply stash: Your index contains uncommitted changes.")"
# current index state
c_tree=$(git write-tree) ||