Skip to content

add HashObject + GitAPIImpl write-primitive tests#10416

Merged
coffeegoddd merged 3 commits intomainfrom
db/gitblobstore
Feb 4, 2026
Merged

add HashObject + GitAPIImpl write-primitive tests#10416
coffeegoddd merged 3 commits intomainfrom
db/gitblobstore

Conversation

@coffeegoddd
Copy link
Copy Markdown
Contributor

This PR extends the unified internal/git plumbing API with a streaming blob-write primitive and adds targeted unit coverage for the write building blocks we’ll use to implement GitBlobstore write paths.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 adds a new HashObject method to the internal Git plumbing API that enables streaming blob writes, and includes comprehensive unit tests for the write-path building blocks. The implementation wraps the git hash-object -w --stdin command to create blob objects directly in the Git object database.

Changes:

  • Added HashObject method to the GitAPI interface for writing blob objects from streaming content
  • Implemented HashObject in GitAPIImpl using the git CLI plumbing command
  • Added 7 comprehensive test cases covering blob writing, tree manipulation, ref updates, and commit operations

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
go/store/blobstore/internal/git/api.go Added HashObject interface method definition with documentation
go/store/blobstore/internal/git/impl.go Implemented HashObject method with output parsing and error handling
go/store/blobstore/internal/git/impl_test.go Added comprehensive test coverage for HashObject and other write primitives including round-trip tests, empty blob handling, tree operations, ref management, and CAS updates

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@coffeegoddd
Copy link
Copy Markdown
Contributor Author

@coffeegoddd DOLT

comparing_percentages
100.000000 to 100.000000
version result total
d25cbfe ok 5937471
version total_tests
d25cbfe 5937471
correctness_percentage
100.0

@coffeegoddd coffeegoddd merged commit 2672b1a into main Feb 4, 2026
23 of 25 checks passed
@coffeegoddd coffeegoddd deleted the db/gitblobstore branch February 4, 2026 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants