GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — backend: shallow clone (--depth 1) fails over stateless HTTP — missing shallow line in phase 2 response · Issue #2011 · go-git/go-git Open Labels staleIssues/PRs that are marked for closure due to inactivity DescriptionProblemWhen serving a git repository via `backend.Backend` (Smart HTTP, `StatelessRPC: true`), a `git clone --depth 1` fails with: ``` This was discovered while running a self-hosted git marketplace server for Claude Code plugin marketplaces. Claude Code always clones marketplaces with `--depth 1 --recurse-submodules --shallow-submodules`, so this failure blocks every marketplace add/refresh. Root CauseThe shallow clone protocol over stateless HTTP requires two POST requests: Phase 1 — client sends `want + deepen 1`: Phase 2 — client sends `want + done`: The client expects `shallow ` to appear again before `NAK` in the phase 2 response. go-git sends `NAK` without it, causing the client to error with `expected shallow list`. Evidence (captured packet trace)Without workaround — go-git phase 2 response: With workaround — intercepting the two phases manually: WorkaroundWe implemented a middleware that intercepts `git-upload-pack` POST requests:
This works but is fragile and shouldn't be necessary. Environment
Note: I'm not deeply familiar with the git wire protocol internals — this issue was written with help from Claude Code, which also helped diagnose the problem by capturing and analysing the git packet traces. Activity
MetadataMetadataAssigneesLabelsstaleIssues/PRs that are marked for closure due to inactivity TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |