Skip to content

Make fast blob reads optional - #9

Merged
andrew merged 2 commits into
mainfrom
optional-fast-blob-reader
Aug 18, 2026
Merged

Make fast blob reads optional#9
andrew merged 2 commits into
mainfrom
optional-fast-blob-reader

Conversation

@andrew

@andrew andrew commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Moves the in-process go-git blob reader into the nested github.com/git-pkgs/clone/gogit module. The root Blob and InspectBlob functions use git show, so clone-only consumers no longer inherit the go-git module graph. Scrutineer can opt into gogit and keep the fast reader. Includes tests, CI coverage, Dependabot configuration, and usage documentation for both modules.

Closes #7.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes the fast in-process blob reader optional by moving the go-git implementation into a nested github.com/git-pkgs/clone/gogit module, while keeping the root clone module’s blob reads implemented via git show to reduce the dependency graph for clone-only consumers.

Changes:

  • Refactors root clone.Blob / clone.InspectBlob to read blobs via the git binary (removing go-git dependencies from the root module graph).
  • Adds a nested gogit module containing the go-git-backed blob reader, with tests/benchmarks and compatibility fallback to git show.
  • Updates documentation and CI/Dependabot to account for the additional module.

Reviewed changes

Copilot reviewed 13 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
README.md Documents root blob behavior (git show) and the opt-in gogit module usage.
doc.go Updates package docs to reference the optional gogit module for in-process blob reads.
go.mod Removes go-git dependencies from the root module.
go.sum Drops go-git-related sums from the root module.
blob.go Switches root blob reads to git show only.
blob_test.go Updates tests to reflect git being required on PATH for root blob reads; moves go-git coverage out.
gogit/doc.go Adds package docs for the gogit module.
gogit/blob.go Implements go-git-backed Blob/InspectBlob with fallback to root clone git-based behavior.
gogit/blob_test.go Adds tests/benchmarks for the gogit blob reader across repo layouts and fallbacks.
gogit/object_store.go Moves/renames the go-git object-store implementation into package gogit.
gogit/test_helpers_test.go Adds git test helpers and deterministic git environment for gogit tests.
gogit/go.mod Introduces the nested module definition and dependencies (including clone).
gogit/go.sum Adds sums for the nested module’s dependency set (go-git graph).
.github/workflows/ci.yml Builds/tests/lints both the root module and the gogit submodule in CI.
.github/dependabot.yml Adds Dependabot updates for gomod in /gogit.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread gogit/blob.go Outdated
Comment thread gogit/go.mod
@andrew
andrew merged commit bda0270 into main Aug 18, 2026
2 checks passed
@andrew
andrew deleted the optional-fast-blob-reader branch August 18, 2026 12:01
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.

Make the fast blob reader optional for clone-only consumers

2 participants