Initializes the git repository (if the local directory exists it will be erased).

@throws UserMessageException
323827
public function initialize()
    {
        $directory = $this->getWorktreeDirectory();
        $fs = $this->getFilesystem();
        if (@$fs->isDirectory($directory)) {
            @$fs->cleanDirectory($directory);
            if (count($fs->files($directory)) > 0 || count($fs->directories($directory)) > 0) {
                throw new UserMessageException(t('Failed to empty directory %s', $directory));
            }
        } else {
            if (@$fs->makeDirectory($directory, DIRECTORY_PERMISSIONS_MODE_COMPUTED) !== true) {
                throw new UserMessageException(t('Failed to create directory %s', $directory));
            }
        }
        try {
            $cmd = 'clone --quiet --no-checkout --origin origin';
            $cmd .= ' ' . escapeshellarg($this->gitRepository->getURL()) . ' ' . escapeshellarg(str_replace('/', DIRECTORY_SEPARATOR, $directory));
            $this->runGit($cmd);
        } catch (Exception $x) {
            try {
                $fs->deleteDirectory($directory);
            } catch (Exception $foo) {
            }
            throw $x;
        }
    }
1243962
public final void initialize() throws PersistenceException, SevereMessageStoreException
    {
        PersistentMessageStore pm = _messageStore.getPersistentMessageStore();
        final HashMap tupleMap = _buildTupleMap(pm);
        _buildStreamTree(tupleMap);
        _recoverStreamsWithInDoubts(pm);
    }
281115
protected void init() {
		// Get all our messages
		objectSingularName = getApplicationConfig().messageResolver().getMessage(
				modelId + ".objectName.singular");
		objectPluralName = getApplicationConfig().messageResolver().getMessage(
				modelId + ".objectName.plural");
	}
1330343
public function on_start()
    {
        parent::on_start();
        $pkID = $this->request->get('pkID');
        $this->permissionKey = $pkID ? PermissionKey::getByID($pkID) : null;
        if (!$this->permissionKey) {
            throw new UserMessageException('Invalid Permission Key');
        }
        $this->permissionKey->setPermissionObject($this->area);
        $this->set('pk', $this->permissionKey);
    }
37747
def init_repo(path):
    """"""
    sh("git clone %s %s"%(pages_repo, path))
    here = os.getcwd()
    cd(path)
    sh('git checkout gh-pages')
    cd(here)
1369867
@Override
    public void init(RestoreManagerConfig config, SnapshotJobManager jobManager) {
        this.config = config;
        this.jobManager = jobManager;
    }
1215228
private static void init() {
        String pkgs = System.getProperty("java.protocol.handler.pkgs");
        if (pkgs == null || pkgs.trim().length() == 0) {
            pkgs = "org.jboss.net.protocol|org.jboss.vfs.protocol";
            System.setProperty("java.protocol.handler.pkgs", pkgs);
        } else if (pkgs.contains("org.jboss.vfs.protocol") == false) {
            if (pkgs.contains("org.jboss.net.protocol") == false) { pkgs += "|org.jboss.net.protocol"; }
            pkgs += "|org.jboss.vfs.protocol";
            System.setProperty("java.protocol.handler.pkgs", pkgs);
        }
    }
385388
protected function setup()
    {
        if (!$this->dir) {
            // Greate a temporary directory.
            $tempfile = tempnam(sys_get_temp_dir(), '');
            mkdir($tempfile.'.git');
            if (file_exists($tempfile)) {
                unlink($tempfile);
            }
            $this->dir = $tempfile.'.git';
            $this->git = $this->wrapper->init($this->dir);
        }
        if ($this->git) {
            $this->git->config('user.name', 'GitMerge');
            $this->git->config('user.email', 'gitmerge@php-merge.example.com');
            $this->git->config('merge.conflictStyle', 'diff3');
        }
    }
514387
@VisibleForTesting
  void initializeHelixManager() {
    this.multiManager = new GobblinHelixMultiManager(
        this.config, new Function<Void, MessageHandlerFactory>() {
          @Override
          public MessageHandlerFactory apply(Void aVoid) {
            return GobblinClusterManager.this.getUserDefinedMessageHandlerFactory();
          }
        }, this.eventBus, stopStatus) ;
    this.multiManager.addLeadershipChangeAwareComponent(this);
  }
626851
public void initialize() {
		mIsForceStop = false;
		mTagStack.clear();
		mTagValueCache.clear();
		mTagAttrCache.clear();
		mCurrentTagKey = null;
	}
