@statewalker/vcs-commands 0.8.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/commands/add-command.d.ts +32 -0
- package/dist/commands/add-command.d.ts.map +1 -1
- package/dist/commands/add-patch/add-patch.d.ts +7 -0
- package/dist/commands/add-patch/add-patch.d.ts.map +1 -1
- package/dist/commands/add-patch/patch-backend.d.ts +2 -0
- package/dist/commands/add-patch/patch-backend.d.ts.map +1 -1
- package/dist/commands/add-patch/patch-modes.d.ts +6 -2
- package/dist/commands/add-patch/patch-modes.d.ts.map +1 -1
- package/dist/commands/add-patch/patch-session.d.ts +4 -0
- package/dist/commands/add-patch/patch-session.d.ts.map +1 -1
- package/dist/commands/am/am-command.d.ts +88 -2
- package/dist/commands/am/am-command.d.ts.map +1 -1
- package/dist/commands/apply/apply-command.d.ts +2 -0
- package/dist/commands/apply/apply-command.d.ts.map +1 -1
- package/dist/commands/apply/apply-parse.d.ts +7 -0
- package/dist/commands/apply/apply-parse.d.ts.map +1 -1
- package/dist/commands/apply/index.d.ts +1 -1
- package/dist/commands/apply/index.d.ts.map +1 -1
- package/dist/commands/archive/archive-command.d.ts +169 -0
- package/dist/commands/archive/archive-command.d.ts.map +1 -0
- package/dist/commands/archive/archive-entry.d.ts +60 -0
- package/dist/commands/archive/archive-entry.d.ts.map +1 -0
- package/dist/commands/archive/index.d.ts +8 -0
- package/dist/commands/archive/index.d.ts.map +1 -0
- package/dist/commands/archive/remote-archive-command.d.ts +56 -0
- package/dist/commands/archive/remote-archive-command.d.ts.map +1 -0
- package/dist/commands/archive/tar-archive.d.ts +31 -0
- package/dist/commands/archive/tar-archive.d.ts.map +1 -0
- package/dist/commands/archive/tar-commit-id.d.ts +13 -0
- package/dist/commands/archive/tar-commit-id.d.ts.map +1 -0
- package/dist/commands/archive/upload-archive-writer.d.ts +48 -0
- package/dist/commands/archive/upload-archive-writer.d.ts.map +1 -0
- package/dist/commands/archive/zip-archive.d.ts +42 -0
- package/dist/commands/archive/zip-archive.d.ts.map +1 -0
- package/dist/commands/attributes-source.d.ts +10 -0
- package/dist/commands/attributes-source.d.ts.map +1 -1
- package/dist/commands/blame-command.d.ts +345 -8
- package/dist/commands/blame-command.d.ts.map +1 -1
- package/dist/commands/blame-ignore.d.ts +48 -0
- package/dist/commands/blame-ignore.d.ts.map +1 -0
- package/dist/commands/bundle/bundle-create-command.d.ts +67 -0
- package/dist/commands/bundle/bundle-create-command.d.ts.map +1 -0
- package/dist/commands/bundle/bundle-format.d.ts +89 -0
- package/dist/commands/bundle/bundle-format.d.ts.map +1 -0
- package/dist/commands/bundle/bundle-list.d.ts +92 -0
- package/dist/commands/bundle/bundle-list.d.ts.map +1 -0
- package/dist/commands/bundle/bundle-read-commands.d.ts +81 -0
- package/dist/commands/bundle/bundle-read-commands.d.ts.map +1 -0
- package/dist/commands/bundle/bundle-support.d.ts +32 -0
- package/dist/commands/bundle/bundle-support.d.ts.map +1 -0
- package/dist/commands/bundle/bundle-transport.d.ts +38 -0
- package/dist/commands/bundle/bundle-transport.d.ts.map +1 -0
- package/dist/commands/bundle/bundle-uri-host.d.ts +43 -0
- package/dist/commands/bundle/bundle-uri-host.d.ts.map +1 -0
- package/dist/commands/bundle/bundle-uri.d.ts +55 -0
- package/dist/commands/bundle/bundle-uri.d.ts.map +1 -0
- package/dist/commands/bundle/bundle-verify.d.ts +63 -0
- package/dist/commands/bundle/bundle-verify.d.ts.map +1 -0
- package/dist/commands/bundle/index.d.ts +14 -0
- package/dist/commands/bundle/index.d.ts.map +1 -0
- package/dist/commands/cat-file/batch-format.d.ts +58 -0
- package/dist/commands/cat-file/batch-format.d.ts.map +1 -0
- package/dist/commands/cat-file/cat-file-command.d.ts +135 -0
- package/dist/commands/cat-file/cat-file-command.d.ts.map +1 -0
- package/dist/commands/cat-file/index.d.ts +3 -0
- package/dist/commands/cat-file/index.d.ts.map +1 -0
- package/dist/commands/check-attr-command.d.ts +66 -0
- package/dist/commands/check-attr-command.d.ts.map +1 -0
- package/dist/commands/check-ignore-command.d.ts +58 -0
- package/dist/commands/check-ignore-command.d.ts.map +1 -0
- package/dist/commands/check-mailmap-command.d.ts +49 -0
- package/dist/commands/check-mailmap-command.d.ts.map +1 -0
- package/dist/commands/check-ref-format-command.d.ts +60 -0
- package/dist/commands/check-ref-format-command.d.ts.map +1 -0
- package/dist/commands/checkout-command.d.ts +7 -0
- package/dist/commands/checkout-command.d.ts.map +1 -1
- package/dist/commands/checkout-index-command.d.ts +96 -0
- package/dist/commands/checkout-index-command.d.ts.map +1 -0
- package/dist/commands/checkout-paths.d.ts +4 -0
- package/dist/commands/checkout-paths.d.ts.map +1 -1
- package/dist/commands/cherry-command.d.ts +61 -0
- package/dist/commands/cherry-command.d.ts.map +1 -0
- package/dist/commands/cherry-pick-command.d.ts +33 -1
- package/dist/commands/cherry-pick-command.d.ts.map +1 -1
- package/dist/commands/clean-command.d.ts +32 -0
- package/dist/commands/clean-command.d.ts.map +1 -1
- package/dist/commands/clean-interactive.d.ts +56 -0
- package/dist/commands/clean-interactive.d.ts.map +1 -0
- package/dist/commands/clone-command.d.ts +135 -2
- package/dist/commands/clone-command.d.ts.map +1 -1
- package/dist/commands/commit-command.d.ts +59 -3
- package/dist/commands/commit-command.d.ts.map +1 -1
- package/dist/commands/config-command.d.ts +2 -0
- package/dist/commands/config-command.d.ts.map +1 -1
- package/dist/commands/daemon-access-hook.d.ts +36 -0
- package/dist/commands/daemon-access-hook.d.ts.map +1 -0
- package/dist/commands/default-branch.d.ts +42 -0
- package/dist/commands/default-branch.d.ts.map +1 -1
- package/dist/commands/describe-command.d.ts +71 -64
- package/dist/commands/describe-command.d.ts.map +1 -1
- package/dist/commands/diff-command.d.ts +249 -10
- package/dist/commands/diff-command.d.ts.map +1 -1
- package/dist/commands/diff-external.d.ts +43 -0
- package/dist/commands/diff-external.d.ts.map +1 -0
- package/dist/commands/diff-plumbing/diff-pairs-command.d.ts +27 -0
- package/dist/commands/diff-plumbing/diff-pairs-command.d.ts.map +1 -0
- package/dist/commands/diff-plumbing/diff-plumbing-command.d.ts +129 -0
- package/dist/commands/diff-plumbing/diff-plumbing-command.d.ts.map +1 -0
- package/dist/commands/diff-plumbing/index.d.ts +3 -0
- package/dist/commands/diff-plumbing/index.d.ts.map +1 -0
- package/dist/commands/diff-textconv.d.ts +5 -1
- package/dist/commands/diff-textconv.d.ts.map +1 -1
- package/dist/commands/fast-export/fast-export-command.d.ts +135 -0
- package/dist/commands/fast-export/fast-export-command.d.ts.map +1 -0
- package/dist/commands/fast-export/fast-import-command.d.ts +182 -0
- package/dist/commands/fast-export/fast-import-command.d.ts.map +1 -0
- package/dist/commands/fast-export/fast-stream-support.d.ts +64 -0
- package/dist/commands/fast-export/fast-stream-support.d.ts.map +1 -0
- package/dist/commands/fast-export/index.d.ts +4 -0
- package/dist/commands/fast-export/index.d.ts.map +1 -0
- package/dist/commands/fetch-command.d.ts +125 -0
- package/dist/commands/fetch-command.d.ts.map +1 -1
- package/dist/commands/fetch-multiple-command.d.ts +193 -0
- package/dist/commands/fetch-multiple-command.d.ts.map +1 -0
- package/dist/commands/format-patch-command.d.ts +28 -2
- package/dist/commands/format-patch-command.d.ts.map +1 -1
- package/dist/commands/format-rev-command.d.ts +58 -0
- package/dist/commands/format-rev-command.d.ts.map +1 -0
- package/dist/commands/fsck/fsck-command.d.ts.map +1 -1
- package/dist/commands/fsck/fsck-msg-ids.d.ts +18 -3
- package/dist/commands/fsck/fsck-msg-ids.d.ts.map +1 -1
- package/dist/commands/fsmonitor-refresh.d.ts +69 -0
- package/dist/commands/fsmonitor-refresh.d.ts.map +1 -0
- package/dist/commands/gc-command.d.ts +5 -0
- package/dist/commands/gc-command.d.ts.map +1 -1
- package/dist/commands/git-describe.d.ts +77 -4
- package/dist/commands/git-describe.d.ts.map +1 -1
- package/dist/commands/git-hooks.d.ts +47 -1
- package/dist/commands/git-hooks.d.ts.map +1 -1
- package/dist/commands/git-paths.d.ts +26 -0
- package/dist/commands/git-paths.d.ts.map +1 -0
- package/dist/commands/grep/grep-command.d.ts +2 -1
- package/dist/commands/grep/grep-command.d.ts.map +1 -1
- package/dist/commands/history-command.d.ts +156 -0
- package/dist/commands/history-command.d.ts.map +1 -0
- package/dist/commands/http-config.d.ts +38 -0
- package/dist/commands/http-config.d.ts.map +1 -0
- package/dist/commands/index-adder.d.ts +12 -1
- package/dist/commands/index-adder.d.ts.map +1 -1
- package/dist/commands/index-host.d.ts.map +1 -1
- package/dist/commands/index.d.ts +56 -1
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +6 -3
- package/dist/commands/init-command.d.ts +89 -0
- package/dist/commands/init-command.d.ts.map +1 -1
- package/dist/commands/last-modified-command.d.ts +102 -0
- package/dist/commands/last-modified-command.d.ts.map +1 -0
- package/dist/commands/lfs/go-url.d.ts +43 -0
- package/dist/commands/lfs/go-url.d.ts.map +1 -0
- package/dist/commands/lfs/index.d.ts +3 -0
- package/dist/commands/lfs/index.d.ts.map +1 -0
- package/dist/commands/lfs/lfs-config.d.ts +174 -0
- package/dist/commands/lfs/lfs-config.d.ts.map +1 -0
- package/dist/commands/lfs/lfs-endpoint-command.d.ts +83 -0
- package/dist/commands/lfs/lfs-endpoint-command.d.ts.map +1 -0
- package/dist/commands/line-log.d.ts +161 -0
- package/dist/commands/line-log.d.ts.map +1 -0
- package/dist/commands/local-transport.d.ts.map +1 -1
- package/dist/commands/log-command.d.ts +261 -6
- package/dist/commands/log-command.d.ts.map +1 -1
- package/dist/commands/log-graph.d.ts +4 -2
- package/dist/commands/log-graph.d.ts.map +1 -1
- package/dist/commands/log-output.d.ts +88 -2
- package/dist/commands/log-output.d.ts.map +1 -1
- package/dist/commands/ls-files-command.d.ts +153 -0
- package/dist/commands/ls-files-command.d.ts.map +1 -0
- package/dist/commands/ls-remote-command.d.ts +5 -0
- package/dist/commands/ls-remote-command.d.ts.map +1 -1
- package/dist/commands/ls-tree-command.d.ts +105 -0
- package/dist/commands/ls-tree-command.d.ts.map +1 -0
- package/dist/commands/mailmap.d.ts +24 -1
- package/dist/commands/mailmap.d.ts.map +1 -1
- package/dist/commands/maintenance-run-command.d.ts +122 -0
- package/dist/commands/maintenance-run-command.d.ts.map +1 -0
- package/dist/commands/merge-command.d.ts +58 -1
- package/dist/commands/merge-command.d.ts.map +1 -1
- package/dist/commands/merge-config.d.ts +7 -0
- package/dist/commands/merge-config.d.ts.map +1 -1
- package/dist/commands/merge-drivers.d.ts +69 -5
- package/dist/commands/merge-drivers.d.ts.map +1 -1
- package/dist/commands/merge-strategy-options.d.ts +69 -0
- package/dist/commands/merge-strategy-options.d.ts.map +1 -0
- package/dist/commands/merge-support.d.ts +16 -0
- package/dist/commands/merge-support.d.ts.map +1 -1
- package/dist/commands/merge-tree-command.d.ts +122 -0
- package/dist/commands/merge-tree-command.d.ts.map +1 -0
- package/dist/commands/message-cleanup.d.ts +2 -0
- package/dist/commands/message-cleanup.d.ts.map +1 -1
- package/dist/commands/mktag-command.d.ts +51 -0
- package/dist/commands/mktag-command.d.ts.map +1 -0
- package/dist/commands/name-rev-command.d.ts +65 -0
- package/dist/commands/name-rev-command.d.ts.map +1 -0
- package/dist/commands/name-rev.d.ts +110 -22
- package/dist/commands/name-rev.d.ts.map +1 -1
- package/dist/commands/object-store/count-objects-command.d.ts +58 -0
- package/dist/commands/object-store/count-objects-command.d.ts.map +1 -0
- package/dist/commands/object-store/index.d.ts +5 -0
- package/dist/commands/object-store/index.d.ts.map +1 -0
- package/dist/commands/object-store/objects-directory.d.ts +12 -0
- package/dist/commands/object-store/objects-directory.d.ts.map +1 -0
- package/dist/commands/object-store/prune-command.d.ts +38 -0
- package/dist/commands/object-store/prune-command.d.ts.map +1 -0
- package/dist/commands/object-store/show-index-command.d.ts +23 -0
- package/dist/commands/object-store/show-index-command.d.ts.map +1 -0
- package/dist/commands/octopus-merge.d.ts +26 -1
- package/dist/commands/octopus-merge.d.ts.map +1 -1
- package/dist/commands/ort-merge.d.ts +40 -0
- package/dist/commands/ort-merge.d.ts.map +1 -1
- package/dist/commands/ort-recursive.d.ts.map +1 -1
- package/dist/commands/patch-id-command.d.ts +30 -0
- package/dist/commands/patch-id-command.d.ts.map +1 -0
- package/dist/commands/patch-id.d.ts +82 -0
- package/dist/commands/patch-id.d.ts.map +1 -1
- package/dist/commands/plumbing-command.d.ts +66 -0
- package/dist/commands/plumbing-command.d.ts.map +1 -0
- package/dist/commands/plumbing-input.d.ts +38 -0
- package/dist/commands/plumbing-input.d.ts.map +1 -0
- package/dist/commands/promisor-remote-reply.d.ts +35 -0
- package/dist/commands/promisor-remote-reply.d.ts.map +1 -0
- package/dist/commands/promisor-remote.d.ts.map +1 -1
- package/dist/commands/pull-command.d.ts +182 -38
- package/dist/commands/pull-command.d.ts.map +1 -1
- package/dist/commands/push-command.d.ts +82 -2
- package/dist/commands/push-command.d.ts.map +1 -1
- package/dist/commands/range-diff/index.d.ts +4 -0
- package/dist/commands/range-diff/index.d.ts.map +1 -0
- package/dist/commands/range-diff/linear-assignment.d.ts +27 -0
- package/dist/commands/range-diff/linear-assignment.d.ts.map +1 -0
- package/dist/commands/range-diff/range-diff-command.d.ts +121 -0
- package/dist/commands/range-diff/range-diff-command.d.ts.map +1 -0
- package/dist/commands/range-diff/range-diff.d.ts +106 -0
- package/dist/commands/range-diff/range-diff.d.ts.map +1 -0
- package/dist/commands/read-tree-command.d.ts +14 -0
- package/dist/commands/read-tree-command.d.ts.map +1 -1
- package/dist/commands/rebase-command.d.ts +129 -4
- package/dist/commands/rebase-command.d.ts.map +1 -1
- package/dist/commands/refs-command.d.ts +81 -0
- package/dist/commands/refs-command.d.ts.map +1 -0
- package/dist/commands/remerge-diff.d.ts +59 -0
- package/dist/commands/remerge-diff.d.ts.map +1 -0
- package/dist/commands/remote-command.d.ts +41 -0
- package/dist/commands/remote-command.d.ts.map +1 -1
- package/dist/commands/remote-object-info-command.d.ts +55 -0
- package/dist/commands/remote-object-info-command.d.ts.map +1 -0
- package/dist/commands/remote-show-command.d.ts +204 -0
- package/dist/commands/remote-show-command.d.ts.map +1 -0
- package/dist/commands/remote-transport.d.ts +40 -3
- package/dist/commands/remote-transport.d.ts.map +1 -1
- package/dist/commands/repack-command.d.ts +115 -0
- package/dist/commands/repack-command.d.ts.map +1 -0
- package/dist/commands/replace-command.d.ts +143 -0
- package/dist/commands/replace-command.d.ts.map +1 -0
- package/dist/commands/replay-command.d.ts +117 -0
- package/dist/commands/replay-command.d.ts.map +1 -0
- package/dist/commands/repo-command.d.ts +136 -0
- package/dist/commands/repo-command.d.ts.map +1 -0
- package/dist/commands/request-pull-command.d.ts +82 -0
- package/dist/commands/request-pull-command.d.ts.map +1 -0
- package/dist/commands/rerere-command.d.ts +36 -0
- package/dist/commands/rerere-command.d.ts.map +1 -0
- package/dist/commands/rerere.d.ts +102 -0
- package/dist/commands/rerere.d.ts.map +1 -0
- package/dist/commands/reset-command.d.ts +19 -1
- package/dist/commands/reset-command.d.ts.map +1 -1
- package/dist/commands/restore-command.d.ts +7 -0
- package/dist/commands/restore-command.d.ts.map +1 -1
- package/dist/commands/rev-filter/commit-grep.d.ts +3 -1
- package/dist/commands/rev-filter/commit-grep.d.ts.map +1 -1
- package/dist/commands/rev-list-command.d.ts +78 -3
- package/dist/commands/rev-list-command.d.ts.map +1 -1
- package/dist/commands/rev-parse-command.d.ts +9 -0
- package/dist/commands/rev-parse-command.d.ts.map +1 -1
- package/dist/commands/revert-command.d.ts +32 -1
- package/dist/commands/revert-command.d.ts.map +1 -1
- package/dist/commands/revision-range.d.ts +7 -0
- package/dist/commands/revision-range.d.ts.map +1 -1
- package/dist/commands/revision-resolver.d.ts +12 -0
- package/dist/commands/revision-resolver.d.ts.map +1 -1
- package/dist/commands/sequencer-pick.d.ts +120 -1
- package/dist/commands/sequencer-pick.d.ts.map +1 -1
- package/dist/commands/sequencer-support.d.ts +10 -1
- package/dist/commands/sequencer-support.d.ts.map +1 -1
- package/dist/commands/serve-repository.d.ts +23 -1
- package/dist/commands/serve-repository.d.ts.map +1 -1
- package/dist/commands/session-id.d.ts +18 -0
- package/dist/commands/session-id.d.ts.map +1 -0
- package/dist/commands/shortlog-command.d.ts +109 -0
- package/dist/commands/shortlog-command.d.ts.map +1 -0
- package/dist/commands/shortlog.d.ts +151 -0
- package/dist/commands/shortlog.d.ts.map +1 -0
- package/dist/commands/show-branch-command.d.ts +59 -0
- package/dist/commands/show-branch-command.d.ts.map +1 -0
- package/dist/commands/show-ref-command.d.ts +112 -0
- package/dist/commands/show-ref-command.d.ts.map +1 -0
- package/dist/commands/signature-check.d.ts +9 -2
- package/dist/commands/signature-check.d.ts.map +1 -1
- package/dist/commands/signing.d.ts +22 -1
- package/dist/commands/signing.d.ts.map +1 -1
- package/dist/commands/stash-apply-command.d.ts.map +1 -1
- package/dist/commands/stash-export-command.d.ts +115 -0
- package/dist/commands/stash-export-command.d.ts.map +1 -0
- package/dist/commands/status-command.d.ts +33 -3
- package/dist/commands/status-command.d.ts.map +1 -1
- package/dist/commands/stripspace-command.d.ts +44 -0
- package/dist/commands/stripspace-command.d.ts.map +1 -0
- package/dist/commands/submodule-add-command.d.ts +10 -1
- package/dist/commands/submodule-add-command.d.ts.map +1 -1
- package/dist/commands/submodule-auth.d.ts +3 -1
- package/dist/commands/submodule-auth.d.ts.map +1 -1
- package/dist/commands/submodule-commands.d.ts +99 -3
- package/dist/commands/submodule-commands.d.ts.map +1 -1
- package/dist/commands/submodule-fetch.d.ts +149 -0
- package/dist/commands/submodule-fetch.d.ts.map +1 -0
- package/dist/commands/submodule-model.d.ts +8 -0
- package/dist/commands/submodule-model.d.ts.map +1 -1
- package/dist/commands/submodule-unpack.d.ts +120 -0
- package/dist/commands/submodule-unpack.d.ts.map +1 -0
- package/dist/commands/submodule-update-command.d.ts +21 -1
- package/dist/commands/submodule-update-command.d.ts.map +1 -1
- package/dist/commands/subtree-shift.d.ts +27 -0
- package/dist/commands/subtree-shift.d.ts.map +1 -0
- package/dist/commands/switch-command.d.ts +3 -0
- package/dist/commands/switch-command.d.ts.map +1 -1
- package/dist/commands/textconv-cache.d.ts +58 -0
- package/dist/commands/textconv-cache.d.ts.map +1 -0
- package/dist/commands/tree-restore.d.ts +5 -0
- package/dist/commands/tree-restore.d.ts.map +1 -1
- package/dist/commands/unpack-objects-command.d.ts +47 -0
- package/dist/commands/unpack-objects-command.d.ts.map +1 -0
- package/dist/commands/update-index-command.d.ts +110 -0
- package/dist/commands/update-index-command.d.ts.map +1 -0
- package/dist/commands/uri-protocols.d.ts +13 -0
- package/dist/commands/uri-protocols.d.ts.map +1 -0
- package/dist/commands/url-parse-command.d.ts +30 -0
- package/dist/commands/url-parse-command.d.ts.map +1 -0
- package/dist/commands/var-command.d.ts +42 -0
- package/dist/commands/var-command.d.ts.map +1 -0
- package/dist/commands/worktree-overwrite-checks.d.ts +2 -0
- package/dist/commands/worktree-overwrite-checks.d.ts.map +1 -1
- package/dist/{commands-ISM52N0n.js → commands-Mlo1dxQN.js} +56133 -70269
- package/dist/errors/command-errors.d.ts +58 -0
- package/dist/errors/command-errors.d.ts.map +1 -1
- package/dist/errors/index.js +67 -1
- package/dist/fsck-CrhVMNIH.js +5179 -0
- package/dist/git-command.d.ts +89 -3
- package/dist/git-command.d.ts.map +1 -1
- package/dist/git.d.ts +628 -1
- package/dist/git.d.ts.map +1 -1
- package/dist/guarded-transport-command.d.ts +84 -0
- package/dist/guarded-transport-command.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -5
- package/dist/maintenance-run-command-Bw21HEkH.js +13539 -0
- package/dist/remote-transport-Bu4PGSMD.js +2605 -0
- package/dist/rename/detect-renames.d.ts +20 -0
- package/dist/rename/detect-renames.d.ts.map +1 -1
- package/dist/rename/diffcore-break.d.ts +51 -0
- package/dist/rename/diffcore-break.d.ts.map +1 -0
- package/dist/rename/index.d.ts +1 -0
- package/dist/rename/index.d.ts.map +1 -1
- package/dist/results/blame-format.d.ts +62 -1
- package/dist/results/blame-format.d.ts.map +1 -1
- package/dist/results/cherry-pick-result.d.ts +6 -0
- package/dist/results/cherry-pick-result.d.ts.map +1 -1
- package/dist/results/clone-result.d.ts +9 -0
- package/dist/results/clone-result.d.ts.map +1 -1
- package/dist/results/diff-dirstat.d.ts +36 -0
- package/dist/results/diff-dirstat.d.ts.map +1 -0
- package/dist/results/diff-entry.d.ts +20 -0
- package/dist/results/diff-entry.d.ts.map +1 -1
- package/dist/results/diff-formatter.d.ts.map +1 -1
- package/dist/results/diff-output.d.ts +67 -3
- package/dist/results/diff-output.d.ts.map +1 -1
- package/dist/results/fetch-result.d.ts +24 -1
- package/dist/results/fetch-result.d.ts.map +1 -1
- package/dist/results/index.d.ts +2 -0
- package/dist/results/index.d.ts.map +1 -1
- package/dist/results/index.js +2 -2
- package/dist/results/init-result.d.ts +8 -1
- package/dist/results/init-result.d.ts.map +1 -1
- package/dist/results/line-range-hunks.d.ts +27 -0
- package/dist/results/line-range-hunks.d.ts.map +1 -0
- package/dist/results/merge-result.d.ts +13 -1
- package/dist/results/merge-result.d.ts.map +1 -1
- package/dist/results/pull-result.d.ts +11 -0
- package/dist/results/pull-result.d.ts.map +1 -1
- package/dist/results/push-result.d.ts +10 -0
- package/dist/results/push-result.d.ts.map +1 -1
- package/dist/results/rebase-result.d.ts +7 -0
- package/dist/results/rebase-result.d.ts.map +1 -1
- package/dist/results/revert-result.d.ts +6 -0
- package/dist/results/revert-result.d.ts.map +1 -1
- package/dist/results/stash-result.d.ts +5 -0
- package/dist/results/stash-result.d.ts.map +1 -1
- package/dist/results/status-result.d.ts +1 -1
- package/dist/results/status-result.d.ts.map +1 -1
- package/dist/results-ERo9vELd.js +49673 -0
- package/dist/transport-command.d.ts +93 -1
- package/dist/transport-command.d.ts.map +1 -1
- package/package.json +12 -12
- package/src/commands/add-command.ts +118 -0
- package/src/commands/add-patch/add-patch.ts +8 -0
- package/src/commands/add-patch/patch-backend.ts +24 -3
- package/src/commands/add-patch/patch-modes.ts +26 -2
- package/src/commands/add-patch/patch-session.ts +6 -0
- package/src/commands/am/am-command.ts +301 -12
- package/src/commands/apply/apply-command.ts +52 -9
- package/src/commands/apply/apply-parse.ts +10 -0
- package/src/commands/apply/index.ts +9 -1
- package/src/commands/archive/archive-command.ts +1148 -0
- package/src/commands/archive/archive-entry.ts +93 -0
- package/src/commands/archive/index.ts +7 -0
- package/src/commands/archive/remote-archive-command.ts +140 -0
- package/src/commands/archive/tar-archive.ts +207 -0
- package/src/commands/archive/tar-commit-id.ts +72 -0
- package/src/commands/archive/upload-archive-writer.ts +213 -0
- package/src/commands/archive/zip-archive.ts +317 -0
- package/src/commands/attributes-source.ts +26 -12
- package/src/commands/blame-command.ts +1551 -53
- package/src/commands/blame-ignore.ts +307 -0
- package/src/commands/bundle/bundle-create-command.ts +405 -0
- package/src/commands/bundle/bundle-format.ts +228 -0
- package/src/commands/bundle/bundle-list.ts +276 -0
- package/src/commands/bundle/bundle-read-commands.ts +157 -0
- package/src/commands/bundle/bundle-support.ts +85 -0
- package/src/commands/bundle/bundle-transport.ts +107 -0
- package/src/commands/bundle/bundle-uri-host.ts +204 -0
- package/src/commands/bundle/bundle-uri.ts +236 -0
- package/src/commands/bundle/bundle-verify.ts +152 -0
- package/src/commands/bundle/index.ts +14 -0
- package/src/commands/cat-file/batch-format.ts +193 -0
- package/src/commands/cat-file/cat-file-command.ts +857 -0
- package/src/commands/cat-file/index.ts +2 -0
- package/src/commands/check-attr-command.ts +333 -0
- package/src/commands/check-ignore-command.ts +261 -0
- package/src/commands/check-mailmap-command.ts +129 -0
- package/src/commands/check-ref-format-command.ts +129 -0
- package/src/commands/checkout-command.ts +131 -28
- package/src/commands/checkout-index-command.ts +568 -0
- package/src/commands/checkout-paths.ts +35 -0
- package/src/commands/cherry-command.ts +187 -0
- package/src/commands/cherry-pick-command.ts +63 -2
- package/src/commands/clean-command.ts +92 -12
- package/src/commands/clean-interactive.ts +522 -0
- package/src/commands/clone-command.ts +803 -50
- package/src/commands/commit-command.ts +202 -51
- package/src/commands/config-command.ts +9 -0
- package/src/commands/daemon-access-hook.ts +78 -0
- package/src/commands/default-branch.ts +99 -1
- package/src/commands/describe-command.ts +341 -254
- package/src/commands/diff-command.ts +1186 -99
- package/src/commands/diff-external.ts +131 -0
- package/src/commands/diff-plumbing/diff-pairs-command.ts +193 -0
- package/src/commands/diff-plumbing/diff-plumbing-command.ts +424 -0
- package/src/commands/diff-plumbing/index.ts +2 -0
- package/src/commands/diff-textconv.ts +5 -1
- package/src/commands/fast-export/fast-export-command.ts +911 -0
- package/src/commands/fast-export/fast-import-command.ts +1553 -0
- package/src/commands/fast-export/fast-stream-support.ts +162 -0
- package/src/commands/fast-export/index.ts +3 -0
- package/src/commands/fetch-command.ts +665 -14
- package/src/commands/fetch-multiple-command.ts +668 -0
- package/src/commands/format-patch-command.ts +189 -77
- package/src/commands/format-rev-command.ts +251 -0
- package/src/commands/fsck/fsck-command.ts +47 -20
- package/src/commands/fsck/fsck-msg-ids.ts +19 -3
- package/src/commands/fsck/fsck-pack.ts +2 -2
- package/src/commands/fsmonitor-refresh.ts +315 -0
- package/src/commands/gc-command.ts +10 -0
- package/src/commands/git-describe.ts +456 -217
- package/src/commands/git-hooks.ts +165 -9
- package/src/commands/git-paths.ts +136 -0
- package/src/commands/grep/grep-command.ts +38 -15
- package/src/commands/history-command.ts +617 -0
- package/src/commands/http-config.ts +139 -0
- package/src/commands/index-adder.ts +37 -3
- package/src/commands/index-host.ts +6 -1
- package/src/commands/index.ts +62 -0
- package/src/commands/init-command.ts +617 -49
- package/src/commands/last-modified-command.ts +804 -0
- package/src/commands/lfs/go-url.ts +370 -0
- package/src/commands/lfs/index.ts +2 -0
- package/src/commands/lfs/lfs-config.ts +738 -0
- package/src/commands/lfs/lfs-endpoint-command.ts +180 -0
- package/src/commands/line-log.ts +931 -0
- package/src/commands/local-transport.ts +252 -4
- package/src/commands/log-command.ts +1518 -182
- package/src/commands/log-graph.ts +6 -3
- package/src/commands/log-output.ts +228 -15
- package/src/commands/ls-files-command.ts +1177 -0
- package/src/commands/ls-remote-command.ts +6 -0
- package/src/commands/ls-tree-command.ts +684 -0
- package/src/commands/mailmap.ts +41 -5
- package/src/commands/maintenance-run-command.ts +949 -0
- package/src/commands/merge-command.ts +351 -47
- package/src/commands/merge-config.ts +23 -1
- package/src/commands/merge-drivers.ts +112 -20
- package/src/commands/merge-strategy-options.ts +224 -0
- package/src/commands/merge-support.ts +130 -26
- package/src/commands/merge-tree-command.ts +786 -0
- package/src/commands/message-cleanup.ts +1 -1
- package/src/commands/mktag-command.ts +149 -0
- package/src/commands/name-rev-command.ts +184 -0
- package/src/commands/name-rev.ts +700 -109
- package/src/commands/object-store/count-objects-command.ts +404 -0
- package/src/commands/object-store/index.ts +4 -0
- package/src/commands/object-store/objects-directory.ts +24 -0
- package/src/commands/object-store/prune-command.ts +129 -0
- package/src/commands/object-store/show-index-command.ts +151 -0
- package/src/commands/octopus-merge.ts +35 -11
- package/src/commands/ort-merge.ts +124 -23
- package/src/commands/ort-recursive.ts +40 -2
- package/src/commands/patch-id-command.ts +65 -0
- package/src/commands/patch-id.ts +327 -0
- package/src/commands/plumbing-command.ts +141 -0
- package/src/commands/plumbing-input.ts +87 -0
- package/src/commands/promisor-remote-reply.ts +276 -0
- package/src/commands/promisor-remote.ts +25 -2
- package/src/commands/pull-command.ts +720 -224
- package/src/commands/push-command.ts +440 -8
- package/src/commands/range-diff/index.ts +3 -0
- package/src/commands/range-diff/linear-assignment.ts +203 -0
- package/src/commands/range-diff/range-diff-command.ts +433 -0
- package/src/commands/range-diff/range-diff.ts +617 -0
- package/src/commands/read-tree-command.ts +74 -3
- package/src/commands/rebase-command.ts +647 -83
- package/src/commands/refs-command.ts +274 -0
- package/src/commands/remerge-diff.ts +241 -0
- package/src/commands/remote-command.ts +98 -10
- package/src/commands/remote-object-info-command.ts +109 -0
- package/src/commands/remote-show-command.ts +836 -0
- package/src/commands/remote-transport.ts +116 -1
- package/src/commands/repack-command.ts +383 -0
- package/src/commands/replace-command.ts +816 -0
- package/src/commands/replay-command.ts +674 -0
- package/src/commands/repo-command.ts +967 -0
- package/src/commands/request-pull-command.ts +356 -0
- package/src/commands/rerere-command.ts +179 -0
- package/src/commands/rerere.ts +925 -0
- package/src/commands/reset-command.ts +78 -3
- package/src/commands/restore-command.ts +15 -0
- package/src/commands/rev-filter/commit-grep.ts +7 -2
- package/src/commands/rev-list-command.ts +196 -11
- package/src/commands/rev-parse-command.ts +62 -4
- package/src/commands/revert-command.ts +62 -2
- package/src/commands/revision-range.ts +10 -3
- package/src/commands/revision-resolver.ts +44 -3
- package/src/commands/sequencer-pick.ts +370 -29
- package/src/commands/sequencer-support.ts +164 -2
- package/src/commands/serve-repository.ts +65 -0
- package/src/commands/session-id.ts +31 -0
- package/src/commands/shortlog-command.ts +354 -0
- package/src/commands/shortlog.ts +361 -0
- package/src/commands/show-branch-command.ts +981 -0
- package/src/commands/show-command.ts +3 -2
- package/src/commands/show-ref-command.ts +439 -0
- package/src/commands/signature-check.ts +37 -5
- package/src/commands/signing.ts +122 -16
- package/src/commands/stash-apply-command.ts +3 -0
- package/src/commands/stash-export-command.ts +397 -0
- package/src/commands/status-command.ts +158 -31
- package/src/commands/status-format.ts +1 -1
- package/src/commands/stripspace-command.ts +118 -0
- package/src/commands/submodule-add-command.ts +22 -1
- package/src/commands/submodule-auth.ts +61 -6
- package/src/commands/submodule-commands.ts +333 -5
- package/src/commands/submodule-fetch.ts +789 -0
- package/src/commands/submodule-model.ts +9 -1
- package/src/commands/submodule-unpack.ts +265 -0
- package/src/commands/submodule-update-command.ts +68 -5
- package/src/commands/subtree-shift.ts +215 -0
- package/src/commands/switch-command.ts +9 -0
- package/src/commands/textconv-cache.ts +143 -0
- package/src/commands/tree-restore.ts +20 -1
- package/src/commands/unpack-objects-command.ts +235 -0
- package/src/commands/update-index-command.ts +1016 -0
- package/src/commands/uri-protocols.ts +13 -0
- package/src/commands/url-parse-command.ts +67 -0
- package/src/commands/var-command.ts +219 -0
- package/src/commands/worktree-overwrite-checks.ts +5 -0
- package/src/errors/command-errors.ts +80 -0
- package/src/git-command.ts +218 -2
- package/src/git.ts +1033 -80
- package/src/guarded-transport-command.ts +176 -0
- package/src/index.ts +1 -0
- package/src/rename/detect-renames.ts +42 -8
- package/src/rename/diffcore-break.ts +166 -0
- package/src/rename/index.ts +1 -0
- package/src/results/blame-format.ts +268 -43
- package/src/results/cherry-pick-result.ts +6 -0
- package/src/results/clone-result.ts +6 -0
- package/src/results/diff-dirstat.ts +117 -0
- package/src/results/diff-entry.ts +24 -0
- package/src/results/diff-formatter.ts +8 -4
- package/src/results/diff-output.ts +239 -8
- package/src/results/diff-pickaxe.ts +1 -1
- package/src/results/fetch-result.ts +24 -1
- package/src/results/index.ts +2 -0
- package/src/results/init-result.ts +10 -1
- package/src/results/line-range-hunks.ts +126 -0
- package/src/results/merge-result.ts +14 -0
- package/src/results/pull-result.ts +7 -0
- package/src/results/push-result.ts +10 -0
- package/src/results/rebase-result.ts +7 -0
- package/src/results/revert-result.ts +6 -0
- package/src/results/stash-result.ts +6 -0
- package/src/results/status-result.ts +2 -2
- package/src/transport-command.ts +216 -4
- package/dist/fsck-DLRpbwTj.js +0 -13405
- package/dist/results-TB2IJ64h.js +0 -4700
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* git's bundle files (bundle.c, `Documentation/gitformat-bundle.adoc`): a header naming the
|
|
3
|
+
* refs the bundle carries and the commits it needs, then a pack.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```typescript
|
|
7
|
+
* // # v3 git bundle
|
|
8
|
+
* // @object-format=sha256
|
|
9
|
+
* // -<id> <subject> (a prerequisite)
|
|
10
|
+
* // <id> refs/heads/main (a ref)
|
|
11
|
+
* // (an empty line, then the pack)
|
|
12
|
+
* const header = parseBundleHeader(bytes);
|
|
13
|
+
* if (header.ok) for (const ref of header.header.references) console.log(ref.id, ref.name);
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
import { type ObjectFormat } from "@statewalker/vcs-utils/hash";
|
|
17
|
+
/** The first line of a v2 bundle. */
|
|
18
|
+
export declare const V2_BUNDLE_SIGNATURE = "# v2 git bundle\n";
|
|
19
|
+
/** The first line of a v3 bundle (capabilities may follow). */
|
|
20
|
+
export declare const V3_BUNDLE_SIGNATURE = "# v3 git bundle\n";
|
|
21
|
+
/** A ref a bundle carries (`<id> <refname>`). */
|
|
22
|
+
export interface BundleRef {
|
|
23
|
+
readonly id: string;
|
|
24
|
+
readonly name: string;
|
|
25
|
+
}
|
|
26
|
+
/** A commit a bundle needs (`-<id> <subject>`): its pack is thin against it. */
|
|
27
|
+
export interface BundlePrerequisite {
|
|
28
|
+
readonly id: string;
|
|
29
|
+
/** What follows the id on its line (the commit's subject), trimmed; never printed by git */
|
|
30
|
+
readonly comment: string;
|
|
31
|
+
}
|
|
32
|
+
/** A bundle's header (git's `struct bundle_header`). */
|
|
33
|
+
export interface BundleHeader {
|
|
34
|
+
readonly version: 2 | 3;
|
|
35
|
+
/** The `@object-format=` capability's hash (v3), else SHA-1 */
|
|
36
|
+
readonly objectFormat: ObjectFormat;
|
|
37
|
+
/** The `@filter=` capability's spec (v3): the pack is a partial clone's */
|
|
38
|
+
readonly filter?: string;
|
|
39
|
+
readonly prerequisites: readonly BundlePrerequisite[];
|
|
40
|
+
readonly references: readonly BundleRef[];
|
|
41
|
+
}
|
|
42
|
+
/** {@link parseBundleHeader}'s answer. */
|
|
43
|
+
export type ParsedBundleHeader = {
|
|
44
|
+
readonly ok: true;
|
|
45
|
+
readonly header: BundleHeader;
|
|
46
|
+
/** Where the pack starts (after the header's empty line; the end when it has none) */
|
|
47
|
+
readonly packOffset: number;
|
|
48
|
+
} | {
|
|
49
|
+
readonly ok: false;
|
|
50
|
+
/**
|
|
51
|
+
* git's `error:` line, without the prefix, where it reports one (a bad signature is
|
|
52
|
+
* reported by name: `'<name>' does not look like a v2 or v3 bundle file`)
|
|
53
|
+
*/
|
|
54
|
+
readonly error: string;
|
|
55
|
+
/** The signature was not a bundle's (git's `is_bundle` is false) */
|
|
56
|
+
readonly notABundle: boolean;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* bundle.c's `read_bundle_header_fd`: the signature, then lines up to an empty one (or the
|
|
60
|
+
* end): v3 capabilities (`@object-format=`, `@filter=`), prerequisites (`-<id>` optionally
|
|
61
|
+
* followed by a space and a comment) and refs (`<id> <name>`), each line right-trimmed.
|
|
62
|
+
* `name` is how a bad signature is reported (git's `report_path`).
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```typescript
|
|
66
|
+
* const parsed = parseBundleHeader(bytes, "repo.bundle");
|
|
67
|
+
* if (!parsed.ok) console.error(`error: ${parsed.error}`);
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
export declare function parseBundleHeader(bytes: Uint8Array, name?: string): ParsedBundleHeader;
|
|
71
|
+
/**
|
|
72
|
+
* The header `create_bundle` writes: the signature (v3 with `@object-format=` and, for a
|
|
73
|
+
* filtered bundle, `@filter=`), `-<id> <comment>` per prerequisite, `<id> <name>` per ref,
|
|
74
|
+
* then the empty line the pack follows.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```typescript
|
|
78
|
+
* const bytes = encodeBundleHeader({ version: 2, objectFormat: SHA1_OBJECT_FORMAT,
|
|
79
|
+
* prerequisites: [], references: [{ id, name: "refs/heads/main" }] });
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
export declare function encodeBundleHeader(header: BundleHeader): Uint8Array;
|
|
83
|
+
/**
|
|
84
|
+
* bundle.c's `list_refs`: `<id> <name>` per ref, only those named in `names` when any are
|
|
85
|
+
* (exact names, as `git bundle list-heads <file> <refname>...` and `unbundle` take them).
|
|
86
|
+
* A prerequisite is listed with an empty name (`<id> `), as `git bundle verify` prints it.
|
|
87
|
+
*/
|
|
88
|
+
export declare function listBundleRefs(refs: readonly (BundleRef | BundlePrerequisite)[], names?: readonly string[]): string;
|
|
89
|
+
//# sourceMappingURL=bundle-format.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundle-format.d.ts","sourceRoot":"","sources":["../../../src/commands/bundle/bundle-format.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EACL,KAAK,YAAY,EAGlB,MAAM,6BAA6B,CAAC;AAErC,qCAAqC;AACrC,eAAO,MAAM,mBAAmB,sBAAsB,CAAC;AACvD,+DAA+D;AAC/D,eAAO,MAAM,mBAAmB,sBAAsB,CAAC;AAEvD,iDAAiD;AACjD,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,gFAAgF;AAChF,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,4FAA4F;IAC5F,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,wDAAwD;AACxD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC;IACxB,+DAA+D;IAC/D,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,2EAA2E;IAC3E,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,aAAa,EAAE,SAAS,kBAAkB,EAAE,CAAC;IACtD,QAAQ,CAAC,UAAU,EAAE,SAAS,SAAS,EAAE,CAAC;CAC3C;AAED,0CAA0C;AAC1C,MAAM,MAAM,kBAAkB,GAC1B;IACE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAClB,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,sFAAsF;IACtF,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B,GACD;IACE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,oEAAoE;IACpE,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;CAC9B,CAAC;AAMN;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,SAAa,GAAG,kBAAkB,CAkF1F;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,GAAG,UAAU,CAqBnE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,SAAS,CAAC,SAAS,GAAG,kBAAkB,CAAC,EAAE,EACjD,KAAK,GAAE,SAAS,MAAM,EAAO,GAC5B,MAAM,CAQR"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bundle lists (bundle-uri.c): what a bundle URI or a server's `bundle-uri` answer describes.
|
|
3
|
+
* A list has a version (1), a mode (`all`: every bundle is needed; `any`: one is enough), an
|
|
4
|
+
* optional heuristic (`creationToken`: bundles ordered by a number, fetched newest first and
|
|
5
|
+
* applied oldest first) and bundles by id, each with a URI resolved against the list's own URI.
|
|
6
|
+
*
|
|
7
|
+
* Lists come in two shapes: the `key=value` lines of a v2 `bundle-uri` answer
|
|
8
|
+
* ({@link parseBundleListLine}, `bundle_uri_parse_line`) and a git config file a bundle URI
|
|
9
|
+
* serves instead of a bundle ({@link parseBundleListConfig}, `bundle_uri_parse_config_format`).
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const list = new BundleList("https://example.com/repo");
|
|
14
|
+
* parseBundleListLine(list, "bundle.one.uri=one.bundle");
|
|
15
|
+
* printBundleList(list); // "[bundle]\n\tversion = 1\n\tmode = all\n[bundle \"one\"]\n..."
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
/** One bundle of a list (`struct remote_bundle_info`). */
|
|
19
|
+
export interface RemoteBundleInfo {
|
|
20
|
+
/** The `<id>` of `bundle.<id>.*` */
|
|
21
|
+
readonly id: string;
|
|
22
|
+
/** `bundle.<id>.uri`, resolved against the list's base URI */
|
|
23
|
+
uri?: string;
|
|
24
|
+
/** `bundle.<id>.creationToken` (0 when unset or unparsable) */
|
|
25
|
+
creationToken: bigint;
|
|
26
|
+
/** The downloaded bytes (undefined: not tried yet; null: the download failed) */
|
|
27
|
+
file?: Uint8Array | null;
|
|
28
|
+
/** Applied, or given up on (`unbundled`) */
|
|
29
|
+
unbundled?: boolean;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* A bundle list (`struct bundle_list`). Its bundles iterate in the order of git's hashmap
|
|
33
|
+
* (hashmap.c keyed by `strhash` of the id: 64 buckets growing fourfold past 80% load, each new
|
|
34
|
+
* entry first in its bucket), which decides the order bundles are downloaded and applied in.
|
|
35
|
+
*/
|
|
36
|
+
export declare class BundleList {
|
|
37
|
+
version: number;
|
|
38
|
+
mode: "all" | "any";
|
|
39
|
+
heuristic?: "creationToken";
|
|
40
|
+
/** The URI relative bundle URIs resolve against */
|
|
41
|
+
baseURI?: string;
|
|
42
|
+
private table;
|
|
43
|
+
private count;
|
|
44
|
+
constructor(baseURI?: string);
|
|
45
|
+
/** The bundle `id` names (`hashmap_get_entry`), the first added on duplicates. */
|
|
46
|
+
get(id: string): RemoteBundleInfo | undefined;
|
|
47
|
+
/** Adds a bundle (`hashmap_add`: duplicates allowed). */
|
|
48
|
+
add(info: RemoteBundleInfo): void;
|
|
49
|
+
/** The bundles in git's iteration order (`for_all_bundles_in_list`). */
|
|
50
|
+
bundles(): RemoteBundleInfo[];
|
|
51
|
+
get size(): number;
|
|
52
|
+
}
|
|
53
|
+
/** What went wrong parsing a list: git's `error:`/`warning:` lines, in order. */
|
|
54
|
+
export interface BundleListMessages {
|
|
55
|
+
readonly lines: string[];
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* `bundle_list_update`: applies `bundle.<key>` = `value` (`value` undefined for a key written
|
|
59
|
+
* without `=`). Returns false where git returns -1 (a key outside `bundle.`, a version other
|
|
60
|
+
* than 1, an unknown mode, a second `uri`, a missing value: the last with git's `error:` line).
|
|
61
|
+
*
|
|
62
|
+
* @throws GitApiError git's `cannot strip one component off url` death of a relative URI
|
|
63
|
+
* climbing above the base
|
|
64
|
+
*/
|
|
65
|
+
export declare function updateBundleList(list: BundleList, key: string, value: string | undefined, messages: string[]): boolean;
|
|
66
|
+
/**
|
|
67
|
+
* `bundle_uri_parse_line`: one `key=value` line of a `bundle-uri` answer applied to `list`.
|
|
68
|
+
* Returns git's `error:` line for a malformed line (empty, no `=`, an empty key or value),
|
|
69
|
+
* `""` for a line {@link updateBundleList} refuses, undefined when it was taken.
|
|
70
|
+
*/
|
|
71
|
+
export declare function parseBundleListLine(list: BundleList, line: string, messages?: string[]): string | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* `strbuf_strip_file_from_path`: the URI up to and including its last `/` (all of it when it
|
|
74
|
+
* has none).
|
|
75
|
+
*/
|
|
76
|
+
export declare function stripFileFromPath(uri: string): string;
|
|
77
|
+
/**
|
|
78
|
+
* `bundle_uri_parse_config_format`: a list in git's config format, downloaded from `uri`
|
|
79
|
+
* (`name` is how git names the file in its `bad config line` error). The list's base URI is
|
|
80
|
+
* `uri` without its file name unless it has one already. Returns false where git returns
|
|
81
|
+
* nonzero (a line git's parser refuses, a key `bundle_list_update` refuses, a bundle without a
|
|
82
|
+
* URI), with git's lines in `messages`.
|
|
83
|
+
*
|
|
84
|
+
* @throws GitApiError a relative URI climbing above the base (git dies)
|
|
85
|
+
*/
|
|
86
|
+
export declare function parseBundleListConfig(uri: string, bytes: Uint8Array, name: string, list: BundleList, messages: string[]): Promise<boolean>;
|
|
87
|
+
/**
|
|
88
|
+
* `print_bundle_list`: the list as a config file (the bundles in iteration order, a bundle
|
|
89
|
+
* without a URI as `# uri = (missing)`).
|
|
90
|
+
*/
|
|
91
|
+
export declare function printBundleList(list: BundleList): string;
|
|
92
|
+
//# sourceMappingURL=bundle-list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundle-list.d.ts","sourceRoot":"","sources":["../../../src/commands/bundle/bundle-list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH,0DAA0D;AAC1D,MAAM,WAAW,gBAAgB;IAC/B,oCAAoC;IACpC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,8DAA8D;IAC9D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,+DAA+D;IAC/D,aAAa,EAAE,MAAM,CAAC;IACtB,iFAAiF;IACjF,IAAI,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IACzB,4CAA4C;IAC5C,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AASD;;;;GAIG;AACH,qBAAa,UAAU;IACrB,OAAO,SAAK;IACZ,IAAI,EAAE,KAAK,GAAG,KAAK,CAAS;IAC5B,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,mDAAmD;IACnD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,KAAK,CAGX;IACF,OAAO,CAAC,KAAK,CAAK;IAElB,YAAY,OAAO,CAAC,EAAE,MAAM,EAE3B;IAED,kFAAkF;IAClF,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS,CAK5C;IAED,yDAAyD;IACzD,GAAG,CAAC,IAAI,EAAE,gBAAgB,GAAG,IAAI,CAYhC;IAED,wEAAwE;IACxE,OAAO,IAAI,gBAAgB,EAAE,CAE5B;IAED,IAAI,IAAI,IAAI,MAAM,CAEjB;CACF;AAED,iFAAiF;AACjF,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,UAAU,EAChB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,QAAQ,EAAE,MAAM,EAAE,GACjB,OAAO,CA2DT;AAWD;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,MAAM,EACZ,QAAQ,GAAE,MAAM,EAAO,GACtB,MAAM,GAAG,SAAS,CAUpB;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAGrD;AAED;;;;;;;;GAQG;AACH,wBAAsB,qBAAqB,CACzC,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,UAAU,EACjB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,UAAU,EAChB,QAAQ,EAAE,MAAM,EAAE,GACjB,OAAO,CAAC,OAAO,CAAC,CA8BlB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CASxD"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `git bundle verify`, `git bundle list-heads` and `git bundle unbundle` (builtin/bundle.c):
|
|
3
|
+
* a bundle read, checked against the repository, listed, or its pack stored.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```typescript
|
|
7
|
+
* const bytes = await readFile(files, "repo.bundle");
|
|
8
|
+
* // git bundle verify repo.bundle
|
|
9
|
+
* const { exitCode, stdout, stderr } = await git.bundleVerify().setBundle(bytes, "repo.bundle").call();
|
|
10
|
+
* // git bundle list-heads repo.bundle refs/heads/main
|
|
11
|
+
* await git.bundleListHeads().setBundle(bytes).addRefName("refs/heads/main").call();
|
|
12
|
+
* // git bundle unbundle repo.bundle (then update refs from the printed list)
|
|
13
|
+
* const { refs } = await git.bundleUnbundle().setBundle(bytes).call();
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
import type { BundleHeader, BundleRef } from "./bundle-format.js";
|
|
17
|
+
import { BundleCommandBase } from "./bundle-support.js";
|
|
18
|
+
import { type BundleCommandResult, type BundleInput } from "./bundle-verify.js";
|
|
19
|
+
/** What a bundle command read. */
|
|
20
|
+
export interface BundleReadResult extends BundleCommandResult {
|
|
21
|
+
/** The bundle's header, once it was read */
|
|
22
|
+
header?: BundleHeader;
|
|
23
|
+
}
|
|
24
|
+
/** What `git bundle unbundle` did. */
|
|
25
|
+
export interface BundleUnbundleResult extends BundleReadResult {
|
|
26
|
+
/** The refs listed on stdout (all, or those named) */
|
|
27
|
+
refs: BundleRef[];
|
|
28
|
+
/** The pack stored (when the store keeps packs) */
|
|
29
|
+
packId?: string;
|
|
30
|
+
}
|
|
31
|
+
/** The setters every bundle reader takes. */
|
|
32
|
+
declare abstract class BundleReadCommand<T> extends BundleCommandBase<T> {
|
|
33
|
+
protected input?: BundleInput;
|
|
34
|
+
protected name: string;
|
|
35
|
+
protected readonly refNames: string[];
|
|
36
|
+
/**
|
|
37
|
+
* The bundle's bytes, and the name git reports it by (its path as given; `<stdin>` for
|
|
38
|
+
* `-`, the default).
|
|
39
|
+
*/
|
|
40
|
+
setBundle(bundle: BundleInput, name?: string): this;
|
|
41
|
+
/** `[<refname>...]`: only these refs are listed (exact names). */
|
|
42
|
+
addRefName(name: string): this;
|
|
43
|
+
protected read(): Promise<{
|
|
44
|
+
ok: true;
|
|
45
|
+
bundle: import("./bundle-verify.js").OpenedBundle;
|
|
46
|
+
} | {
|
|
47
|
+
ok: false;
|
|
48
|
+
error: string;
|
|
49
|
+
}>;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* `git bundle verify [-q] <file>`: the header read, every prerequisite present and connected
|
|
53
|
+
* to the refs (`error: Repository lacks these prerequisite commits:` and one `error: <id> `
|
|
54
|
+
* line per missing one, or `error: some prerequisite commits exist in the object store, but
|
|
55
|
+
* are not connected to the repository's history`; exit 1), what the bundle holds on stdout
|
|
56
|
+
* (unless quiet) and `<file> is okay` on stderr.
|
|
57
|
+
*/
|
|
58
|
+
export declare class BundleVerifyCommand extends BundleReadCommand<BundleReadResult> {
|
|
59
|
+
private quiet;
|
|
60
|
+
/** `-q` / `--quiet`: no details on stdout, no line per missing prerequisite. */
|
|
61
|
+
setQuiet(quiet: boolean): this;
|
|
62
|
+
call(): Promise<BundleReadResult>;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* `git bundle list-heads <file> [<refname>...]`: the bundle's refs, `<id> <name>` each
|
|
66
|
+
* (only those named). It reads no repository (git runs it outside one).
|
|
67
|
+
*/
|
|
68
|
+
export declare class BundleListHeadsCommand extends BundleReadCommand<BundleReadResult> {
|
|
69
|
+
call(): Promise<BundleReadResult>;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* `git bundle unbundle <file> [<refname>...]`: the bundle verified as `verify` does (its
|
|
73
|
+
* lines on failure, exit 1), its pack stored (kept as a pack, a filtered bundle's marked as a
|
|
74
|
+
* promisor pack, `from-bundle`), then its refs listed on stdout. No ref is written: the
|
|
75
|
+
* caller updates them from the list (as git's porcelain does).
|
|
76
|
+
*/
|
|
77
|
+
export declare class BundleUnbundleCommand extends BundleReadCommand<BundleUnbundleResult> {
|
|
78
|
+
call(): Promise<BundleUnbundleResult>;
|
|
79
|
+
}
|
|
80
|
+
export {};
|
|
81
|
+
//# sourceMappingURL=bundle-read-commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundle-read-commands.d.ts","sourceRoot":"","sources":["../../../src/commands/bundle/bundle-read-commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAElE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAGjB,MAAM,oBAAoB,CAAC;AAE5B,kCAAkC;AAClC,MAAM,WAAW,gBAAiB,SAAQ,mBAAmB;IAC3D,4CAA4C;IAC5C,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAED,sCAAsC;AACtC,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;IAC5D,sDAAsD;IACtD,IAAI,EAAE,SAAS,EAAE,CAAC;IAClB,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,6CAA6C;AAC7C,uBAAe,iBAAiB,CAAC,CAAC,CAAE,SAAQ,iBAAiB,CAAC,CAAC,CAAC;IAC9D,SAAS,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC;IAC9B,SAAS,CAAC,IAAI,SAAa;IAC3B,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAM;IAE3C;;;OAGG;IACH,SAAS,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,SAAY,GAAG,IAAI,CAKrD;IAED,kEAAkE;IAClE,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAI7B;IAED,UAAgB,IAAI;;;;;;OAOnB;CACF;AAED;;;;;;GAMG;AACH,qBAAa,mBAAoB,SAAQ,iBAAiB,CAAC,gBAAgB,CAAC;IAC1E,OAAO,CAAC,KAAK,CAAS;IAEtB,gFAAgF;IAChF,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAI7B;IAEK,IAAI,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAkBtC;CACF;AAED;;;GAGG;AACH,qBAAa,sBAAuB,SAAQ,iBAAiB,CAAC,gBAAgB,CAAC;IACvE,IAAI,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAUtC;CACF;AAED;;;;;GAKG;AACH,qBAAa,qBAAsB,SAAQ,iBAAiB,CAAC,oBAAoB,CAAC;IAC1E,IAAI,IAAI,OAAO,CAAC,oBAAoB,CAAC,CAkB1C;CACF"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the bundle commands share: bundle.c's `verify_bundle` and `unbundle` over the
|
|
3
|
+
* command's repository.
|
|
4
|
+
*/
|
|
5
|
+
import { type ObjectId } from "@statewalker/vcs-core";
|
|
6
|
+
import { GitCommand } from "../../git-command.js";
|
|
7
|
+
import type { BundleHeader } from "./bundle-format.js";
|
|
8
|
+
import { type OpenedBundle, type VerifyBundleOptions } from "./bundle-verify.js";
|
|
9
|
+
/** The commands reading a bundle against the repository. */
|
|
10
|
+
export declare abstract class BundleCommandBase<T> extends GitCommand<T> {
|
|
11
|
+
/**
|
|
12
|
+
* bundle.c's `verify_bundle` against this repository (see {@link verifyBundleIn}).
|
|
13
|
+
*/
|
|
14
|
+
protected verifyBundle(header: BundleHeader, options?: VerifyBundleOptions): Promise<{
|
|
15
|
+
ok: boolean;
|
|
16
|
+
stdout: string;
|
|
17
|
+
stderr: string;
|
|
18
|
+
}>;
|
|
19
|
+
/**
|
|
20
|
+
* bundle.c's `unbundle`: the bundle verified (git's lines on failure), then its pack
|
|
21
|
+
* indexed and kept (`index-pack --fix-thin --stdin`), a filtered bundle's marked as a
|
|
22
|
+
* promisor pack (`--promisor=from-bundle`).
|
|
23
|
+
*/
|
|
24
|
+
protected unbundleInto(bundle: OpenedBundle, options?: VerifyBundleOptions): Promise<{
|
|
25
|
+
ok: boolean;
|
|
26
|
+
stderr: string;
|
|
27
|
+
packId?: string;
|
|
28
|
+
}>;
|
|
29
|
+
/** What `rev-list --all` starts from: every ref's value and HEAD's. */
|
|
30
|
+
protected allRefValues(): Promise<ObjectId[]>;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=bundle-support.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundle-support.d.ts","sourceRoot":"","sources":["../../../src/commands/bundle/bundle-support.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAA2B,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAG/E,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,mBAAmB,EAAkB,MAAM,oBAAoB,CAAC;AAEjG,4DAA4D;AAC5D,8BAAsB,iBAAiB,CAAC,CAAC,CAAE,SAAQ,UAAU,CAAC,CAAC,CAAC;IAC9D;;OAEG;IACH,UAAgB,YAAY,CAC1B,MAAM,EAAE,YAAY,EACpB,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC;QAAE,EAAE,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAU1D;IAED;;;;OAIG;IACH,UAAgB,YAAY,CAC1B,MAAM,EAAE,YAAY,EACpB,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC;QAAE,EAAE,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CA2B3D;IAED,uEAAuE;IACvE,UAAgB,YAAY,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC,CAalD;CACF"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* git's bundle transport (transport.c's `bundle_vtable`): a remote URL that is a path to a
|
|
3
|
+
* bundle file is read as a repository whose refs are the bundle's and whose only pack is the
|
|
4
|
+
* bundle's. Fetch, clone, pull and ls-remote reach it through an upload-pack served in
|
|
5
|
+
* process from the bundle: its refs advertised (in git's order: the bundle's refs reversed,
|
|
6
|
+
* as `get_refs_from_bundle` prepends each), and any fetch answered with the bundle's pack,
|
|
7
|
+
* once the fetching repository has the bundle's prerequisites (`unbundle`'s `verify_bundle`).
|
|
8
|
+
*/
|
|
9
|
+
import { type Duplex, type UploadPackConnection } from "@statewalker/vcs-transport";
|
|
10
|
+
import { TransportError } from "../../errors/index.js";
|
|
11
|
+
import type { OpenedBundle } from "./bundle-verify.js";
|
|
12
|
+
/** A bundle remote: its file read, and how to check it against the fetching repository. */
|
|
13
|
+
export interface BundleRemote {
|
|
14
|
+
readonly bundle: OpenedBundle;
|
|
15
|
+
/**
|
|
16
|
+
* `verify_bundle` against the repository fetching (its `error:` lines on failure), run
|
|
17
|
+
* before the pack is handed over
|
|
18
|
+
*/
|
|
19
|
+
verify(): Promise<{
|
|
20
|
+
ok: boolean;
|
|
21
|
+
stderr: string;
|
|
22
|
+
}>;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* A fetch from a bundle the repository lacks the prerequisites of: `verify_bundle`'s lines
|
|
26
|
+
* (`git fetch` exits 1; `git clone` adds `fatal: remote transport reported error`, 128).
|
|
27
|
+
*/
|
|
28
|
+
export declare class BundlePrerequisitesError extends TransportError {
|
|
29
|
+
readonly lines: string;
|
|
30
|
+
constructor(lines: string);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Runs `run` over a connection to an upload-pack serving the bundle (protocol v0). A fetch
|
|
34
|
+
* that needs the pack verifies the bundle first: when the repository lacks its prerequisites
|
|
35
|
+
* the fetch fails with git's lines (exit 1, as `git fetch` returns).
|
|
36
|
+
*/
|
|
37
|
+
export declare function withBundleUploadPack<T>(remote: BundleRemote, createPair: () => [Duplex, Duplex], run: (connection: UploadPackConnection) => Promise<T>): Promise<T>;
|
|
38
|
+
//# sourceMappingURL=bundle-transport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundle-transport.d.ts","sourceRoot":"","sources":["../../../src/commands/bundle/bundle-transport.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,KAAK,MAAM,EAKX,KAAK,oBAAoB,EAC1B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,2FAA2F;AAC3F,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B;;;OAGG;IACH,MAAM,IAAI,OAAO,CAAC;QAAE,EAAE,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACpD;AAED;;;GAGG;AACH,qBAAa,wBAAyB,SAAQ,cAAc;IAC9C,QAAQ,CAAC,KAAK,EAAE,MAAM;IAAlC,YAAqB,KAAK,EAAE,MAAM,EAGjC;CACF;AAKD;;;;GAIG;AACH,wBAAsB,oBAAoB,CAAC,CAAC,EAC1C,MAAM,EAAE,YAAY,EACpB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAClC,GAAG,EAAE,CAAC,UAAU,EAAE,oBAAoB,KAAK,OAAO,CAAC,CAAC,CAAC,GACpD,OAAO,CAAC,CAAC,CAAC,CAwCZ"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The repository side of bundle URIs for clone and fetch: downloads (`copy_uri_to_file`),
|
|
3
|
+
* `unbundle_from_file` (the bundle verified quietly, its pack indexed and kept, its refs
|
|
4
|
+
* written under `refs/bundles/`) and `fetch.bundleCreationToken`.
|
|
5
|
+
*/
|
|
6
|
+
import { type ObjectId, type RefLogOptions } from "@statewalker/vcs-core";
|
|
7
|
+
import { type Credentials, type HttpClientSettings, type HttpCredentialHelper } from "@statewalker/vcs-transport";
|
|
8
|
+
import type { WorkingCopy } from "../../types.js";
|
|
9
|
+
import type { BundleUriHost } from "./bundle-uri.js";
|
|
10
|
+
/** What {@link createBundleUriHost} works with. */
|
|
11
|
+
export interface BundleUriHostOptions {
|
|
12
|
+
workingCopy: WorkingCopy;
|
|
13
|
+
/** Writes a ref (no old value checked: git reads it right before) */
|
|
14
|
+
setRef(name: string, id: ObjectId, log: RefLogOptions): Promise<void>;
|
|
15
|
+
/** Reads a ref's value */
|
|
16
|
+
getRef(name: string): Promise<ObjectId | undefined>;
|
|
17
|
+
/** The reflog entry of a write (`fetched bundle`) */
|
|
18
|
+
reflogLine(message: string): RefLogOptions;
|
|
19
|
+
/**
|
|
20
|
+
* git 2.43 maps only `refs/heads/<name>` to `refs/bundles/<name>`; 2.5x maps every
|
|
21
|
+
* `refs/<name>` to `refs/bundles/<name>` (tags too)
|
|
22
|
+
*/
|
|
23
|
+
compatibility?: "2.43" | "2.56";
|
|
24
|
+
/** A local path's bytes (relative paths as the clone resolves its source) */
|
|
25
|
+
readLocalFile(path: string): Promise<Uint8Array | undefined>;
|
|
26
|
+
/** HTTP: the remote's URL; static credentials and headers go only to its origin */
|
|
27
|
+
remoteUrl?: string;
|
|
28
|
+
credentials?: Credentials;
|
|
29
|
+
headers?: Record<string, string>;
|
|
30
|
+
credentialHelper?: HttpCredentialHelper;
|
|
31
|
+
httpSettings?(url: string): HttpClientSettings;
|
|
32
|
+
fetchImpl?: (request: Request) => Promise<Response>;
|
|
33
|
+
/** Reads `fetch.bundleCreationToken` */
|
|
34
|
+
configValue(key: string): string | null | undefined;
|
|
35
|
+
/** Stores `fetch.bundleCreationToken` */
|
|
36
|
+
setConfigValue(key: string, value: string): Promise<void>;
|
|
37
|
+
message(line: string): void;
|
|
38
|
+
/** How the downloaded list file is named in errors */
|
|
39
|
+
tempFileName?(): string;
|
|
40
|
+
}
|
|
41
|
+
/** A host over a repository (see {@link BundleUriHostOptions}). */
|
|
42
|
+
export declare function createBundleUriHost(options: BundleUriHostOptions): BundleUriHost;
|
|
43
|
+
//# sourceMappingURL=bundle-uri-host.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundle-uri-host.d.ts","sourceRoot":"","sources":["../../../src/commands/bundle/bundle-uri-host.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAA2B,KAAK,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACnG,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EAE1B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGrD,mDAAmD;AACnD,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,WAAW,CAAC;IACzB,qEAAqE;IACrE,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtE,0BAA0B;IAC1B,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC,CAAC;IACpD,qDAAqD;IACrD,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,CAAC;IAC3C;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAChC,6EAA6E;IAC7E,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAAC;IAC7D,mFAAmF;IACnF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,gBAAgB,CAAC,EAAE,oBAAoB,CAAC;IACxC,YAAY,CAAC,CAAC,GAAG,EAAE,MAAM,GAAG,kBAAkB,CAAC;IAC/C,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IACpD,wCAAwC;IACxC,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACpD,yCAAyC;IACzC,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,sDAAsD;IACtD,YAAY,CAAC,IAAI,MAAM,CAAC;CACzB;AAWD,mEAAmE;AACnE,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,oBAAoB,GAAG,aAAa,CAyEhF"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bundle URIs on the client (bundle-uri.c): before a clone or a fetch talks to the remote,
|
|
3
|
+
* bundles are downloaded from a URI (`git clone --bundle-uri`, `fetch.bundleURI`) or from the
|
|
4
|
+
* list the server advertises (`transfer.bundleURI`, the v2 `bundle-uri` command) and
|
|
5
|
+
* unbundled into the repository, their refs written under `refs/bundles/`. The fetch that
|
|
6
|
+
* follows then has them as local tips, so it asks only for what they lack.
|
|
7
|
+
*
|
|
8
|
+
* The engine is the host's: {@link BundleUriHost} downloads a URI, unbundles bytes and reads
|
|
9
|
+
* and writes `fetch.bundleCreationToken`. {@link fetchBundleUri} and {@link fetchBundleList}
|
|
10
|
+
* follow git's walk, its recursion limit, `all`/`any` modes and the `creationToken`
|
|
11
|
+
* heuristic, and give git's warnings in order.
|
|
12
|
+
*/
|
|
13
|
+
import { BundleList } from "./bundle-list.js";
|
|
14
|
+
/** What the walk needs of the repository and the network. */
|
|
15
|
+
export interface BundleUriHost {
|
|
16
|
+
/**
|
|
17
|
+
* `copy_uri_to_file`: the bytes at `uri` (an `http(s)://` URL, a `file://` URL or a path),
|
|
18
|
+
* or undefined when they cannot be had (git's warning follows)
|
|
19
|
+
*/
|
|
20
|
+
download(uri: string): Promise<Uint8Array | undefined>;
|
|
21
|
+
/**
|
|
22
|
+
* `unbundle_from_file`: the bundle verified (quietly) and its pack indexed, then its refs
|
|
23
|
+
* written under `refs/bundles/`; false when the header, the prerequisites or the pack fail
|
|
24
|
+
*/
|
|
25
|
+
unbundle(bytes: Uint8Array): Promise<boolean>;
|
|
26
|
+
/** `fetch.bundleCreationToken` as set (undefined: unset; null: set without a value) */
|
|
27
|
+
creationToken(): string | null | undefined;
|
|
28
|
+
/** Stores `fetch.bundleCreationToken` in the repository's config */
|
|
29
|
+
setCreationToken(value: string): Promise<void>;
|
|
30
|
+
/** A line git prints on stderr (`warning: ...`, `error: ...`) */
|
|
31
|
+
message(line: string): void;
|
|
32
|
+
/**
|
|
33
|
+
* How git names a downloaded list in its `bad config line` error (its temporary file,
|
|
34
|
+
* `<objects>/bundles/tmp_uri_XXXXXX`)
|
|
35
|
+
*/
|
|
36
|
+
tempFileName?(): string;
|
|
37
|
+
}
|
|
38
|
+
/** Whether the bytes read as a bundle (`is_bundle`: the whole header parses). */
|
|
39
|
+
export declare function isBundle(bytes: Uint8Array): boolean;
|
|
40
|
+
/**
|
|
41
|
+
* `fetch_bundle_uri`: the bundle (or bundle list) at `uri` downloaded and applied. An empty
|
|
42
|
+
* URI does nothing (a configured `fetch.bundleURI` turned off). `ok` false where git returns
|
|
43
|
+
* nonzero (its warnings already given); `hasHeuristic` when a list used `creationToken` (git's
|
|
44
|
+
* clone then stores the URI as `fetch.bundleURI`).
|
|
45
|
+
*/
|
|
46
|
+
export declare function fetchBundleUri(host: BundleUriHost, uri: string): Promise<{
|
|
47
|
+
ok: boolean;
|
|
48
|
+
hasHeuristic: boolean;
|
|
49
|
+
}>;
|
|
50
|
+
/**
|
|
51
|
+
* `fetch_bundle_list`: the list a server advertised, downloaded and applied (by token under
|
|
52
|
+
* the `creationToken` heuristic). False where git warns `failed to fetch advertised bundles`.
|
|
53
|
+
*/
|
|
54
|
+
export declare function fetchBundleList(host: BundleUriHost, list: BundleList): Promise<boolean>;
|
|
55
|
+
//# sourceMappingURL=bundle-uri.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundle-uri.d.ts","sourceRoot":"","sources":["../../../src/commands/bundle/bundle-uri.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,UAAU,EAAgD,MAAM,kBAAkB,CAAC;AAE5F,6DAA6D;AAC7D,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAAC;IACvD;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9C,uFAAuF;IACvF,aAAa,IAAI,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3C,oEAAoE;IACpE,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/C,iEAAiE;IACjE,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B;;;OAGG;IACH,YAAY,CAAC,IAAI,MAAM,CAAC;CACzB;AAKD,iFAAiF;AACjF,wBAAgB,QAAQ,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAEnD;AAgKD;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,aAAa,EACnB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,YAAY,EAAE,OAAO,CAAA;CAAE,CAAC,CAOjD;AAED;;;GAGG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,CAM7F"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* bundle.c's reading side without a command: a bundle's bytes read (`read_bundle_header`)
|
|
3
|
+
* and checked against a repository (`verify_bundle`), as the bundle commands and the bundle
|
|
4
|
+
* transport do.
|
|
5
|
+
*/
|
|
6
|
+
import { type History, type ObjectId } from "@statewalker/vcs-core";
|
|
7
|
+
import { type BundleHeader } from "./bundle-format.js";
|
|
8
|
+
/** git's text and exit status for a bundle command. */
|
|
9
|
+
export interface BundleCommandResult {
|
|
10
|
+
/** 0, or git's exit status (1 for an `error()` return) */
|
|
11
|
+
exitCode: number;
|
|
12
|
+
/** What git prints on stdout */
|
|
13
|
+
stdout: string;
|
|
14
|
+
/** What git prints on stderr (`error:` lines, `<file> is okay`) */
|
|
15
|
+
stderr: string;
|
|
16
|
+
}
|
|
17
|
+
/** How {@link BundleCommandBase.verifyBundle} reports (bundle.h `verify_bundle_flags`). */
|
|
18
|
+
export interface VerifyBundleOptions {
|
|
19
|
+
/** VERIFY_BUNDLE_VERBOSE: the refs, the prerequisites, the hash and filter on stdout */
|
|
20
|
+
verbose?: boolean;
|
|
21
|
+
/** VERIFY_BUNDLE_QUIET: no line per missing prerequisite */
|
|
22
|
+
quiet?: boolean;
|
|
23
|
+
}
|
|
24
|
+
/** A bundle's bytes as the commands take them: whole, or a stream of chunks. */
|
|
25
|
+
export type BundleInput = Uint8Array | AsyncIterable<Uint8Array> | Iterable<Uint8Array>;
|
|
26
|
+
/** The bytes of a {@link BundleInput}, collected. */
|
|
27
|
+
export declare function bundleBytes(input: BundleInput): Promise<Uint8Array>;
|
|
28
|
+
/** A bundle read: its header and its pack. */
|
|
29
|
+
export interface OpenedBundle {
|
|
30
|
+
header: BundleHeader;
|
|
31
|
+
pack: Uint8Array;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* builtin/bundle.c's `open_bundle` (`read_bundle_header`): the header and the pack, or git's
|
|
35
|
+
* `error:` line (the bundle reported as `name`: its path, `<stdin>` for `-`).
|
|
36
|
+
*/
|
|
37
|
+
export declare function openBundle(bytes: Uint8Array, name: string): {
|
|
38
|
+
ok: true;
|
|
39
|
+
bundle: OpenedBundle;
|
|
40
|
+
} | {
|
|
41
|
+
ok: false;
|
|
42
|
+
error: string;
|
|
43
|
+
};
|
|
44
|
+
/** What {@link verifyBundleIn} reads of a repository. */
|
|
45
|
+
export interface BundleVerifyRepository {
|
|
46
|
+
history: History;
|
|
47
|
+
/** What `rev-list --all` starts from: every ref's value and HEAD's */
|
|
48
|
+
refValues(): Promise<ObjectId[]>;
|
|
49
|
+
/** The repository's shallow commits */
|
|
50
|
+
shallow(): Promise<ObjectId[]>;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* bundle.c's `verify_bundle`: every prerequisite must be an object here (each missing one
|
|
54
|
+
* on an `error:` line after `Repository lacks these prerequisite commits:`, unless quiet),
|
|
55
|
+
* then connected to the refs (`check_connected` of the prerequisites, `--not --all`); with
|
|
56
|
+
* `verbose`, what the bundle holds on stdout.
|
|
57
|
+
*/
|
|
58
|
+
export declare function verifyBundleIn(repository: BundleVerifyRepository, header: BundleHeader, options?: VerifyBundleOptions): Promise<{
|
|
59
|
+
ok: boolean;
|
|
60
|
+
stdout: string;
|
|
61
|
+
stderr: string;
|
|
62
|
+
}>;
|
|
63
|
+
//# sourceMappingURL=bundle-verify.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundle-verify.d.ts","sourceRoot":"","sources":["../../../src/commands/bundle/bundle-verify.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,OAAO,EAA2B,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAG7F,OAAO,EAAE,KAAK,YAAY,EAAqC,MAAM,oBAAoB,CAAC;AAE1F,uDAAuD;AACvD,MAAM,WAAW,mBAAmB;IAClC,0DAA0D;IAC1D,QAAQ,EAAE,MAAM,CAAC;IACjB,gCAAgC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,mEAAmE;IACnE,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,2FAA2F;AAC3F,MAAM,WAAW,mBAAmB;IAClC,wFAAwF;IACxF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,gFAAgF;AAChF,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,aAAa,CAAC,UAAU,CAAC,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC;AAExF,qDAAqD;AACrD,wBAAsB,WAAW,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CAezE;AAED,8CAA8C;AAC9C,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,YAAY,CAAC;IACrB,IAAI,EAAE,UAAU,CAAC;CAClB;AAED;;;GAGG;AACH,wBAAgB,UAAU,CACxB,KAAK,EAAE,UAAU,EACjB,IAAI,EAAE,MAAM,GACX;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,YAAY,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAInE;AAED,yDAAyD;AACzD,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,OAAO,CAAC;IACjB,sEAAsE;IACtE,SAAS,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IACjC,uCAAuC;IACvC,OAAO,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;CAChC;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,UAAU,EAAE,sBAAsB,EAClC,MAAM,EAAE,YAAY,EACpB,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAkD1D"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* git's bundles: `git bundle create`, `verify`, `list-heads`, `unbundle`, the format (v2 and
|
|
3
|
+
* v3, bundle.c) and the bundle transport fetch, clone and ls-remote read a bundle file through.
|
|
4
|
+
*/
|
|
5
|
+
export * from "./bundle-create-command.js";
|
|
6
|
+
export * from "./bundle-format.js";
|
|
7
|
+
export * from "./bundle-list.js";
|
|
8
|
+
export * from "./bundle-read-commands.js";
|
|
9
|
+
export * from "./bundle-support.js";
|
|
10
|
+
export * from "./bundle-transport.js";
|
|
11
|
+
export * from "./bundle-uri.js";
|
|
12
|
+
export * from "./bundle-uri-host.js";
|
|
13
|
+
export * from "./bundle-verify.js";
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/bundle/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* cat-file's `--batch` format (builtin/cat-file.c `expand_format`/`expand_atom`): the atoms
|
|
3
|
+
* a format names, checked once before any input is read (git's `mark_query` pass), then
|
|
4
|
+
* expanded per object.
|
|
5
|
+
*/
|
|
6
|
+
import { PlumbingError } from "../plumbing-command.js";
|
|
7
|
+
/** What one object expands with. */
|
|
8
|
+
export interface BatchObjectData {
|
|
9
|
+
id: string;
|
|
10
|
+
type?: string;
|
|
11
|
+
size?: number;
|
|
12
|
+
/** The tree or index entry's mode (`<rev>:<path>`), undefined otherwise */
|
|
13
|
+
mode?: number;
|
|
14
|
+
/** `%(rest)`: the input line after the object name and its whitespace */
|
|
15
|
+
rest?: string;
|
|
16
|
+
}
|
|
17
|
+
type Part = string | {
|
|
18
|
+
atom: "objectname" | "objecttype" | "objectsize" | "rest" | "objectmode" | "objectsize:disk" | "deltabase";
|
|
19
|
+
};
|
|
20
|
+
/** A parsed format and what it needs read. */
|
|
21
|
+
export interface BatchFormat {
|
|
22
|
+
parts: Part[];
|
|
23
|
+
/** `%(objecttype)` (or contents) needs the type */
|
|
24
|
+
needsType: boolean;
|
|
25
|
+
needsSize: boolean;
|
|
26
|
+
/** `%(rest)`: input lines are split at their first whitespace */
|
|
27
|
+
splitOnWhitespace: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* An atom the stores cannot answer (`objectsize:disk`, `deltabase`), kept by a parse with
|
|
30
|
+
* `deferUnsupported`: refused only when a local object needs it (`remote-object-info`
|
|
31
|
+
* expands it to nothing, as git)
|
|
32
|
+
*/
|
|
33
|
+
unsupported?: string;
|
|
34
|
+
}
|
|
35
|
+
/** The default format, `%(objectname) %(objecttype) %(objectsize)`. */
|
|
36
|
+
export declare const DEFAULT_BATCH_FORMAT = "%(objectname) %(objecttype) %(objectsize)";
|
|
37
|
+
/**
|
|
38
|
+
* Parses `format` as git's mark_query pass reads it: an atom git does not know dies there
|
|
39
|
+
* (2.43 `unknown format element: <atom>`, 2.5x `bad cat-file format: %(<atom>)`).
|
|
40
|
+
* `%(objectsize:disk)` and `%(deltabase)` are refused: the stores do not report on-disk sizes
|
|
41
|
+
* or delta bases, and printing a made-up value would lie.
|
|
42
|
+
*/
|
|
43
|
+
export declare function parseBatchFormat(format: string, compatibility: "2.43" | "2.56", options?: {
|
|
44
|
+
deferUnsupported?: boolean;
|
|
45
|
+
}): BatchFormat;
|
|
46
|
+
/** The refusal of an atom the stores cannot answer (see {@link BatchFormat.unsupported}). */
|
|
47
|
+
export declare function unsupportedAtom(atom: string): PlumbingError;
|
|
48
|
+
/**
|
|
49
|
+
* The format expanded for one object. With `remote` (an object `remote-object-info` asked
|
|
50
|
+
* about), an atom the server did not answer expands to nothing, as git's `expand_atom` with
|
|
51
|
+
* `is_remote`: `%(objectname)` always, `%(objectsize)` and `%(objecttype)` when answered.
|
|
52
|
+
*/
|
|
53
|
+
export declare function expandBatchFormat(format: BatchFormat, data: BatchObjectData, remote?: {
|
|
54
|
+
size: boolean;
|
|
55
|
+
type: boolean;
|
|
56
|
+
}): string;
|
|
57
|
+
export {};
|
|
58
|
+
//# sourceMappingURL=batch-format.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"batch-format.d.ts","sourceRoot":"","sources":["../../../src/commands/cat-file/batch-format.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,oCAAoC;AACpC,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,KAAK,IAAI,GACL,MAAM,GACN;IACE,IAAI,EACA,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,MAAM,GACN,YAAY,GACZ,iBAAiB,GACjB,WAAW,CAAC;CACjB,CAAC;AAEN,8CAA8C;AAC9C,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,mDAAmD;IACnD,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,iEAAiE;IACjE,iBAAiB,EAAE,OAAO,CAAC;IAC3B;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,uEAAuE;AACvE,eAAO,MAAM,oBAAoB,8CAA8C,CAAC;AAEhF;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,MAAM,GAAG,MAAM,EAC9B,OAAO,GAAE;IAAE,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAAO,GAC3C,WAAW,CAoEb;AAED,6FAA6F;AAC7F,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,CAE3D;AAUD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,WAAW,EACnB,IAAI,EAAE,eAAe,EACrB,MAAM,CAAC,EAAE;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,GACxC,MAAM,CAuCR"}
|