gitlink-cli/shortcuts/file
1os21ka23r9navae6mrro 9588c113cf feat(file): add +batch for multi-file single-commit operations
The contents/batch endpoint accepts multiple file operations per
commit, but each existing shortcut sent exactly one. file +batch
takes a JSON spec (array of {action_type, file_path, content,
encoding}) and applies them atomically in one commit:

  gitlink-cli file +batch -s spec.json -b master -m 'batch ops'

Client-side validation: action_type must be create|update|delete,
file_path required. content/encoding are normalized for delete
entries — the server rejects entries missing content with
'请输入正确的文件参数Files' (production-reproduced).

Production-verified on gitlink.org.cn: 2-file create in one commit,
then 2-file delete in one commit. Unit test covers payload shape,
delete normalization, and action_type validation.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-07-08 14:52:09 +00:00
..
file.go feat(file): add +batch for multi-file single-commit operations 2026-07-08 14:52:09 +00:00
file_test.go feat(file): add +batch for multi-file single-commit operations 2026-07-08 14:52:09 +00:00