Skip to content

desktop-bulk-operation-git

The desktop half of bulk-operation git commits: drives the system git CLI to wrap a bulk operation in commits, guarded by a lease lock in the repo’s git directory.

The system CLI is used rather than a bundled implementation because it honors the repo’s own config, hooks and clean/smudge filters, git-annex’s among them, and because git revert is the whole undo story.

Every command runs with the vault folder as its working directory and . as its pathspec, so when the vault is a subfolder of a larger repo only the vault’s changes are committed.

Desktop-only (node:child_process, node:fs, node:os), but inert to import on mobile: nothing here touches a Node builtin until a function is called.

Class Description
BulkOperationGitRepo A git repo holding a vault, driven to wrap bulk operations in commits.
GitCommandError An error thrown when a git command fails.
Interface Description
BulkOperationGitRepoConstructorParams Constructor parameters for BulkOperationGitRepo.
BulkOperationGitRepoRunBulkOperationParams Parameters for BulkOperationGitRepo.runBulkOperation.
GitBulkOperationResult The result of BulkOperationGitRepo.runBulkOperation.
GitRevertResult The result of BulkOperationGitRepo.revertBulkOperationCommit.