def _write_master_branch_resource(self, content, fn, commit_msg, is_json=False):
        """This will force the current branch to master! """
        # TODO: we might want this to push, but currently it is only called in contexts in which
        # we are about to push anyway (document creation)
        with self._master_branch_repo_lock:
            ga = self._create_git_action_for_global_resource()
            with ga.lock():
                ga.checkout_master()
                if is_json:
                    write_as_json(content, fn)
                else:
                    write_to_filepath(content, fn)
                ga._add_and_commit(fn, self._infrastructure_commit_author, commit_msg)
def _write_master_branch_resource ( self , content , fn , commit_msg , is_json = False ) : with self . _master_branch_repo_lock : ga = self . _create_git_action_for_global_resource ( ) with ga . lock ( ) : ga . checkout_master ( ) if is_json : write_as_json ( content , fn ) else : write_to_filepath ( content , fn ) ga . _add_and_commit ( fn , self . _infrastructure_commit_author , commit_msg )
This will force the current branch to master!