コンテンツにスキップ

LfsPreUploadOpts

このコンテンツはまだ日本語訳がありません。

LfsPreUploadOpts = object

Defined in: src/core/repo.ts:2065

Options for LFS pre-upload (§10.3)

Pre-upload allows pushing LFS objects before the refs push, enabling 2-phase commit patterns for improved reliability.

Properties

batchSize?

optional batchSize: number

Defined in: src/core/repo.ts:2076

Number of OIDs per git lfs push --object-id invocation (default: 200).

Each batch is one spawned process, so the batch size is bounded by the OS command-line length limit. Git is spawned without a shell, so the binding limit is the Windows CreateProcess limit (32,767 characters); the default stays around 40% of it.


concurrency?

optional concurrency: number

Defined in: src/core/repo.ts:2095

Maximum number of batches uploaded concurrently (default: 4).

Each git lfs push invocation pays a fixed cost (process spawn, credential lookup, LFS batch API round-trip) before any bytes are transferred; concurrent batches overlap that cost with other batches’ transfers. The first batch always runs alone and the remaining batches start only after it succeeds, so a failure common to all batches (e.g. an unreachable remote) costs a single round-trip. Once a batch fails, no new batch is started; in-flight batches are awaited and the remaining objects are reported in skippedCount. Set to 1 for strictly serial uploads.

Note: each git lfs push process transfers multiple objects in parallel on its own (lfs.concurrenttransfers, default 8), so the peak transfer parallelism is concurrency times that value. With concurrency > 1, progress callbacks from different batches may interleave.


oids?

optional oids: string[]

Defined in: src/core/repo.ts:2067

Object IDs to upload (if omitted, auto-detect pending objects)


remote?

optional remote: string

Defined in: src/core/repo.ts:2097

Remote name (default: ‘origin’)