← Back to Pull requests

Bump go-git and go-billy to v6.0.0-beta.1 #139

Closed
unknown closed this pull request without merging on Nov 04, 2026 13:36 UTC
View on GitHub
unknown unknown commented on Nov 04, 2026 13:23 UTC
Author

Summary

  • Bumps github.com/go-git/go-git/v6 and github.com/go-git/go-billy/v6 from alpha to v6.0.0-beta.1.

  • Bumps testify to v1.12.1 and the indirect dependencies: golang.org/x/net v0.62.0, golang.org/x/sync v0.24.0, ProtonMail/go-crypto v1.5.2, cloudflare/circl v1.6.5, pjbgf/sha1cd v0.7.0, Microsoft/go-winio v0.6.4, spf13/pflag v1.0.10. go mod tidy drops a few indirect entries that are no longer needed.

  • The Go toolchain stays at 1.27.3, which is the current release.
  • Behavior change: refs starting with a dash are now mirrored

    go-git beta.1 removed the leading-dash rule from ReferenceName.Validate. Git applies that rule only when a branch or tag is created (check_branch_ref / check_tag_ref), not in check_refname_format, and git fetch and git clone replicate refs/heads/-foo without complaint. PartitionRefNames and --map validation both defer to Validate, so such refs are now mirrored instead of skipped.

    The rejection was never a deliberate git-sync choice. 0f6a015e adopted Validate to block path traversal and NUL injection, and the dash rule came along with it. That commit's stated goal was to match git and skip nothing git accepts, which this restores. No ref name reaches a command line in a position where a leading dash would be read as an option. The only place one is passed to a subprocess is git tag -s converted/<short> refs/heads/<short> in sha256convert.

    The test case moves from TestPartitionRefNamesRejectsDangerousNames to TestPartitionRefNamesKeepsLegitimateNames, and the doc comment on PartitionRefNames is updated to match.

    Test plan

  • go test -race ./...

  • golangci-lint run ./... (0 issues)
  • 🤖 Generated with Claude Code

    <!-- CURSOR_SUMMARY -->
    ---

    [!NOTE]

    Low Risk

    Mostly dependency and documentation/test updates; the user-visible change is accepting dash-prefixed ref names git already replicates on fetch/clone, with no new command-line exposure for those names.

    > Overview

    Upgrades go-git and go-billy from alpha to v6.0.0-beta.1, bumps testify and several indirect modules (golang.org/x/net, golang.org/x/sync, crypto-related deps, pflag), and tidies go.sum (including dropping unused indirect entries). Toolchain remains go1.27.3.

    > The dependency bump changes ref validation: ReferenceName.Validate no longer rejects names like refs/heads/-foo, aligning with git’s check_refname_format. PartitionRefNames still delegates to Validate, so those refs are mirrored instead of skipped; --map follows the same rule. Comments and tests move refs/heads/-foo from “dangerous” to legitimate names.

    > <sup>Reviewed by Cursor Bugbot for commit 44b805ccd5236adebd8f12cb4a586a83479d28bb. Configure here.</sup>

    <!-- /CURSOR_SUMMARY -->

    Diff: 373 lines (+279 / -94) across 4 files Reviewer: pjbgf Review duration: 12m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.43 · 373 lines diff across 4 files
    0.43
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.354
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #139"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.8% (MEDIUM) · Higher = larger blast radius
    42.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 16.9% · Safe to merge
    16.9%