<commit_before><?php

class KirbyGitHelper
{
    private $repo;
    private $repoPath;
    private $branch;
    private $pullOnChange;
    private $pushOnChange;
    private $commitOnChange;
    private $gitBin;
    private $windowsMode;

    public function __construct($repoPath = false)
    {
        $this->repoPath = $repoPath ? $repoPath : __DIR__ . '/../../../content';
        $this->branch = c::get('gcapc-branch', 'master');
    }

    private function initRepo()
    {
        if (!class_exists("Git")) {
            require('Git.php/Git.php');
        }

        $this->pullOnChange = c::get('gcapc-pull', false);
        $this->pushOnChange = c::get('gcapc-push', false);
        $this->commitOnChange = c::get('gcapc-commit', false);
        $this->gitBin = c::get('gcapc-gitBin', '');<commit_msg>refactor: use kirby function to get content folder<commit_after><?php

class KirbyGitHelper
{
    private $repo;
    private $repoPath;
    private $branch;
    private $pullOnChange;
    private $pushOnChange;
    private $commitOnChange;
    private $gitBin;
    private $windowsMode;

    public function __construct($repoPath = false)
    {
        $this->repoPath = $repoPath ? $repoPath : kirby()->roots()->content();
        $this->branch = c::get('gcapc-branch', 'master');
    }

    private function initRepo()
    {
        if (!class_exists("Git")) {
            require('Git.php/Git.php');
        }

        $this->pullOnChange = c::get('gcapc-pull', false);
        $this->pushOnChange = c::get('gcapc-push', false);
        $this->commitOnChange = c::get('gcapc-commit', false);
        $this->gitBin = c::get('gcapc-gitBin', '');
{'fraction_non_alphanumeric': 0.16656608328304165, 'fraction_numerical': 0.0, 'mean_word_length': 2.776765375854214, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2911765', 'n_tokens_mistral': 542, 'n_tokens_neox': 528, 'n_words': 102}