1
0
Fork 0
mirror of https://github.com/imjasonh/infinite-git synced 2026-07-18 23:05:16 +00:00

Implement infinite Git HTTP server

This server generates a new commit every time someone pulls from it.
Features:
- Pure Go implementation of Git object format and protocols
- No dependency on git CLI commands
- Thread-safe commit generation
- Read-only Git HTTP smart protocol support
- Comprehensive test suite

Each pull creates a new commit with a unique file containing a timestamp
and counter, making the repository grow infinitely with each pull operation.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Jason Hall 2025-07-23 21:19:02 -04:00
parent fefad053a8
commit 30ca57dae3
Failed to extract signature
19 changed files with 2172 additions and 0 deletions

21
internal/object/blob.go Normal file
View file

@ -0,0 +1,21 @@
package object
// Blob represents a Git blob object (file content).
type Blob struct {
Content []byte
}
// NewBlob creates a new blob object.
func NewBlob(content []byte) *Blob {
return &Blob{Content: content}
}
// Type returns the object type.
func (b *Blob) Type() Type {
return TypeBlob
}
// Serialize returns the blob content.
func (b *Blob) Serialize() []byte {
return b.Content
}