1
0
Fork 0
mirror of https://github.com/imjasonh/infinite-git synced 2026-07-09 17:39:03 +00:00
No description
Find a file
Claude 4455b83a47
Rewrite infinite-go tests to use git clone + go build
Replace the go-git library tests with tests that shell out to `git clone`
and `git pull`, then verify each clone/pull produces a compilable Go
package with a unique PullTime. This more closely simulates the real
`go get @latest` with GOPROXY=direct flow.

- TestGoGet: 3 fresh clones, each builds and has unique PullTime
- TestGoGetPull: clone then 3 pulls, each builds and updates PullTime
- TestGoGetDiscovery: ?go-get=1 returns correct go-import meta tag

https://claude.ai/code/session_01HpvELk7HnbJoXEUjqHP7SU
2026-04-03 12:11:45 +00:00
.github/workflows Combine CI jobs into a single "test" job 2026-04-02 07:28:32 +00:00
cmd Rewrite infinite-go tests to use git clone + go build 2026-04-03 12:11:45 +00:00
iac Deploy to Cloud Run with Terraform 2025-07-23 22:47:52 -04:00
internal Add cmd/infinite-go: serve Go package with PullTime via git 2026-04-03 08:22:45 +00:00
.gitignore Deploy to Cloud Run with Terraform 2025-07-23 22:47:52 -04:00
go.mod Implement pure Go Git HTTP server without CLI dependencies 2025-07-23 22:28:50 -04:00
go.sum Implement pure Go Git HTTP server without CLI dependencies 2025-07-23 22:28:50 -04:00
LICENSE Initial commit 2025-07-23 21:17:28 -04:00
plan.md Implement infinite Git HTTP server 2025-07-23 21:19:02 -04:00
README.md Update README.md 2025-07-23 23:11:15 -04:00
test.sh Implement pure Go Git HTTP server without CLI dependencies 2025-07-23 22:28:50 -04:00

Infinite Git

A Git HTTP server that generates a new commit every time someone pulls from the repository.

Try it out

Clone the repo

git clone https://infinite-git-nd2dq3gc7a-uk.a.run.app/ /tmp/infinite-git && cd /tmp/infinite-git

Pull, and just keep pulling:

$ git pull
warning: no common commits
Unpacking objects: 100% (40/40), 4.14 KiB | 847.00 KiB/s, done.
From https://infinite-git-nd2dq3gc7a-uk.a.run.app
   df979d4..d483466  main       -> origin/main
Updating df979d4..d483466
Fast-forward
 hello.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
$ git pull
warning: no common commits
Unpacking objects: 100% (43/43), 4.45 KiB | 912.00 KiB/s, done.
From https://infinite-git-nd2dq3gc7a-uk.a.run.app
   d483466..47f0fcb  main       -> origin/main
Updating d483466..47f0fcb
Fast-forward
 hello.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

.....and so on.

How It Works

  1. When a client initiates a pull/clone, the server intercepts the reference discovery request
  2. Before advertising refs, it generates a new commit with:
    • A unique file containing the pull counter and timestamp
    • A commit message indicating when the pull occurred
  3. The new commit is added to the main branch
  4. The updated refs are sent to the client
  5. The client receives the new commit as part of the normal Git protocol flow

Why?

I think it's neat!