fangorn/ex_git_objectstore
public
ref:1bd54cd6cefabac7d52ef7088fda9ed02bc2f1ec
fix: add buffering to UploadPackV2 for split SSH data
SSH can split protocol data across multiple messages. The v2 state
machine was dispatching commands on each data message without waiting
for a complete command (terminated by flush). This caused "expected
packfile" errors when the fetch command arrived in multiple fragments.
Added a buffer field to accumulate partial data and only dispatch
when a flush-terminated command is complete. Mirrors the existing
negotiate_buffer approach in UploadPack (v1).
Also fixes alias ordering (credo --strict) and adds comprehensive
unit tests for the buffering behavior.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
SHA:
1bd54cd6cefabac7d52ef7088fda9ed02bc2f1ec
Author:
Cole Christensen <cole.christensen@macmillan.com>
Date:
2026-03-14 00:39
Parents:
55327c2
2 files changed
+341
-8
| Type | ||
|---|---|---|
|
|
lib/ex_git_objectstore/protocol/upload_pack_v2.ex | +27 −8 |
|
||