Skip to content

chore: promote dev to main — go-git v0.14.0 (Mantis #1233)#5

Merged
Snider merged 1 commit into
mainfrom
dev
Apr 30, 2026
Merged

chore: promote dev to main — go-git v0.14.0 (Mantis #1233)#5
Snider merged 1 commit into
mainfrom
dev

Conversation

@Snider

@Snider Snider commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Brings v0.14.0 to main: refactor(go) using core.E consistently. Closes Mantis #1233.

Summary by CodeRabbit

Release Notes

  • Refactor
    • Improved internal error handling consistency across git operations and test utilities for better maintainability.

….Errorf (Mantis #1233)

Migrate go-git error construction to core.E(op, msg, cause) — the
canonical core/go primitive. Replaces ad-hoc core.NewError / core.Errorf
call sites in:

- go/git.go         — resultError uses core.E with the op label
- go/service.go     — gitServiceErrorWithArgs uses the first arg as op
                      discriminator (more specific than the previous
                      flat "git.service" label)
- go/tests/cli/git/main.go — non-test CLI driver migrated

Build, vet, test all clean (sandbox-safe cache).

Out of scope (left as follow-up):
- core.Cmd git execution (push/pull) stays in place — those helpers
  don't have *core.Core access and need attached stdio for interactive
  SSH prompts. Migration to c.Process() would lose interactive behaviour
  and require public API changes.
- 2 result-discards in production code (audit.sh dim) — separate ticket.

Closes tasks.lthn.sh/view.php?id=1233

Co-authored-by: Codex <noreply@openai.com>
@Snider Snider merged commit 7d484e7 into main Apr 30, 2026
4 checks passed
@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Apr 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 28 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
go/tests/cli/git/main.go 0.00% 28 Missing ⚠️

📢 Thoughts on this report? Let us know!

@sonarqubecloud

Copy link
Copy Markdown

@coderabbitai

coderabbitai Bot commented Apr 30, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4ecc8619-96ce-407a-bcb4-ae9a7d2b7c8a

📥 Commits

Reviewing files that changed from the base of the PR and between 68a266b and 82337cf.

📒 Files selected for processing (3)
  • go/git.go
  • go/service.go
  • go/tests/cli/git/main.go

📝 Walkthrough

Walkthrough

Error handling refactored across three files to consistently use core.E for error construction. resultError and gitServiceErrorWithArgs now apply explicit operation keys during error creation. CLI test helpers updated to uniform core.E error reporting with explicit operation identifiers.

Changes

Cohort / File(s) Summary
Core error handling
go/git.go, go/service.go
Updated error construction to use core.E with explicit operation keys. resultError now uses "git.resultError" key; gitServiceErrorWithArgs dynamically selects operation key from arguments and applies core.E consistently.
Test helpers
go/tests/cli/git/main.go
Restructured CLI test helper errors to consistently use core.E with explicit keys (e.g., git.cli.verifyStatusResults, git.cli.runGit), replacing direct core.Errorf/core.NewError calls.

Review rate limit: 4/5 reviews remaining, refill in 12 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant