summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit/stash.sh9
1 files changed, 9 insertions, 0 deletions
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