@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
|
@@ -1,18 +1,29 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
2
|
+
* git name-rev (builtin/name-rev.c): every commit named after the ref it is reached from,
|
|
3
|
+
* nearest first, as `<ref>~<n>` or `<ref>~<n>^<p>~<m>`, a tagged commit itself as
|
|
4
|
+
* `<tag>^0`. `git describe --contains` runs it as `name-rev --peel-tag --name-only
|
|
5
|
+
* --no-undefined --tags`.
|
|
6
6
|
*
|
|
7
7
|
* @example
|
|
8
8
|
* ```typescript
|
|
9
|
-
* const
|
|
9
|
+
* const run = await runNameRev(source, { tags: true, nameOnly: true }, { revs });
|
|
10
|
+
* run.stdout; // "v2.0~3\n"
|
|
10
11
|
* ```
|
|
11
12
|
*
|
|
12
13
|
* @module
|
|
13
14
|
*/
|
|
14
15
|
import type { ObjectId, PersonIdent } from "@statewalker/vcs-core";
|
|
15
|
-
/**
|
|
16
|
+
/** An object's type as git's `parse_object` finds it. */
|
|
17
|
+
export type NameRevObjectType = "commit" | "tree" | "blob" | "tag";
|
|
18
|
+
/** A commit as name-rev reads it (from the commit-graph where it has it). */
|
|
19
|
+
export interface NameRevCommit {
|
|
20
|
+
parents: ObjectId[];
|
|
21
|
+
/** Committer date */
|
|
22
|
+
date: number;
|
|
23
|
+
/** The commit-graph's generation; Infinity outside the graph */
|
|
24
|
+
generation: number;
|
|
25
|
+
}
|
|
26
|
+
/** What {@link runNameRev} reads. */
|
|
16
27
|
export interface NameRevSource {
|
|
17
28
|
refs: {
|
|
18
29
|
list(prefix?: string): AsyncIterable<{
|
|
@@ -24,25 +35,102 @@ export interface NameRevSource {
|
|
|
24
35
|
objectId?: ObjectId;
|
|
25
36
|
} | undefined>;
|
|
26
37
|
};
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
38
|
+
/** The type of an object, undefined when the repository lacks it */
|
|
39
|
+
objectType(id: ObjectId): Promise<NameRevObjectType | undefined>;
|
|
40
|
+
/** An annotated tag's target and tagger */
|
|
41
|
+
loadTag(id: ObjectId): Promise<{
|
|
42
|
+
object: ObjectId;
|
|
43
|
+
tagger?: PersonIdent;
|
|
44
|
+
} | undefined>;
|
|
45
|
+
/** A commit's parents, date and generation, undefined when it cannot be read */
|
|
46
|
+
loadCommit(id: ObjectId): Promise<NameRevCommit | undefined>;
|
|
47
|
+
/** Whether a full ref name (or `HEAD`) exists, for `refs_shorten_unambiguous_ref` */
|
|
48
|
+
refExists(name: string): Promise<boolean>;
|
|
49
|
+
/** `id` abbreviated as `find_unique_abbrev(oid, DEFAULT_ABBREV)` */
|
|
50
|
+
abbreviate(id: ObjectId): Promise<string>;
|
|
51
|
+
/** git's wildmatch without flags (default: a simple glob) */
|
|
52
|
+
wildmatch?: (pattern: string, text: string) => boolean;
|
|
53
|
+
}
|
|
54
|
+
/** name-rev's options. */
|
|
55
|
+
export interface NameRevOptions {
|
|
56
|
+
/** `--name-only`: no object names before the names */
|
|
57
|
+
nameOnly?: boolean;
|
|
58
|
+
/** `--tags`: only tags name commits */
|
|
59
|
+
tags?: boolean;
|
|
60
|
+
/** `--refs=<pattern>`: only refs matching one of these (or a subpath of them) */
|
|
61
|
+
refs?: readonly string[];
|
|
62
|
+
/** `--exclude=<pattern>`: no refs matching one of these */
|
|
63
|
+
exclude?: readonly string[];
|
|
64
|
+
/** `--no-undefined` (false): die instead of printing `undefined` (default true) */
|
|
65
|
+
allowUndefined?: boolean;
|
|
66
|
+
/** `--always`: the abbreviated id of an object no ref names */
|
|
67
|
+
always?: boolean;
|
|
68
|
+
/** `--peel-tag` (internal): a tag given is named by the commit it peels to */
|
|
69
|
+
peelTag?: boolean;
|
|
70
|
+
/** The length of the repository's hex ids `--annotate-stdin` looks for (default 40) */
|
|
71
|
+
hexLength?: number;
|
|
72
|
+
}
|
|
73
|
+
/** What name-rev names: revisions given, every commit (`--all`) or stdin's text. */
|
|
74
|
+
export type NameRevInput = {
|
|
75
|
+
/** The revisions as given and the object each names (undefined: none) */
|
|
76
|
+
revs: readonly {
|
|
77
|
+
name: string;
|
|
78
|
+
id: ObjectId | undefined;
|
|
79
|
+
}[];
|
|
80
|
+
} | {
|
|
81
|
+
all: true;
|
|
82
|
+
} | {
|
|
83
|
+
annotate: string;
|
|
84
|
+
};
|
|
85
|
+
/** name-rev's outcome: stdout, stderr lines and, where git dies, its message. */
|
|
86
|
+
export interface NameRevRun {
|
|
87
|
+
stdout: string;
|
|
88
|
+
stderr: string[];
|
|
89
|
+
/** The `fatal:` line git dies with (after printing {@link stdout}) */
|
|
90
|
+
fatal?: string;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* `git name-rev [<options>] (<rev>... | --all | --annotate-stdin)`: what git prints, and the
|
|
94
|
+
* line it dies with (`cannot describe '<id>'` under `--no-undefined`).
|
|
95
|
+
*/
|
|
96
|
+
export declare function runNameRev(source: NameRevSource, options: NameRevOptions, input: NameRevInput): Promise<NameRevRun>;
|
|
97
|
+
/** What {@link nameRevByTags} reads. */
|
|
98
|
+
export type DescribeContainsSource = NameRevSource;
|
|
99
|
+
/**
|
|
100
|
+
* `git describe --contains <id>` with default options (`name-rev --peel-tag --name-only
|
|
101
|
+
* --no-undefined --tags`): the name, undefined when no tag contains the commit.
|
|
102
|
+
*/
|
|
103
|
+
export declare function nameRevByTags(source: NameRevSource, id: ObjectId): Promise<string | undefined>;
|
|
104
|
+
/** The commit stores {@link commitLoaderOf} reads. */
|
|
105
|
+
export interface NameRevCommitStore {
|
|
106
|
+
load(id: ObjectId): Promise<{
|
|
107
|
+
parents: ObjectId[];
|
|
108
|
+
committer: PersonIdent;
|
|
109
|
+
} | undefined>;
|
|
110
|
+
headerReader?(): Promise<{
|
|
111
|
+
getHeader(id: ObjectId): Promise<{
|
|
36
112
|
parents: ObjectId[];
|
|
37
|
-
|
|
113
|
+
commitTime: number;
|
|
114
|
+
generation: number;
|
|
38
115
|
} | undefined>;
|
|
39
|
-
}
|
|
116
|
+
}>;
|
|
40
117
|
}
|
|
41
118
|
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
119
|
+
* `loadCommit` over a commit store: from the commit-graph loaded at the first read where it
|
|
120
|
+
* has the commit (its generation), else from the object (generation Infinity). In a shallow
|
|
121
|
+
* repository (`shallow`: its `.git/shallow` commits, given or read on first use) a shallow
|
|
122
|
+
* commit has no parents and no commit-graph is read (git's `commit_graph_compatible`).
|
|
46
123
|
*/
|
|
47
|
-
export declare function
|
|
124
|
+
export declare function commitLoaderOf(commits: NameRevCommitStore, shallow?: () => Promise<readonly ObjectId[] | undefined>): (id: ObjectId) => Promise<NameRevCommit | undefined>;
|
|
125
|
+
/**
|
|
126
|
+
* A commit store's `load` as a shallow repository's walks read it: the commits of
|
|
127
|
+
* `.git/shallow` without parents (git's shallow grafts), others as stored.
|
|
128
|
+
*/
|
|
129
|
+
export declare function withShallowParents<C extends {
|
|
130
|
+
parents: ObjectId[];
|
|
131
|
+
}>(commits: {
|
|
132
|
+
load(id: ObjectId): Promise<C | undefined>;
|
|
133
|
+
}, shallow: () => Promise<readonly ObjectId[] | undefined>): {
|
|
134
|
+
load(id: ObjectId): Promise<C | undefined>;
|
|
135
|
+
};
|
|
48
136
|
//# sourceMappingURL=name-rev.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"name-rev.d.ts","sourceRoot":"","sources":["../../src/commands/name-rev.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"name-rev.d.ts","sourceRoot":"","sources":["../../src/commands/name-rev.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEnE,yDAAyD;AACzD,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC;AAEnE,6EAA6E;AAC7E,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,QAAQ,EAAE,CAAC;IACpB,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,gEAAgE;IAChE,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,qCAAqC;AACrC,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE;QACJ,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,aAAa,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;YAAC,MAAM,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;QAC7F,O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ACJ;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,kBAAkB,EAC3B,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,SAAS,QAAQ,EAAE,GAAG,SAAS,CAAC,GACvD,CAAC,EAAE,EAAE,QAAQ,KAAK,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAkBtD;AA8BD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS;IAAE,OAAO,EAAE,QAAQ,EAAE,CAAA;CAAE,EAClE,OAAO,EAAE;IAAE,IAAI,CAAC,EAAE,EAAE,QAAQ,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,CAAA;CAAE,EACvD,OAAO,EAAE,MAAM,OAAO,CAAC,SAAS,QAAQ,EAAE,GAAG,SAAS,CAAC,GACtD;IAAE,IAAI,CAAC,EAAE,EAAE,QAAQ,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,CAAA;CAAE,CAWhD"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { PlumbingCommand } from "../plumbing-command.js";
|
|
2
|
+
/** What `git count-objects` counted. */
|
|
3
|
+
export interface CountObjectsResult {
|
|
4
|
+
/** Loose objects (`count`). */
|
|
5
|
+
count: number;
|
|
6
|
+
/** Bytes the loose objects take on disk (`st_blocks * 512` where the storage tells it). */
|
|
7
|
+
size: number;
|
|
8
|
+
/** Objects in the local packs (`in-pack`, only with `-v`). */
|
|
9
|
+
inPack: number;
|
|
10
|
+
/** Local packs (`packs`, only with `-v`). */
|
|
11
|
+
packs: number;
|
|
12
|
+
/** Bytes of the local packs and their indexes (`size-pack`, only with `-v`). */
|
|
13
|
+
sizePack: number;
|
|
14
|
+
/** Loose objects a pack holds too (`prune-packable`, only with `-v`). */
|
|
15
|
+
prunePackable: number;
|
|
16
|
+
/** Files that are no object, pack or pack index (`garbage`, only with `-v`). */
|
|
17
|
+
garbage: number;
|
|
18
|
+
/** Their bytes (`size-garbage`, only with `-v`). */
|
|
19
|
+
sizeGarbage: number;
|
|
20
|
+
/** The alternate object directories, as git names them (only with `-v`). */
|
|
21
|
+
alternates: string[];
|
|
22
|
+
}
|
|
23
|
+
/** A pack index as `load_idx` checks it: its version and object count, or git's error. */
|
|
24
|
+
export declare function checkPackIndex(bytes: Uint8Array, path: string, hashSize: number): {
|
|
25
|
+
version: 1 | 2;
|
|
26
|
+
count: number;
|
|
27
|
+
} | {
|
|
28
|
+
error: string;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* `git count-objects [-v] [-H]` (builtin/count-objects.c): the loose objects and their size
|
|
32
|
+
* on disk; with `-v` also the local packs (`in-pack`, `packs`, `size-pack`), the loose objects
|
|
33
|
+
* a pack holds too (`prune-packable`), the garbage in the object and pack directories (each
|
|
34
|
+
* reported as git's `warning:` on stderr) and the alternates. Sizes are KiB, or with `-H`
|
|
35
|
+
* humanised as git prints them.
|
|
36
|
+
*
|
|
37
|
+
* Sizes on disk come from `st_blocks` where the FilesApi reports it (`lstat().blocks`), else
|
|
38
|
+
* from the file sizes. Warnings within one directory come in name order (git's in readdir
|
|
39
|
+
* order).
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```typescript
|
|
43
|
+
* const { stdout } = await git.countObjects().setVerbose(true).callOutput();
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
export declare class CountObjectsCommand extends PlumbingCommand {
|
|
47
|
+
private verbose;
|
|
48
|
+
private humanReadable;
|
|
49
|
+
private counted?;
|
|
50
|
+
/** `-v`: every count, garbage warnings and alternates. */
|
|
51
|
+
setVerbose(verbose: boolean): this;
|
|
52
|
+
/** `-H` (`--human-readable`). */
|
|
53
|
+
setHumanReadable(humanReadable: boolean): this;
|
|
54
|
+
/** The counts of the last run. */
|
|
55
|
+
getCounts(): CountObjectsResult | undefined;
|
|
56
|
+
protected run(): Promise<number>;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=count-objects-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"count-objects-command.d.ts","sourceRoot":"","sources":["../../../src/commands/object-store/count-objects-command.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAiB,MAAM,wBAAwB,CAAC;AAIxE,wCAAwC;AACxC,MAAM,WAAW,kBAAkB;IACjC,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,2FAA2F;IAC3F,IAAI,EAAE,MAAM,CAAC;IACb,8DAA8D;IAC9D,MAAM,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,gFAAgF;IAChF,QAAQ,EAAE,MAAM,CAAC;IACjB,yEAAyE;IACzE,aAAa,EAAE,MAAM,CAAC;IACtB,gFAAgF;IAChF,OAAO,EAAE,MAAM,CAAC;IAChB,oDAAoD;IACpD,WAAW,EAAE,MAAM,CAAC;IACpB,4EAA4E;IAC5E,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AA+CD,0FAA0F;AAC1F,wBAAgB,cAAc,CAC5B,KAAK,EAAE,UAAU,EACjB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,GACf;IAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CA8BvD;AA6CD;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,mBAAoB,SAAQ,eAAe;IACtD,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,OAAO,CAAC,CAAqB;IAErC,0DAA0D;IAC1D,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAIjC;IAED,iCAAiC;IACjC,gBAAgB,CAAC,aAAa,EAAE,OAAO,GAAG,IAAI,CAI7C;IAED,kCAAkC;IAClC,SAAS,IAAI,kBAAkB,GAAG,SAAS,CAE1C;IAED,UAAgB,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,CA6MrC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/object-store/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { WorkingCopy } from "@statewalker/vcs-working-tree";
|
|
2
|
+
import type { HookSession } from "../git-hooks.js";
|
|
3
|
+
/** Whether the working copy is a linked worktree (its git directory `<common>/worktrees/<id>`). */
|
|
4
|
+
export declare function inLinkedWorktree(workingCopy: WorkingCopy): Promise<boolean>;
|
|
5
|
+
/**
|
|
6
|
+
* The object directory as git names it in messages (`repo_get_object_directory`): git runs
|
|
7
|
+
* from the worktree's top, so `.git/objects`; a bare repository found in the current
|
|
8
|
+
* directory is `.`, so `./objects`; a linked worktree reads the common directory through
|
|
9
|
+
* `commondir`, an absolute path.
|
|
10
|
+
*/
|
|
11
|
+
export declare function objectsDirectoryDisplay(hooks: HookSession, workingCopy: WorkingCopy): Promise<string>;
|
|
12
|
+
//# sourceMappingURL=objects-directory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"objects-directory.d.ts","sourceRoot":"","sources":["../../../src/commands/object-store/objects-directory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,mGAAmG;AACnG,wBAAsB,gBAAgB,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,CAGjF;AAED;;;;;GAKG;AACH,wBAAsB,uBAAuB,CAC3C,KAAK,EAAE,WAAW,EAClB,WAAW,EAAE,WAAW,GACvB,OAAO,CAAC,MAAM,CAAC,CAKjB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { PlumbingCommand } from "../plumbing-command.js";
|
|
2
|
+
/**
|
|
3
|
+
* `git prune [-n] [-v] [--expire <time>] [--] [<head>...]` (builtin/prune.c) over a files
|
|
4
|
+
* repository, without the rest of gc: the unreachable loose objects older than `--expire`
|
|
5
|
+
* (every one without it) go, except what a younger unreachable object reaches (gc's recent
|
|
6
|
+
* walk); then the loose objects a pack holds (`prune-packed`), stale `tmp_*` files and the
|
|
7
|
+
* shallow commits nothing reaches. `-n`/`-v` print `<id> <type>` per pruned object (and
|
|
8
|
+
* `-n` `rm -f <path>` per packed loose object, `Removing <id> from .git/shallow`).
|
|
9
|
+
*
|
|
10
|
+
* Lines within one fan-out directory come in name order (git's come in readdir order).
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* // git prune -n --expire=2.weeks.ago
|
|
15
|
+
* const { stdout } = await git.prune().setDryRun(true).setExpire("2.weeks.ago").callOutput();
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare class PruneCommand extends PlumbingCommand {
|
|
19
|
+
/** git's prune reads objects as stored (`disable_replace_refs`). */
|
|
20
|
+
protected readsReplacedObjects(): boolean;
|
|
21
|
+
private dryRun;
|
|
22
|
+
private verbose;
|
|
23
|
+
private expire?;
|
|
24
|
+
private readonly heads;
|
|
25
|
+
/** `-n` (`--dry-run`): print what would go, remove nothing. */
|
|
26
|
+
setDryRun(dryRun: boolean): this;
|
|
27
|
+
/** `-v`: print each object removed. */
|
|
28
|
+
setVerbose(verbose: boolean): this;
|
|
29
|
+
/**
|
|
30
|
+
* `--expire <time>`: only objects older than this go (`never` keeps them all, `now` none).
|
|
31
|
+
* `undefined` is `--no-expire` (as `never`).
|
|
32
|
+
*/
|
|
33
|
+
setExpire(expire: string | undefined): this;
|
|
34
|
+
/** `<head>`: a revision whose objects are kept as reachable. */
|
|
35
|
+
addHead(revision: string): this;
|
|
36
|
+
protected run(): Promise<number>;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=prune-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prune-command.d.ts","sourceRoot":"","sources":["../../../src/commands/object-store/prune-command.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,eAAe,EAAiB,MAAM,wBAAwB,CAAC;AAGxE;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,YAAa,SAAQ,eAAe;IAC/C,oEAAoE;IACpE,UAAmB,oBAAoB,IAAI,OAAO,CAEjD;IAED,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,MAAM,CAAC,CAAS;IACxB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IAEtC,+DAA+D;IAC/D,SAAS,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAI/B;IAED,uCAAuC;IACvC,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAIjC;IAED;;;OAGG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAI1C;IAED,gEAAgE;IAChE,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAI9B;IAED,UAAgB,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,CAyDrC;CACF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { PlumbingCommand } from "../plumbing-command.js";
|
|
2
|
+
/**
|
|
3
|
+
* `git show-index [--object-format=<hash>]` (builtin/show-index.c): reads a pack index (`.idx`
|
|
4
|
+
* version 1 or 2) and prints one line per object in index order: `<offset> <id>` for version 1,
|
|
5
|
+
* `<offset> <id> (<crc32>)` for version 2. Ids are as wide as the repository's object format,
|
|
6
|
+
* or the one `setObjectFormat` names. Dies with git's messages on a short or corrupt index.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* const { stdout } = await git.showIndex().setInput(idxBytes).callOutput();
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
export declare class ShowIndexCommand extends PlumbingCommand {
|
|
14
|
+
private input?;
|
|
15
|
+
private hashName?;
|
|
16
|
+
/** The index's bytes (git's stdin). */
|
|
17
|
+
setInput(input: Uint8Array | AsyncIterable<Uint8Array>): this;
|
|
18
|
+
/** `--object-format=<hash-algorithm>`: `sha1` or `sha256`. */
|
|
19
|
+
setObjectFormat(name: string): this;
|
|
20
|
+
protected run(): Promise<number>;
|
|
21
|
+
private readInput;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=show-index-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"show-index-command.d.ts","sourceRoot":"","sources":["../../../src/commands/object-store/show-index-command.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAiB,MAAM,wBAAwB,CAAC;AAQxE;;;;;;;;;;GAUG;AACH,qBAAa,gBAAiB,SAAQ,eAAe;IACnD,OAAO,CAAC,KAAK,CAAC,CAAyC;IACvD,OAAO,CAAC,QAAQ,CAAC,CAAS;IAE1B,uCAAuC;IACvC,QAAQ,CAAC,KAAK,EAAE,UAAU,GAAG,aAAa,CAAC,UAAU,CAAC,GAAG,IAAI,CAI5D;IAED,8DAA8D;IAC9D,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAIlC;IAED,UAAgB,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,CA4FrC;YAEa,SAAS;CAkBxB"}
|
|
@@ -51,9 +51,34 @@ export interface OctopusContext {
|
|
|
51
51
|
blobs: Blobs;
|
|
52
52
|
style?: ConflictStyle;
|
|
53
53
|
}
|
|
54
|
+
/** One path of `read-tree -m --aggressive`: merged, removed, or its stages (threeway_merge). */
|
|
55
|
+
type Threeway = {
|
|
56
|
+
kind: "merged";
|
|
57
|
+
entry: CheckedEntry;
|
|
58
|
+
} | {
|
|
59
|
+
kind: "removed";
|
|
60
|
+
} | {
|
|
61
|
+
kind: "stages";
|
|
62
|
+
base?: CheckedEntry;
|
|
63
|
+
ours?: CheckedEntry;
|
|
64
|
+
theirs?: CheckedEntry;
|
|
65
|
+
};
|
|
66
|
+
export declare function threeway(bases: (CheckedEntry | undefined)[], head: CheckedEntry | undefined, remote: CheckedEntry | undefined, aggressive?: boolean): Threeway | {
|
|
67
|
+
kind: "nontrivial";
|
|
68
|
+
};
|
|
54
69
|
/**
|
|
55
70
|
* Runs git-merge-octopus for `heads` on top of `headId` (the index matching HEAD's tree,
|
|
56
71
|
* `indexDiffers` listing the paths where it does not).
|
|
57
72
|
*/
|
|
58
|
-
export declare function octopusMerge(ctx: OctopusContext, headId: ObjectId, heads: OctopusHead[], indexDiffers: string[]
|
|
73
|
+
export declare function octopusMerge(ctx: OctopusContext, headId: ObjectId, heads: OctopusHead[], indexDiffers: string[],
|
|
74
|
+
/**
|
|
75
|
+
* git-merge-resolve instead (one head): its messages, no fast-forward, and a merge without
|
|
76
|
+
* a base given up
|
|
77
|
+
*/
|
|
78
|
+
options?: {
|
|
79
|
+
resolve?: boolean;
|
|
80
|
+
/** The merge bases of the (one) head, as given (a pick's parent) instead of computed */
|
|
81
|
+
bases?: ObjectId[];
|
|
82
|
+
}): Promise<OctopusOutcome>;
|
|
83
|
+
export {};
|
|
59
84
|
//# sourceMappingURL=octopus-merge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"octopus-merge.d.ts","sourceRoot":"","sources":["../../src/commands/octopus-merge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,KAAK,KAAK,EAAiB,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjF,OAAO,EAAE,KAAK,aAAa,EAAc,MAAM,wBAAwB,CAAC;AAExE,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,mBAAm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AM,CAAC,EAAE,YAAY,CAAA;CAAE,CAAC;AAExF,wBAAgB,QAAQ,CACtB,KAAK,EAAE,CAAC,YAAY,GAAG,SAAS,CAAC,EAAE,EACnC,IAAI,EAAE,YAAY,GAAG,SAAS,EAC9B,MAAM,EAAE,YAAY,GAAG,SAAS,EAChC,UAAU,UAAO,GAChB,QAAQ,GAAG;IAAE,IAAI,EAAE,YAAY,CAAA;CAAE,CA0BnC;AAED;;;GAGG;AACH,wBAAsB,YAAY,CAChC,GAAG,EAAE,cAAc,EACnB,MAAM,EAAE,QAAQ,EAChB,KAAK,EAAE,WAAW,EAAE,EACpB,YAAY,EAAE,MAAM,EAAE;AACtB;;;GAGG;AACH,OAAO,GAAE;IACP,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,wFAAwF;IACxF,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;CACf,GACL,OAAO,CAAC,cAAc,CAAC,CAmIzB"}
|
|
@@ -63,6 +63,17 @@ export interface OrtMergeOptions {
|
|
|
63
63
|
ignoreCase?: boolean;
|
|
64
64
|
/** Detect renames (default true) */
|
|
65
65
|
renames?: boolean;
|
|
66
|
+
/** The rename score (`-X find-renames=<n>`, 0..60000; default 50%) */
|
|
67
|
+
renameScore?: number;
|
|
68
|
+
/** The diff algorithm of content merges (`-X diff-algorithm=`; default histogram) */
|
|
69
|
+
algorithm?: "myers" | "minimal" | "patience" | "histogram";
|
|
70
|
+
/** xdiff's whitespace bits of content merges (`-X ignore-space-change`, ...) */
|
|
71
|
+
whitespace?: number;
|
|
72
|
+
/**
|
|
73
|
+
* `-s subtree` (`""`) / `-X subtree=<path>`: their tree and the base shifted to ours' shape
|
|
74
|
+
* before the merge (applied by `mergeStoredTrees`, merge_ort_nonrecursive_internal)
|
|
75
|
+
*/
|
|
76
|
+
subtreeShift?: string;
|
|
66
77
|
/** merge.directoryRenames (default `conflict`, as git) */
|
|
67
78
|
directoryRenames?: DirectoryRenames;
|
|
68
79
|
/** merge.renameLimit (default 7000, as merge-ort) */
|
|
@@ -83,6 +94,10 @@ export interface OrtMergeOptions {
|
|
|
83
94
|
defaultDriver?: string;
|
|
84
95
|
/** merge.<driver>.recursive: the driver used in merges of merge bases */
|
|
85
96
|
recursiveDriver?: (name: string) => string | undefined;
|
|
97
|
+
/** merge.<driver>.driver: the command a registered driver is given */
|
|
98
|
+
driverCommand?: (name: string) => string | undefined;
|
|
99
|
+
/** Whether the configuration names a driver (`merge.<name>.*`; git's user drivers) */
|
|
100
|
+
configuredDriver?: (name: string) => boolean;
|
|
86
101
|
/**
|
|
87
102
|
* The trees given as {@link prunedFlatTrees} reads them (directories all three hold alike
|
|
88
103
|
* stand as one TREE entry): per tree (base, ours, theirs), the id of each directory, so a
|
|
@@ -100,9 +115,34 @@ export interface OrtMergeResult {
|
|
|
100
115
|
clean: boolean;
|
|
101
116
|
/** merge-ort's messages (`Auto-merging x`, `CONFLICT (...)`), in git's order */
|
|
102
117
|
messages: string[];
|
|
118
|
+
/**
|
|
119
|
+
* The same messages with their type and the paths they involve, as
|
|
120
|
+
* `merge_display_update_messages` gives them under `merge-tree -z`
|
|
121
|
+
*/
|
|
122
|
+
details?: OrtMessage[];
|
|
123
|
+
/**
|
|
124
|
+
* The messages by the path they are about, without merge-ort's omittable hints
|
|
125
|
+
* (`Auto-merging`, `Path updated`, ...): `--remerge-diff`'s `remerge` headers
|
|
126
|
+
*/
|
|
127
|
+
pathMessages?: Map<string, string[]>;
|
|
103
128
|
/** Whether directory renames were found (paths may move into any directory) */
|
|
104
129
|
directoryRenames?: boolean;
|
|
105
130
|
}
|
|
131
|
+
/**
|
|
132
|
+
* merge-ort's type_short_descriptions: a message's type, "relied upon by external tools"
|
|
133
|
+
* (`merge-tree -z`).
|
|
134
|
+
*/
|
|
135
|
+
export type OrtMessageType = "Auto-merging" | "CONFLICT (contents)" | "CONFLICT (binary)" | "CONFLICT (file/directory)" | "CONFLICT (distinct modes)" | "CONFLICT (modify/delete)" | "CONFLICT (rename/rename)" | "CONFLICT (rename involved in collision)" | "CONFLICT (rename/delete)" | "CONFLICT (directory rename suggested)" | "Path updated due to directory rename" | "Directory rename skipped since directory was renamed on both sides" | "CONFLICT (file in way of directory rename)" | "CONFLICT(directory rename collision)" | "CONFLICT(directory rename unclear split)";
|
|
136
|
+
/** One of merge-ort's messages (a logical_conflict_info and its text). */
|
|
137
|
+
export interface OrtMessage {
|
|
138
|
+
/** The path it is listed under (the first of `paths`) */
|
|
139
|
+
path: string;
|
|
140
|
+
/** The paths it involves, the primary one first */
|
|
141
|
+
paths: string[];
|
|
142
|
+
type: OrtMessageType;
|
|
143
|
+
/** The message as printed (may hold newlines) */
|
|
144
|
+
text: string;
|
|
145
|
+
}
|
|
106
146
|
/** Reads a blob whole. */
|
|
107
147
|
export declare function readBlob(blobs: Blobs, id: ObjectId): Promise<Uint8Array>;
|
|
108
148
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ort-merge.d.ts","sourceRoot":"","sources":["../../src/commands/ort-merge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,KAAK,KAAK,EAAY,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAW5D,OAAO,EAEL,KAAK,mBAAmB,
|
|
1
|
+
{"version":3,"file":"ort-merge.d.ts","sourceRoot":"","sources":["../../src/commands/ort-merge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,KAAK,KAAK,EAAY,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAW5D,OAAO,EAEL,KAAK,mBAAmB,EAExB,KAAK,mBAAmB,EACzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,C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AAC,MAAM,EAAE,YAAY,CAAC,EACnC,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,cAAc,CAAC,CAEzB;AAs2CD;;;GAGG;AACH,wBAAsB,gBAAgB,CACpC,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,cAAc,GACpB,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAapC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ort-recursive.d.ts","sourceRoot":"","sources":["../../src/commands/ort-recursive.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGtE,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,cAAc,EAGpB,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"ort-recursive.d.ts","sourceRoot":"","sources":["../../src/commands/ort-recursive.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGtE,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,cAAc,EAGpB,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAEnE,mEAAmE;AACnE,MAAM,WAAW,aAAa;IAC5B,gEAAgE;IAChE,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC;IAC3C;;;OAGG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,QAAQ,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,gDAAgD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3
|
+
* `git log -p` and `git format-patch` write them, one `<patch-id> <commit>` line each.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```typescript
|
|
7
|
+
* // git log -p -1 | git patch-id --stable
|
|
8
|
+
* await git.patchId().setInput(logText).setMode("stable").call();
|
|
9
|
+
* // { exitCode: 0, stdout: "<patch-id> <commit>\n", stderr: "" }
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
import { GitCommand } from "../git-command.js";
|
|
13
|
+
import type { PlumbingTextOutput } from "./check-ref-format-command.js";
|
|
14
|
+
/** `--unstable`, `--stable`, `--verbatim`. */
|
|
15
|
+
export type PatchIdMode = "unstable" | "stable" | "verbatim";
|
|
16
|
+
/**
|
|
17
|
+
* `git patch-id [--stable | --unstable | --verbatim]` over {@link setInput} (git's stdin).
|
|
18
|
+
* Without a mode, `patchid.stable` and `patchid.verbatim` decide (verbatim implies stable),
|
|
19
|
+
* unstable when neither is set. Ids are of the repository's hash, as git's `the_hash_algo`.
|
|
20
|
+
*/
|
|
21
|
+
export declare class PatchIdCommand extends GitCommand<PlumbingTextOutput> {
|
|
22
|
+
private input;
|
|
23
|
+
private mode?;
|
|
24
|
+
/** The patches (git's stdin). */
|
|
25
|
+
setInput(input: string | Uint8Array): this;
|
|
26
|
+
/** `--unstable`, `--stable` or `--verbatim`; undefined lets the configuration decide. */
|
|
27
|
+
setMode(mode: PatchIdMode | undefined): this;
|
|
28
|
+
call(): Promise<PlumbingTextOutput>;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=patch-id-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"patch-id-command.d.ts","sourceRoot":"","sources":["../../src/commands/patch-id-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAIxE,8CAA8C;AAC9C,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,QAAQ,GAAG,UAAU,CAAC;AAI7D;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,UAAU,CAAC,kBAAkB,CAAC;IAChE,OAAO,CAAC,KAAK,CAAiC;IAC9C,OAAO,CAAC,IAAI,CAAC,CAAc;IAE3B,iCAAiC;IACjC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAIzC;IAED,yFAAyF;IACzF,OAAO,CAAC,IAAI,EAAE,WAAW,GAAG,SAAS,GAAG,IAAI,CAI3C;IAEK,IAAI,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAkBxC;CACF"}
|
|
@@ -41,4 +41,86 @@ export declare function patchIdOfChanges(blobs: Blobs, changes: PatchIdChange[],
|
|
|
41
41
|
headerOnly?: boolean;
|
|
42
42
|
objectFormat?: ObjectFormat;
|
|
43
43
|
}): Promise<string>;
|
|
44
|
+
/** The change a commit makes, as {@link PatchIds} asks for it. */
|
|
45
|
+
export interface PatchIdCommit {
|
|
46
|
+
/** Its first parent's tree; undefined for a root commit (diffed against the empty tree) */
|
|
47
|
+
parentTree?: ObjectId;
|
|
48
|
+
tree: ObjectId;
|
|
49
|
+
}
|
|
50
|
+
/** What {@link PatchIds} reads. */
|
|
51
|
+
export interface PatchIdsHost<K> {
|
|
52
|
+
trees: PatchIdTrees;
|
|
53
|
+
blobs: Blobs;
|
|
54
|
+
objectFormat?: ObjectFormat;
|
|
55
|
+
/**
|
|
56
|
+
* The change of a commit, or undefined where git's patch_id_defined says no (a merge: more
|
|
57
|
+
* than one parent, as the walk has them)
|
|
58
|
+
*/
|
|
59
|
+
change(key: K): Promise<PatchIdCommit | undefined>;
|
|
60
|
+
/** The paths the diffs are limited to (the walk's pathspec); every path without */
|
|
61
|
+
paths?: (path: string) => boolean;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* patch-ids.c: a table of commits by patch-id. Each commit added gets only the cheap id of
|
|
65
|
+
* its diff's headers (names and modes, no content read); a lookup computes the same cheap
|
|
66
|
+
* id, and the full patch-ids of both sides only where those collide (patch_id_neq), each at
|
|
67
|
+
* most once. A commit whose diff is empty has the null id, as git's, so empty commits match
|
|
68
|
+
* one another.
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```typescript
|
|
72
|
+
* const ids = new PatchIds({ trees, blobs, change: async (id) => ({ parentTree, tree }) });
|
|
73
|
+
* for (const id of upstream) await ids.add(id);
|
|
74
|
+
* const same = await ids.matches(mine); // the upstream commits making mine's change
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
export declare class PatchIds<K> {
|
|
78
|
+
private readonly host;
|
|
79
|
+
private readonly byHeader;
|
|
80
|
+
private readonly full;
|
|
81
|
+
private readonly nullId;
|
|
82
|
+
constructor(host: PatchIdsHost<K>);
|
|
83
|
+
/** add_commit_patch_id: false for a commit without a patch-id (a merge). */
|
|
84
|
+
add(key: K): Promise<boolean>;
|
|
85
|
+
/**
|
|
86
|
+
* patch_id_iter_first/next: the commits added whose patch-id is `key`'s, in the order
|
|
87
|
+
* added (none for a merge).
|
|
88
|
+
*/
|
|
89
|
+
matches(key: K): Promise<K[]>;
|
|
90
|
+
/** has_commit_patch_id */
|
|
91
|
+
has(key: K): Promise<boolean>;
|
|
92
|
+
/**
|
|
93
|
+
* The full patch-id of a commit (hex; the null id for an empty diff), null when it has
|
|
94
|
+
* none (a merge, or a commit that could not be read: never equal to another, as git errs on
|
|
95
|
+
* the side of keeping both).
|
|
96
|
+
*/
|
|
97
|
+
fullId(key: K): Promise<string | null>;
|
|
98
|
+
private headerId;
|
|
99
|
+
/** commit_patch_id */
|
|
100
|
+
private compute;
|
|
101
|
+
}
|
|
102
|
+
/** How `git patch-id` hashes a patch: `--unstable`, `--stable`, `--verbatim`. */
|
|
103
|
+
export interface PatchIdTextOptions {
|
|
104
|
+
/** Each file's hash summed apart, so the files' order does not matter (`--stable`) */
|
|
105
|
+
stable?: boolean;
|
|
106
|
+
/** Whitespace kept (`--verbatim`, which git makes stable too) */
|
|
107
|
+
verbatim?: boolean;
|
|
108
|
+
/** The hash (git's `the_hash_algo`: the repository's, SHA-1 outside one) */
|
|
109
|
+
objectFormat?: ObjectFormat;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* `git patch-id`'s output for a patch (or several, as `git log -p` and `git format-patch`
|
|
113
|
+
* write them): a `<patch-id> <commit>` line for each commit whose diff is not empty, the
|
|
114
|
+
* commit read from its `commit <id>` or `From <id>` line (the null id before the first). The
|
|
115
|
+
* diff text is hashed as builtin/patch-id.c reads it: the commit message and hunk headers
|
|
116
|
+
* skipped, whitespace dropped unless `verbatim`, the `index` line's ids standing for a
|
|
117
|
+
* binary diff, each file's hash summed apart when `stable`.
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
* ```typescript
|
|
121
|
+
* patchIdsOfPatchText(new TextEncoder().encode(logOutput), { stable: true });
|
|
122
|
+
* // "f0b2a1... 3d4e5f...\n"
|
|
123
|
+
* ```
|
|
124
|
+
*/
|
|
125
|
+
export declare function patchIdsOfPatchText(input: Uint8Array, options?: PatchIdTextOptions): string;
|
|
44
126
|
//# sourceMappingURL=patch-id.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patch-id.d.ts","sourceRoot":"","sources":["../../src/commands/patch-id.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,KAAK,KAAK,EAAgC,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAChG,OAAO,EAGL,KAAK,YAAY,EAGlB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAMtD,mEAAmE;AACnE,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;AA0E1D;;;;;GAKG;AACH,wBAAsB,OAAO,CAC3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