ref:55327c296dfd2df4016eba4cba0eb4942f4c7e2a

fix: buffer partial protocol data across SSH transport splits

SSH can split git protocol data across multiple messages, especially on slow/loaded systems like Raspberry Pi. When ReceivePack.feed received partial command data, parse_commands returned {:need_more, _} and the data was silently dropped. The next feed with remaining bytes parsed zero commands, producing a vacuous report-status without ref updates. Add cmd_buffer to ReceivePack and negotiate_buffer to UploadPack to accumulate partial data between feed calls. Also fix dead code warning in Walk.log_continue where cursor_to_queue always returns {:ok, ...}. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
SHA: 55327c296dfd2df4016eba4cba0eb4942f4c7e2a
Author: Cole Christensen <cole.christensen@macmillan.com>
Date: 2026-03-13 19:47
Parents: df0a437
4 files changed +85 -16
Type
lib/ex_git_objectstore/walk.ex +3 −8
@@ -111,14 +111,9 @@
def log_continue(%Repo{} = repo, cursor_shas, opts) when is_list(cursor_shas) do
max_count = Keyword.get(opts, :max_count, 20)
case cursor_to_queue(repo, cursor_shas) do
{:ok, queue, seen} ->
{commits, remaining} = walk_page(repo, queue, seen, [], 0, max_count)
{:ok, commits, queue_to_cursor(remaining)}
{:error, _} = err ->
err
end
{:ok, queue, seen} = cursor_to_queue(repo, cursor_shas)
{commits, remaining} = walk_page(repo, queue, seen, [], 0, max_count)
{:ok, commits, queue_to_cursor(remaining)}
end
defp apply_skip_and_limit(commits, 0, :infinity), do: commits