@statewalker/vcs-commands 0.9.0 → 0.11.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.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 +41 -2
- package/dist/commands/am/am-command.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 +43 -1
- package/dist/commands/blame-command.d.ts.map +1 -1
- 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 +144 -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-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.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/cherry-pick-command.d.ts +10 -0
- package/dist/commands/cherry-pick-command.d.ts.map +1 -1
- package/dist/commands/clone-command.d.ts +28 -0
- package/dist/commands/clone-command.d.ts.map +1 -1
- package/dist/commands/commit-command.d.ts +9 -1
- 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 +54 -0
- package/dist/commands/default-branch.d.ts.map +1 -1
- package/dist/commands/diff-command.d.ts +132 -5
- 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 +65 -0
- package/dist/commands/fetch-command.d.ts.map +1 -1
- package/dist/commands/fetch-multiple-command.d.ts.map +1 -1
- package/dist/commands/format-rev-command.d.ts +60 -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-ipc.d.ts +30 -0
- package/dist/commands/fsmonitor-ipc.d.ts.map +1 -0
- 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-hooks.d.ts +32 -0
- 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 +45 -1
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +6 -5
- 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/local-transport.d.ts.map +1 -1
- package/dist/commands/log-command.d.ts +26 -0
- package/dist/commands/log-command.d.ts.map +1 -1
- package/dist/commands/log-output.d.ts +28 -1
- 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/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 +7 -0
- 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 +67 -5
- package/dist/commands/merge-drivers.d.ts.map +1 -1
- package/dist/commands/merge-support.d.ts +6 -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/mktag-command.d.ts +51 -0
- package/dist/commands/mktag-command.d.ts.map +1 -0
- 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/ort-merge.d.ts +24 -0
- package/dist/commands/ort-merge.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 +24 -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.map +1 -1
- package/dist/commands/push-command.d.ts +17 -2
- package/dist/commands/push-command.d.ts.map +1 -1
- package/dist/commands/rebase-command.d.ts +108 -2
- 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/remote-object-info-command.d.ts +55 -0
- package/dist/commands/remote-object-info-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 +158 -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 -2
- package/dist/commands/reset-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 +3 -0
- package/dist/commands/rev-list-command.d.ts.map +1 -1
- package/dist/commands/rev-parse-command.d.ts +5 -0
- package/dist/commands/rev-parse-command.d.ts.map +1 -1
- package/dist/commands/revert-command.d.ts +10 -0
- package/dist/commands/revert-command.d.ts.map +1 -1
- package/dist/commands/revision-range.d.ts +5 -0
- package/dist/commands/revision-range.d.ts.map +1 -1
- package/dist/commands/revision-resolver.d.ts +27 -1
- package/dist/commands/revision-resolver.d.ts.map +1 -1
- package/dist/commands/sequencer-pick.d.ts +18 -0
- package/dist/commands/sequencer-pick.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/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 +30 -2
- 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 +16 -2
- 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 +22 -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 +9 -1
- package/dist/commands/submodule-commands.d.ts.map +1 -1
- package/dist/commands/submodule-update-command.d.ts +27 -1
- package/dist/commands/submodule-update-command.d.ts.map +1 -1
- package/dist/commands/tag-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 +131 -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-CNvli5bl.js → commands-bQQ9OmCh.js} +52514 -44630
- package/dist/errors/command-errors.d.ts +33 -0
- package/dist/errors/command-errors.d.ts.map +1 -1
- package/dist/errors/index.js +39 -1
- package/dist/{fsck-CPeDh9fh.js → fsck-BHT9bUS-.js} +184 -143
- package/dist/git-command.d.ts +66 -4
- package/dist/git-command.d.ts.map +1 -1
- package/dist/git.d.ts +532 -1
- package/dist/git.d.ts.map +1 -1
- package/dist/guarded-transport-command.d.ts +3 -1
- package/dist/guarded-transport-command.d.ts.map +1 -1
- package/dist/index.js +7 -6
- package/dist/maintenance-run-command-Cx2PlGV9.js +13544 -0
- package/dist/{remote-transport-CCmBadm-.js → remote-transport-BrQZfyHu.js} +1009 -10
- package/dist/results/cherry-pick-result.d.ts +6 -0
- package/dist/results/cherry-pick-result.d.ts.map +1 -1
- package/dist/results/diff-entry.d.ts +10 -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 +49 -3
- package/dist/results/diff-output.d.ts.map +1 -1
- package/dist/results/fetch-result.d.ts +12 -0
- package/dist/results/fetch-result.d.ts.map +1 -1
- package/dist/results/index.js +2 -2
- package/dist/results/merge-result.d.ts +5 -0
- package/dist/results/merge-result.d.ts.map +1 -1
- package/dist/results/push-result.d.ts +5 -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-BDuEgdLU.js → results-CNHQnU5Y.js} +13707 -10608
- package/dist/transport-command.d.ts +79 -1
- package/dist/transport-command.d.ts.map +1 -1
- package/package.json +13 -13
- package/src/commands/add-command.ts +3 -0
- package/src/commands/add-patch/patch-backend.ts +4 -1
- 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 +193 -22
- package/src/commands/apply/index.ts +1 -0
- 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 +118 -19
- 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 +895 -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-ref-format-command.ts +129 -0
- package/src/commands/checkout-command.ts +61 -22
- package/src/commands/checkout-index-command.ts +568 -0
- package/src/commands/checkout-paths.ts +7 -0
- package/src/commands/cherry-pick-command.ts +21 -1
- package/src/commands/clone-command.ts +249 -9
- package/src/commands/commit-command.ts +22 -4
- package/src/commands/config-command.ts +9 -0
- package/src/commands/daemon-access-hook.ts +78 -0
- package/src/commands/default-branch.ts +118 -1
- package/src/commands/diff-command.ts +592 -47
- 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 +312 -8
- package/src/commands/fetch-multiple-command.ts +4 -1
- package/src/commands/format-rev-command.ts +267 -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-ipc.ts +121 -0
- package/src/commands/fsmonitor-refresh.ts +320 -0
- package/src/commands/gc-command.ts +10 -0
- package/src/commands/git-hooks.ts +123 -6
- 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 +46 -0
- package/src/commands/init-command.ts +14 -0
- 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/local-transport.ts +252 -4
- package/src/commands/log-command.ts +104 -5
- package/src/commands/log-output.ts +66 -5
- 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 +708 -0
- package/src/commands/maintenance-run-command.ts +949 -0
- package/src/commands/merge-command.ts +78 -32
- package/src/commands/merge-config.ts +23 -1
- package/src/commands/merge-drivers.ts +109 -20
- package/src/commands/merge-support.ts +29 -5
- package/src/commands/merge-tree-command.ts +786 -0
- package/src/commands/mktag-command.ts +149 -0
- 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/ort-merge.ts +92 -25
- package/src/commands/patch-id-command.ts +65 -0
- package/src/commands/patch-id.ts +218 -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 +2 -0
- package/src/commands/push-command.ts +87 -5
- package/src/commands/rebase-command.ts +507 -19
- package/src/commands/refs-command.ts +274 -0
- package/src/commands/remote-object-info-command.ts +109 -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 +1066 -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 +75 -3
- package/src/commands/rev-filter/commit-grep.ts +7 -2
- package/src/commands/rev-list-command.ts +9 -0
- package/src/commands/rev-parse-command.ts +49 -5
- package/src/commands/revert-command.ts +21 -1
- package/src/commands/revision-range.ts +7 -2
- package/src/commands/revision-resolver.ts +97 -14
- package/src/commands/sequencer-pick.ts +47 -0
- package/src/commands/serve-repository.ts +65 -0
- package/src/commands/session-id.ts +31 -0
- package/src/commands/show-branch-command.ts +981 -0
- package/src/commands/show-command.ts +1 -1
- package/src/commands/show-ref-command.ts +439 -0
- package/src/commands/signature-check.ts +37 -5
- package/src/commands/signing.ts +176 -23
- package/src/commands/stash-apply-command.ts +3 -0
- package/src/commands/stash-export-command.ts +397 -0
- package/src/commands/status-command.ts +74 -8
- package/src/commands/stripspace-command.ts +118 -0
- package/src/commands/submodule-add-command.ts +40 -2
- package/src/commands/submodule-auth.ts +61 -6
- package/src/commands/submodule-commands.ts +12 -2
- package/src/commands/submodule-update-command.ts +47 -1
- package/src/commands/tag-command.ts +33 -11
- package/src/commands/textconv-cache.ts +143 -0
- package/src/commands/tree-restore.ts +14 -0
- package/src/commands/unpack-objects-command.ts +235 -0
- package/src/commands/update-index-command.ts +1148 -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/errors/command-errors.ts +45 -0
- package/src/git-command.ts +177 -3
- package/src/git.ts +808 -1
- package/src/guarded-transport-command.ts +6 -1
- package/src/results/cherry-pick-result.ts +6 -0
- package/src/results/diff-entry.ts +12 -0
- package/src/results/diff-formatter.ts +7 -4
- package/src/results/diff-output.ts +117 -11
- package/src/results/diff-pickaxe.ts +1 -1
- package/src/results/fetch-result.ts +12 -0
- package/src/results/merge-result.ts +5 -0
- package/src/results/push-result.ts +5 -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/transport-command.ts +182 -1
|
@@ -0,0 +1,152 @@
|
|
|
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
|
+
|
|
7
|
+
import { type History, historyWithoutLazyFetch, type ObjectId } from "@statewalker/vcs-core";
|
|
8
|
+
import { connectivityErrors, createRepositoryFacade } from "@statewalker/vcs-transport";
|
|
9
|
+
|
|
10
|
+
import { type BundleHeader, listBundleRefs, parseBundleHeader } from "./bundle-format.js";
|
|
11
|
+
|
|
12
|
+
/** git's text and exit status for a bundle command. */
|
|
13
|
+
export interface BundleCommandResult {
|
|
14
|
+
/** 0, or git's exit status (1 for an `error()` return) */
|
|
15
|
+
exitCode: number;
|
|
16
|
+
/** What git prints on stdout */
|
|
17
|
+
stdout: string;
|
|
18
|
+
/** What git prints on stderr (`error:` lines, `<file> is okay`) */
|
|
19
|
+
stderr: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** How {@link BundleCommandBase.verifyBundle} reports (bundle.h `verify_bundle_flags`). */
|
|
23
|
+
export interface VerifyBundleOptions {
|
|
24
|
+
/** VERIFY_BUNDLE_VERBOSE: the refs, the prerequisites, the hash and filter on stdout */
|
|
25
|
+
verbose?: boolean;
|
|
26
|
+
/** VERIFY_BUNDLE_QUIET: no line per missing prerequisite */
|
|
27
|
+
quiet?: boolean;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** A bundle's bytes as the commands take them: whole, or a stream of chunks. */
|
|
31
|
+
export type BundleInput = Uint8Array | AsyncIterable<Uint8Array> | Iterable<Uint8Array>;
|
|
32
|
+
|
|
33
|
+
/** The bytes of a {@link BundleInput}, collected. */
|
|
34
|
+
export async function bundleBytes(input: BundleInput): Promise<Uint8Array> {
|
|
35
|
+
if (input instanceof Uint8Array) return input;
|
|
36
|
+
const chunks: Uint8Array[] = [];
|
|
37
|
+
let length = 0;
|
|
38
|
+
for await (const chunk of input as AsyncIterable<Uint8Array>) {
|
|
39
|
+
chunks.push(chunk);
|
|
40
|
+
length += chunk.length;
|
|
41
|
+
}
|
|
42
|
+
const out = new Uint8Array(length);
|
|
43
|
+
let at = 0;
|
|
44
|
+
for (const chunk of chunks) {
|
|
45
|
+
out.set(chunk, at);
|
|
46
|
+
at += chunk.length;
|
|
47
|
+
}
|
|
48
|
+
return out;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** A bundle read: its header and its pack. */
|
|
52
|
+
export interface OpenedBundle {
|
|
53
|
+
header: BundleHeader;
|
|
54
|
+
pack: Uint8Array;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* builtin/bundle.c's `open_bundle` (`read_bundle_header`): the header and the pack, or git's
|
|
59
|
+
* `error:` line (the bundle reported as `name`: its path, `<stdin>` for `-`).
|
|
60
|
+
*/
|
|
61
|
+
export function openBundle(
|
|
62
|
+
bytes: Uint8Array,
|
|
63
|
+
name: string,
|
|
64
|
+
): { ok: true; bundle: OpenedBundle } | { ok: false; error: string } {
|
|
65
|
+
const parsed = parseBundleHeader(bytes, name);
|
|
66
|
+
if (!parsed.ok) return { ok: false, error: `error: ${parsed.error}\n` };
|
|
67
|
+
return { ok: true, bundle: { header: parsed.header, pack: bytes.subarray(parsed.packOffset) } };
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/** What {@link verifyBundleIn} reads of a repository. */
|
|
71
|
+
export interface BundleVerifyRepository {
|
|
72
|
+
history: History;
|
|
73
|
+
/** What `rev-list --all` starts from: every ref's value and HEAD's */
|
|
74
|
+
refValues(): Promise<ObjectId[]>;
|
|
75
|
+
/** The repository's shallow commits */
|
|
76
|
+
shallow(): Promise<ObjectId[]>;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* bundle.c's `verify_bundle`: every prerequisite must be an object here (each missing one
|
|
81
|
+
* on an `error:` line after `Repository lacks these prerequisite commits:`, unless quiet),
|
|
82
|
+
* then connected to the refs (`check_connected` of the prerequisites, `--not --all`); with
|
|
83
|
+
* `verbose`, what the bundle holds on stdout.
|
|
84
|
+
*/
|
|
85
|
+
export async function verifyBundleIn(
|
|
86
|
+
repository: BundleVerifyRepository,
|
|
87
|
+
header: BundleHeader,
|
|
88
|
+
options: VerifyBundleOptions = {},
|
|
89
|
+
): Promise<{ ok: boolean; stdout: string; stderr: string }> {
|
|
90
|
+
const objects = historyWithoutLazyFetch(repository.history);
|
|
91
|
+
let stderr = "";
|
|
92
|
+
let missing = 0;
|
|
93
|
+
for (const prerequisite of header.prerequisites) {
|
|
94
|
+
if (await objectExists(objects, prerequisite.id)) continue;
|
|
95
|
+
missing++;
|
|
96
|
+
if (options.quiet) continue;
|
|
97
|
+
if (missing === 1) stderr += "error: Repository lacks these prerequisite commits:\n";
|
|
98
|
+
stderr += `error: ${prerequisite.id} \n`;
|
|
99
|
+
}
|
|
100
|
+
if (missing > 0) return { ok: false, stdout: "", stderr };
|
|
101
|
+
let ok = true;
|
|
102
|
+
const tips = header.prerequisites.map((p) => p.id);
|
|
103
|
+
if (tips.length > 0) {
|
|
104
|
+
const facade = createRepositoryFacade({ history: objects });
|
|
105
|
+
const lines = await connectivityErrors(facade, tips, {
|
|
106
|
+
known: await repository.refValues(),
|
|
107
|
+
shallow: new Set(await repository.shallow()),
|
|
108
|
+
});
|
|
109
|
+
if (lines) {
|
|
110
|
+
ok = false;
|
|
111
|
+
stderr +=
|
|
112
|
+
"error: some prerequisite commits exist in the object store, " +
|
|
113
|
+
"but are not connected to the repository's history\n";
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
let stdout = "";
|
|
117
|
+
if (options.verbose) {
|
|
118
|
+
const refs = header.references;
|
|
119
|
+
stdout +=
|
|
120
|
+
refs.length === 1
|
|
121
|
+
? "The bundle contains this ref:\n"
|
|
122
|
+
: `The bundle contains these ${refs.length} refs:\n`;
|
|
123
|
+
stdout += listBundleRefs(refs);
|
|
124
|
+
const prereqs = header.prerequisites;
|
|
125
|
+
if (prereqs.length === 0) stdout += "The bundle records a complete history.\n";
|
|
126
|
+
else {
|
|
127
|
+
stdout +=
|
|
128
|
+
prereqs.length === 1
|
|
129
|
+
? "The bundle requires this ref:\n"
|
|
130
|
+
: `The bundle requires these ${prereqs.length} refs:\n`;
|
|
131
|
+
stdout += listBundleRefs(prereqs);
|
|
132
|
+
}
|
|
133
|
+
stdout += `The bundle uses this hash algorithm: ${header.objectFormat.name}\n`;
|
|
134
|
+
if (header.filter !== undefined) {
|
|
135
|
+
stdout += `The bundle uses this filter: ${header.filter}\n`;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return { ok, stdout, stderr };
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/** git's `parse_object` succeeds: the object is here, whatever its type. */
|
|
142
|
+
async function objectExists(
|
|
143
|
+
history: ReturnType<typeof historyWithoutLazyFetch>,
|
|
144
|
+
id: ObjectId,
|
|
145
|
+
): Promise<boolean> {
|
|
146
|
+
const objects = (history as { objects?: { has(id: ObjectId): Promise<boolean> } }).objects;
|
|
147
|
+
if (objects) return objects.has(id).catch(() => false);
|
|
148
|
+
for (const store of [history.commits, history.trees, history.blobs, history.tags]) {
|
|
149
|
+
if (await store.has(id).catch(() => false)) return true;
|
|
150
|
+
}
|
|
151
|
+
return false;
|
|
152
|
+
}
|
|
@@ -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
|
+
|
|
6
|
+
export * from "./bundle-create-command.js";
|
|
7
|
+
export * from "./bundle-format.js";
|
|
8
|
+
export * from "./bundle-list.js";
|
|
9
|
+
export * from "./bundle-read-commands.js";
|
|
10
|
+
export * from "./bundle-support.js";
|
|
11
|
+
export * from "./bundle-transport.js";
|
|
12
|
+
export * from "./bundle-uri.js";
|
|
13
|
+
export * from "./bundle-uri-host.js";
|
|
14
|
+
export * from "./bundle-verify.js";
|
|
@@ -0,0 +1,193 @@
|
|
|
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
|
+
|
|
7
|
+
import { PlumbingError } from "../plumbing-command.js";
|
|
8
|
+
|
|
9
|
+
/** What one object expands with. */
|
|
10
|
+
export interface BatchObjectData {
|
|
11
|
+
id: string;
|
|
12
|
+
type?: string;
|
|
13
|
+
size?: number;
|
|
14
|
+
/** The tree or index entry's mode (`<rev>:<path>`), undefined otherwise */
|
|
15
|
+
mode?: number;
|
|
16
|
+
/** `%(rest)`: the input line after the object name and its whitespace */
|
|
17
|
+
rest?: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
type Part =
|
|
21
|
+
| string
|
|
22
|
+
| {
|
|
23
|
+
atom:
|
|
24
|
+
| "objectname"
|
|
25
|
+
| "objecttype"
|
|
26
|
+
| "objectsize"
|
|
27
|
+
| "rest"
|
|
28
|
+
| "objectmode"
|
|
29
|
+
| "objectsize:disk"
|
|
30
|
+
| "deltabase";
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/** A parsed format and what it needs read. */
|
|
34
|
+
export interface BatchFormat {
|
|
35
|
+
parts: Part[];
|
|
36
|
+
/** `%(objecttype)` (or contents) needs the type */
|
|
37
|
+
needsType: boolean;
|
|
38
|
+
needsSize: boolean;
|
|
39
|
+
/** `%(rest)`: input lines are split at their first whitespace */
|
|
40
|
+
splitOnWhitespace: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* An atom the stores cannot answer (`objectsize:disk`, `deltabase`), kept by a parse with
|
|
43
|
+
* `deferUnsupported`: refused only when a local object needs it (`remote-object-info`
|
|
44
|
+
* expands it to nothing, as git)
|
|
45
|
+
*/
|
|
46
|
+
unsupported?: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** The default format, `%(objectname) %(objecttype) %(objectsize)`. */
|
|
50
|
+
export const DEFAULT_BATCH_FORMAT = "%(objectname) %(objecttype) %(objectsize)";
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Parses `format` as git's mark_query pass reads it: an atom git does not know dies there
|
|
54
|
+
* (2.43 `unknown format element: <atom>`, 2.5x `bad cat-file format: %(<atom>)`).
|
|
55
|
+
* `%(objectsize:disk)` and `%(deltabase)` are refused: the stores do not report on-disk sizes
|
|
56
|
+
* or delta bases, and printing a made-up value would lie.
|
|
57
|
+
*/
|
|
58
|
+
export function parseBatchFormat(
|
|
59
|
+
format: string,
|
|
60
|
+
compatibility: "2.43" | "2.56",
|
|
61
|
+
options: { deferUnsupported?: boolean } = {},
|
|
62
|
+
): BatchFormat {
|
|
63
|
+
const parts: Part[] = [];
|
|
64
|
+
const result: BatchFormat = {
|
|
65
|
+
parts,
|
|
66
|
+
needsType: false,
|
|
67
|
+
needsSize: false,
|
|
68
|
+
splitOnWhitespace: false,
|
|
69
|
+
};
|
|
70
|
+
let literal = "";
|
|
71
|
+
let at = 0;
|
|
72
|
+
for (;;) {
|
|
73
|
+
const percent = format.indexOf("%", at);
|
|
74
|
+
if (percent < 0) {
|
|
75
|
+
literal += format.slice(at);
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
literal += format.slice(at, percent);
|
|
79
|
+
at = percent + 1;
|
|
80
|
+
// strbuf_expand_step: "%%" is a percent; a "%" not before "(" is kept as is
|
|
81
|
+
if (format[at] === "%") {
|
|
82
|
+
literal += "%";
|
|
83
|
+
at++;
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
if (format[at] !== "(") {
|
|
87
|
+
literal += "%";
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
const end = format.indexOf(")", at + 1);
|
|
91
|
+
if (end < 0) {
|
|
92
|
+
const rest = format.slice(at);
|
|
93
|
+
throw new PlumbingError(
|
|
94
|
+
compatibility === "2.43"
|
|
95
|
+
? `fatal: format element '${rest}' does not end in ')'`
|
|
96
|
+
: `fatal: bad cat-file format: element '${rest}' does not end in ')'`,
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
const atom = format.slice(at + 1, end);
|
|
100
|
+
switch (atom) {
|
|
101
|
+
case "objectname":
|
|
102
|
+
break;
|
|
103
|
+
case "objecttype":
|
|
104
|
+
result.needsType = true;
|
|
105
|
+
break;
|
|
106
|
+
case "objectsize":
|
|
107
|
+
result.needsSize = true;
|
|
108
|
+
break;
|
|
109
|
+
case "rest":
|
|
110
|
+
result.splitOnWhitespace = true;
|
|
111
|
+
break;
|
|
112
|
+
case "objectmode":
|
|
113
|
+
if (compatibility === "2.43") throw unknownAtom(atom, compatibility);
|
|
114
|
+
break;
|
|
115
|
+
case "objectsize:disk":
|
|
116
|
+
case "deltabase":
|
|
117
|
+
if (!options.deferUnsupported) throw unsupportedAtom(atom);
|
|
118
|
+
result.unsupported ??= atom;
|
|
119
|
+
break;
|
|
120
|
+
default:
|
|
121
|
+
throw unknownAtom(atom, compatibility);
|
|
122
|
+
}
|
|
123
|
+
if (literal) parts.push(literal);
|
|
124
|
+
literal = "";
|
|
125
|
+
parts.push({ atom: atom as "objectname" });
|
|
126
|
+
at = end + 1;
|
|
127
|
+
}
|
|
128
|
+
if (literal) parts.push(literal);
|
|
129
|
+
return result;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/** The refusal of an atom the stores cannot answer (see {@link BatchFormat.unsupported}). */
|
|
133
|
+
export function unsupportedAtom(atom: string): PlumbingError {
|
|
134
|
+
return new PlumbingError(`fatal: cat-file: %(${atom}) is not supported`);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function unknownAtom(atom: string, compatibility: "2.43" | "2.56"): PlumbingError {
|
|
138
|
+
return new PlumbingError(
|
|
139
|
+
compatibility === "2.43"
|
|
140
|
+
? `fatal: unknown format element: ${atom}`
|
|
141
|
+
: `fatal: bad cat-file format: %(${atom})`,
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* The format expanded for one object. With `remote` (an object `remote-object-info` asked
|
|
147
|
+
* about), an atom the server did not answer expands to nothing, as git's `expand_atom` with
|
|
148
|
+
* `is_remote`: `%(objectname)` always, `%(objectsize)` and `%(objecttype)` when answered.
|
|
149
|
+
*/
|
|
150
|
+
export function expandBatchFormat(
|
|
151
|
+
format: BatchFormat,
|
|
152
|
+
data: BatchObjectData,
|
|
153
|
+
remote?: { size: boolean; type: boolean },
|
|
154
|
+
): string {
|
|
155
|
+
let out = "";
|
|
156
|
+
for (const part of format.parts) {
|
|
157
|
+
if (typeof part === "string") {
|
|
158
|
+
out += part;
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
161
|
+
if (
|
|
162
|
+
remote &&
|
|
163
|
+
!(
|
|
164
|
+
part.atom === "objectname" ||
|
|
165
|
+
(part.atom === "objectsize" && remote.size) ||
|
|
166
|
+
(part.atom === "objecttype" && remote.type)
|
|
167
|
+
)
|
|
168
|
+
) {
|
|
169
|
+
continue;
|
|
170
|
+
}
|
|
171
|
+
switch (part.atom) {
|
|
172
|
+
case "objectname":
|
|
173
|
+
out += data.id;
|
|
174
|
+
break;
|
|
175
|
+
case "objecttype":
|
|
176
|
+
out += data.type ?? "";
|
|
177
|
+
break;
|
|
178
|
+
case "objectsize":
|
|
179
|
+
out += String(data.size ?? 0);
|
|
180
|
+
break;
|
|
181
|
+
case "rest":
|
|
182
|
+
out += data.rest ?? "";
|
|
183
|
+
break;
|
|
184
|
+
case "objectmode":
|
|
185
|
+
if (data.mode !== undefined) out += data.mode.toString(8).padStart(6, "0");
|
|
186
|
+
break;
|
|
187
|
+
case "objectsize:disk":
|
|
188
|
+
case "deltabase":
|
|
189
|
+
throw unsupportedAtom(part.atom);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return out;
|
|
193
|
+
}
|