zim/modules/git/functions/git-stash-recover

9 lines
240 B
Text
Raw Normal View History

# vim:et sts=2 sw=2 ft=zsh
command git rev-parse --is-inside-work-tree >/dev/null || return 1
2015-12-15 06:12:17 +01:00
local commit
2015-12-19 15:48:29 +01:00
for commit in "${@}"; do
git update-ref -m "$(command git log -1 --pretty='format:%s' ${commit})" \
refs/stash ${commit}
2015-12-15 06:12:17 +01:00
done