Skip to content

BulkOperationGitRepo.runBulkOperation method

BulkOperationGitRepo › runBulkOperation

Runs a bulk operation between two commits.

Takes the lease lock, commits whatever is pending as chore: before OP<n>, runs the operation, waits for its follow-ups to settle, commits the result as OP<n>: <summary> and releases the lock. An operation that throws still gets its partial changes committed, as OP<n> interrupted, before the error is rethrown.

When the lock was recovered under the operation (it went stale, and another operation, the scheduled autocommit or a reload committed OP<n> interrupted and removed it), the rest is never committed under the recovered id: the lock is taken again and the rest is committed as a fresh OP<m> whose summary names OP<n>.

Signature:

runBulkOperation(params: BulkOperationGitRepoRunBulkOperationParams<T>): Promise<GitBulkOperationResult<T>>

Parameters:

ParameterTypeDescription
paramsBulkOperationGitRepoRunBulkOperationParams<T>The parameters.

Returns: Promise<GitBulkOperationResult<T>> — The operation's result, its id, the hash of its commit and the id it lost to a recovery, if any.