diff --git a/.config/zsh/autoload/git/git-perm-stash b/.config/zsh/autoload/git/git-perm-stash index b90c093..4132355 100755 --- a/.config/zsh/autoload/git/git-perm-stash +++ b/.config/zsh/autoload/git/git-perm-stash @@ -11,7 +11,7 @@ git rev-parse idx="${1:-0}" stash_ref="$(git rev-parse stash@{$idx} | cut -c-$REF_LEN)" -commit_ref="$(git rev-parse HEAD | cut -c-$REF_LEN)" +commit_ref="$(git rev-parse stash@{$idx}~ | cut -c-$REF_LEN)" git stash show -up "$idx" > \ "${2:-$DIR}/${PWD//\//__}__${commit_ref}__$stash_ref.diff"