Request Format
Like commit-pack, the payload is newline-delimited JSON. Send a metadata object first, followed by one or morediff_chunk entries.
Request Body Fields
| Parameter | Type | Description |
|---|---|---|
target_branch | Required | Destination branch |
commit_message | Required | Commit message |
author | Required | Object with name, email, and optional ISO 8601 timestamp |
expected_head_sha | Optional | Guard ensuring the branch tip matches before applying the patch |
base_branch | Optional | Seed when the target branch does not exist yet |
committer | Optional | Object with name, email, and optional ISO 8601 timestamp |
ephemeral | Optional | Same semantics as commit-pack |
ephemeral_base | Optional | Same semantics as commit-pack |
Diff Chunks
diff_chunk.datacontains base64-encoded diff bytes; decoded payloads must be ≤ 4 MiB- Chunks are streamed sequentially; set
"eof": trueon the final chunk - The combined diff must be compatible with
git apply --cached --binary(include file headers, mode lines, and hunk metadata)
JWT Requirements
- The JWT must include the repository in the
repoclaim - Requires
git:writescope
Response
The service returns the same schema as commit-pack responses.Notes
result.successisfalsewhen the diff cannot be applied (for example, conflicts or empty diffs) andstatusreflects the mapped reason (conflict,precondition_failed, etc.)
Error Responses
| Status | Description |
|---|---|
404 Not Found | Branch doesn’t exist |
401 Unauthorized | Invalid JWT or missing git:write scope |
400 Bad Request | Invalid request format or diff cannot be applied |