Skip to content
This repository was archived by the owner on May 13, 2026. It is now read-only.

Fix four bugs: packfile offset tracking, HTTP error ordering, ref ordering, and race condition#1

Merged
imjasonh merged 3 commits into
mainfrom
claude/debug-code-issues-Bj3GV
Apr 2, 2026
Merged

Fix four bugs: packfile offset tracking, HTTP error ordering, ref ordering, and race condition#1
imjasonh merged 3 commits into
mainfrom
claude/debug-code-issues-Bj3GV

Conversation

@imjasonh
Copy link
Copy Markdown
Owner

@imjasonh imjasonh commented Apr 2, 2026

  • packfile.go: ReadObject now uses a countingReader to track compressed
    bytes consumed and properly advances r.offset, fixing sequential
    multi-object reads.
  • handlers.go: Use commitSHA from GenerateCommit directly instead of
    re-reading refs, which fixes both the HTTP error-after-body-written
    issue and ensures HEAD is always advertised first (Git protocol
    requirement).
  • commit.go: GenerateCommit now holds the repo lock for the entire
    read-modify-write cycle, preventing concurrent generates from reading
    the same parent and losing ref updates.
  • repo.go: Added Lock/Unlock/GetRefsLocked methods to support holding
    the mutex across multiple repo operations.

https://claude.ai/code/session_015F9BYQoCy2P2zYZBuVeXHH

claude added 3 commits April 2, 2026 05:52
…ering, and race condition

- packfile.go: ReadObject now uses a countingReader to track compressed
  bytes consumed and properly advances r.offset, fixing sequential
  multi-object reads.
- handlers.go: Use commitSHA from GenerateCommit directly instead of
  re-reading refs, which fixes both the HTTP error-after-body-written
  issue and ensures HEAD is always advertised first (Git protocol
  requirement).
- commit.go: GenerateCommit now holds the repo lock for the entire
  read-modify-write cycle, preventing concurrent generates from reading
  the same parent and losing ref updates.
- repo.go: Added Lock/Unlock/GetRefsLocked methods to support holding
  the mutex across multiple repo operations.

https://claude.ai/code/session_015F9BYQoCy2P2zYZBuVeXHH
@imjasonh imjasonh merged commit 16db43a into main Apr 2, 2026
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants