Commit b491a9e9 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Move stash to after submodule update

So that out-of-date submodules don't poison the stash, move the stash
to after all submodules have been synced and updated.
parent aac93e13
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -60,11 +60,14 @@ get_shell()

update_submodules()
{
	local stash=`git stash create`
	git reset --hard HEAD
	git submodule init
	git submodule sync
	git submodule update

	# stash after sync-update to avoid poisoning the stash
	local stash=`git stash create`
	git reset --hard HEAD

	git submodule foreach 'git checkout origin/`
		git config -f ~/.gitmodules submodule.${name}.auto-update 2>/dev/null ||
			echo master`;