Gush\Helper\GitConfigHelper::ensureNotesFetching PHP Method

ensureNotesFetching() public method

Ensures the fetching of notes is configured for the remote.
public ensureNotesFetching ( string $remote )
$remote string
    public function ensureNotesFetching($remote)
    {
        $fetches = StringUtil::splitLines($this->getGitConfig('remote.' . $remote . '.fetch', 'local', true));
        if (!in_array('+refs/notes/*:refs/notes/*', $fetches, true)) {
            $this->getHelperSet()->get('gush_style')->note(sprintf('Set fetching of notes for remote "%s".', $remote));
            $this->processHelper->runCommand(['git', 'config', '--add', '--local', 'remote.' . $remote . '.fetch', '+refs/notes/*:refs/notes/*']);
        }
    }