{"version":"2.1.334","anchor":"push-on-release-checks-the-git-before-pushing-outcome-branc","canonical_anchor":"push-on-release-checks-the-git-before-pushing-outcome-branc","heading":"Runner checks repositories before pushing or fetching outcome branches","tier":"notice","area":"Git","scope":"both","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.334\/e\/push-on-release-checks-the-git-before-pushing-outcome-branc","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.334","markdown":"### Runner checks repositories before pushing or fetching outcome branches\n\nThe runner now probes a repository's .git before git calls on outcome branches and skips or guards them when it looks unreadable or suspect\n\n**What**\n\nThe runner, which carries out sessions and pushes their results to an outcome branch in git, now checks a repository before using git on it:\n\n- A new probe classifies a repository as plain, guarded or none.\n\n- Before pushing on release, if git cannot read the `.git` folder, the branch is not pushed and a warning says \"NOT pushed: git could not read the .git\".\n\n- If the repository looks suspect, the push runs with `safe.bareRepository=explicit`, a git setting that stops git from using a repository it was not explicitly pointed at.\n\n- Switching to and fetching the outcome branch now work out extra git arguments and extra environment settings first, instead of starting git directly.\n\n- Failures are logged as `[runner:warn] fetch outcome branch not run:` and `not run:`.\n\n**Why**\n\nThis protects runner sessions, including self-hosted ones, against a hostile `.git` folder placed in a session folder. It also means a push or fetch can now be skipped, so look for these warnings if an outcome branch does not appear.\n\n- Area: Git\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 2\/5\n- Scope: both\n- Heads-up: no"}