Skip to content

Refactor internal/git to use go-git library - #14

Merged
starpia-forge merged 3 commits into
mainfrom
refactor-go-git-16707073810486874289
Mar 6, 2026
Merged

Refactor internal/git to use go-git library#14
starpia-forge merged 3 commits into
mainfrom
refactor-go-git-16707073810486874289

Conversation

@starpia-forge

Copy link
Copy Markdown
Owner
  • Installed github.com/go-git/go-git/v5.
  • Rewrote defaultGitManager.Pull to use FetchContext and Reset to simulate git fetch and git reset --hard.
  • Replaced the mock CmdRunner in tests with temporary real repositories created and managed by go-git to ensure the logic behaves identically to the command-line equivalent.

PR created automatically by Jules for task 16707073810486874289 started by @starpia-forge

Replaces the dependency on the host's `git` binary (via `os/exec`) with the `github.com/go-git/go-git/v5` package. Maintains the existing fetch and force reset logic. Also updates the unit tests to use actual temporary `go-git` repositories to accurately test the pull process.

Co-authored-by: starpia-forge <157299292+starpia-forge@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

google-labs-jules Bot and others added 2 commits March 6, 2026 15:35
Resolved `errcheck` failures reported by the CI in `internal/git/manager_test.go` by:
- Explicitly assigning ignored errors to `_` in `defer os.RemoveAll` blocks.
- Explicitly checking error return values for `File.Write`, `File.Close`, and `Worktree.Add`.

Co-authored-by: starpia-forge <157299292+starpia-forge@users.noreply.github.com>
Updated `github.com/cloudflare/circl` to `v1.6.3` to resolve the `GO-2026-4550` vulnerability reported by `govulncheck` in the GitHub Actions CI pipeline.

Co-authored-by: starpia-forge <157299292+starpia-forge@users.noreply.github.com>
@starpia-forge
starpia-forge merged commit a32e210 into main Mar 6, 2026
2 checks passed
@starpia-forge
starpia-forge deleted the refactor-go-git-16707073810486874289 branch March 6, 2026 16:04
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