From 32d44d3d43b21ff3fc1e718cab5b675e2b19bd47 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 27 Oct 2011 11:15:12 +0200 Subject: Improve stash.sh script --- git/stash.sh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'git') diff --git a/git/stash.sh b/git/stash.sh index 139f294..4a3eb99 100755 --- a/git/stash.sh +++ b/git/stash.sh @@ -10,6 +10,15 @@ wd=`pwd` for i in $modules; do echo "stash $i" 1>&2 cd $i + + if [ "$1" = "pop" -o "$1" = "apply" ]; then + l=`git stash list` + if [ -z "$l" ]; then + cd $wd + continue + fi + fi + git stash $* if [ $? -ne 0 ]; then -- cgit v1.1