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

Disable submodule auto-upgrade on non-master branches

parent a69acc86
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -31,6 +31,11 @@ get_platform()
	esac
}

get_branch()
{
	git rev-parse --abbrev-ref HEAD
}

manage_path()
{
	local var="$1" val="$2"; shift 2
@@ -64,6 +69,11 @@ update_submodules()
	git submodule sync
	git submodule update

	# do not attempt automatic upgrading if not on master branch
	if [ master != `get_branch` ]; then
		return 0
	fi

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