31920
private void init() {
    masterLanguage = null;
    additionalRootAttrs.clear();
    // the collection is not modifiable and therefore cannot be cleared.
    additionalNamespaces = new ArrayList<>();
    textNodeList.clear();
    parseWarnings.clear();
  }
385115
def initialize_repo(self):
        

        logging.info('Repo {} doesn\'t exist. Cloning...'.format(self.repo_dir))
        clone_args = ['git', 'clone']
        if self.depth and self.depth > 0:
            clone_args.extend(['--depth', str(self.depth)])
        clone_args.extend(['--branch', self.branch_name])
        clone_args.extend([self.git_url, self.repo_dir])
        yield from execute_cmd(clone_args)
        yield from execute_cmd(['git', 'config', 'user.email', 'nbgitpuller@example.com'], cwd=self.repo_dir)
        yield from execute_cmd(['git', 'config', 'user.name', 'nbgitpuller'], cwd=self.repo_dir)
        logging.info('Repo {} initialized'.format(self.repo_dir))
745077
def create_initialize(repo, atts)
      @repo = repo
      atts.each do |k, v|
        instance_variable_set("@#{k}".to_sym, v)
      end
      self
    end
557451
protected function initGitUtil()
    {
        $this->gitUtil = new GitUtil($this->io, $this->config, $this->process, $this->filesystem);
        return $this;
    }
1097337
public function initializeObject()
    {
        if (!is_dir($this->path) && !is_link($this->path)) {
            throw new Exception('The directory "' . $this->path . '" which was configured as a resource storage does not exist.', 1361533189);
        }
    }
884516
async function initRepo({ repository, token, endpoint, gitFs, localDir }) {
  const opts = hostRules.find({ platform: 'gitlab' }, { token, endpoint });
  if (!opts.token) {
    throw new Error(`No token found for GitLab repository ${repository}`);
  }
  hostRules.update({ ...opts, platform: 'gitlab', default: true });
  config = {};
  get.reset();
  config.repository = urlEscape(repository);
  config.gitFs = gitFs;
  config.localDir = localDir;
  let res;
  try {
    res = await get(`projects/${config.repository}`);
    if (res.body.archived) {
      logger.info(
        'Repository is archived - throwing error to abort renovation'
      );
      throw new Error('archived');
    }
    if (res.body.default_branch === null) {
      throw new Error('empty');
    }
    config.defaultBranch = res.body.default_branch;
    config.baseBranch = config.defaultBranch;
    logger.debug(`${repository} default branch = ${config.baseBranch}`);
    // Discover our user email
    config.email = (await get(`user`)).body.email;
    logger.debug('Bot email=' + config.email);
    delete config.prList;
    // istanbul ignore if
    if (config.gitFs) {
      logger.debug('Enabling Git FS');
      const { host } = URL.parse(opts.endpoint);
      const url = GitStorage.getUrl({
        gitFs,
        auth: 'oauth2:' + opts.token,
        hostname: host || 'gitlab.com',
        repository,
      });
      config.storage = new GitStorage();
      await config.storage.initRepo({
        ...config,
        url,
      });
    } else {
      config.storage = new Storage();
      await config.storage.initRepo(config);
    }
    await Promise.all([getPrList(), getFileList()]);
  } catch (err) /* istanbul ignore next */ {
    logger.debug('Caught initRepo error');
    if (err.message.includes('HEAD is not a symbolic ref')) {
      throw new Error('empty');
    }
    if (['archived', 'empty'].includes(err.message)) {
      throw err;
    }
    if (err.statusCode === 403) {
      throw new Error('forbidden');
    }
    if (err.statusCode === 404) {
      throw new Error('not-found');
    }
    logger.info({ err }, 'Unknown GitLab initRepo error');
    throw err;
  }
  return {};
}
183009
protected void initGitFlowConfig() throws MojoFailureException,
            CommandLineException {
        gitSetConfig("gitflow.branch.master",
                gitFlowConfig.getProductionBranch());
        gitSetConfig("gitflow.branch.develop",
                gitFlowConfig.getDevelopmentBranch());

        gitSetConfig("gitflow.prefix.feature",
                gitFlowConfig.getFeatureBranchPrefix());
        gitSetConfig("gitflow.prefix.release",
                gitFlowConfig.getReleaseBranchPrefix());
        gitSetConfig("gitflow.prefix.hotfix",
                gitFlowConfig.getHotfixBranchPrefix());
        gitSetConfig("gitflow.prefix.support",
                gitFlowConfig.getSupportBranchPrefix());
        gitSetConfig("gitflow.prefix.versiontag",
                gitFlowConfig.getVersionTagPrefix());

        gitSetConfig("gitflow.origin", gitFlowConfig.getOrigin());
    }