Add $GIT_MERGE_REF build parameter

no documentation or anything, but I'm about to test it