diff --git a/git-submodule.sh b/git-submodule.sh
index 4fd8982894a5d135cac4b27b5b42f57c72228e7e..07dc675cef2c71e487648a4bd8cc18f4d93db917 100755 (executable)
--- a/git-submodule.sh
+++ b/git-submodule.sh
toplevel=$(pwd)
toplevel=$(pwd)
+ # dup stdin so that it can be restored when running the external
+ # command in the subshell (and a recursive call to this function)
+ exec 3<&0
+
module_list |
while read mode sha1 stage path
do
module_list |
while read mode sha1 stage path
do
then
cmd_foreach "--recursive" "$@"
fi
then
cmd_foreach "--recursive" "$@"
fi
- ) ||
+ ) <&3 3<&- ||
die "Stopping at '$path'; script returned non-zero status."
fi
done
die "Stopping at '$path'; script returned non-zero status."
fi
done