@statewalker/vcs-commands 0.8.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/commands/add-command.d.ts +32 -0
- package/dist/commands/add-command.d.ts.map +1 -1
- package/dist/commands/add-patch/add-patch.d.ts +7 -0
- package/dist/commands/add-patch/add-patch.d.ts.map +1 -1
- package/dist/commands/add-patch/patch-backend.d.ts +2 -0
- package/dist/commands/add-patch/patch-backend.d.ts.map +1 -1
- package/dist/commands/add-patch/patch-modes.d.ts +6 -2
- package/dist/commands/add-patch/patch-modes.d.ts.map +1 -1
- package/dist/commands/add-patch/patch-session.d.ts +4 -0
- package/dist/commands/add-patch/patch-session.d.ts.map +1 -1
- package/dist/commands/am/am-command.d.ts +88 -2
- package/dist/commands/am/am-command.d.ts.map +1 -1
- package/dist/commands/apply/apply-command.d.ts +2 -0
- package/dist/commands/apply/apply-command.d.ts.map +1 -1
- package/dist/commands/apply/apply-parse.d.ts +7 -0
- package/dist/commands/apply/apply-parse.d.ts.map +1 -1
- package/dist/commands/apply/index.d.ts +1 -1
- package/dist/commands/apply/index.d.ts.map +1 -1
- package/dist/commands/archive/archive-command.d.ts +169 -0
- package/dist/commands/archive/archive-command.d.ts.map +1 -0
- package/dist/commands/archive/archive-entry.d.ts +60 -0
- package/dist/commands/archive/archive-entry.d.ts.map +1 -0
- package/dist/commands/archive/index.d.ts +8 -0
- package/dist/commands/archive/index.d.ts.map +1 -0
- package/dist/commands/archive/remote-archive-command.d.ts +56 -0
- package/dist/commands/archive/remote-archive-command.d.ts.map +1 -0
- package/dist/commands/archive/tar-archive.d.ts +31 -0
- package/dist/commands/archive/tar-archive.d.ts.map +1 -0
- package/dist/commands/archive/tar-commit-id.d.ts +13 -0
- package/dist/commands/archive/tar-commit-id.d.ts.map +1 -0
- package/dist/commands/archive/upload-archive-writer.d.ts +48 -0
- package/dist/commands/archive/upload-archive-writer.d.ts.map +1 -0
- package/dist/commands/archive/zip-archive.d.ts +42 -0
- package/dist/commands/archive/zip-archive.d.ts.map +1 -0
- package/dist/commands/attributes-source.d.ts +10 -0
- package/dist/commands/attributes-source.d.ts.map +1 -1
- package/dist/commands/blame-command.d.ts +345 -8
- package/dist/commands/blame-command.d.ts.map +1 -1
- package/dist/commands/blame-ignore.d.ts +48 -0
- package/dist/commands/blame-ignore.d.ts.map +1 -0
- package/dist/commands/bundle/bundle-create-command.d.ts +67 -0
- package/dist/commands/bundle/bundle-create-command.d.ts.map +1 -0
- package/dist/commands/bundle/bundle-format.d.ts +89 -0
- package/dist/commands/bundle/bundle-format.d.ts.map +1 -0
- package/dist/commands/bundle/bundle-list.d.ts +92 -0
- package/dist/commands/bundle/bundle-list.d.ts.map +1 -0
- package/dist/commands/bundle/bundle-read-commands.d.ts +81 -0
- package/dist/commands/bundle/bundle-read-commands.d.ts.map +1 -0
- package/dist/commands/bundle/bundle-support.d.ts +32 -0
- package/dist/commands/bundle/bundle-support.d.ts.map +1 -0
- package/dist/commands/bundle/bundle-transport.d.ts +38 -0
- package/dist/commands/bundle/bundle-transport.d.ts.map +1 -0
- package/dist/commands/bundle/bundle-uri-host.d.ts +43 -0
- package/dist/commands/bundle/bundle-uri-host.d.ts.map +1 -0
- package/dist/commands/bundle/bundle-uri.d.ts +55 -0
- package/dist/commands/bundle/bundle-uri.d.ts.map +1 -0
- package/dist/commands/bundle/bundle-verify.d.ts +63 -0
- package/dist/commands/bundle/bundle-verify.d.ts.map +1 -0
- package/dist/commands/bundle/index.d.ts +14 -0
- package/dist/commands/bundle/index.d.ts.map +1 -0
- package/dist/commands/cat-file/batch-format.d.ts +58 -0
- package/dist/commands/cat-file/batch-format.d.ts.map +1 -0
- package/dist/commands/cat-file/cat-file-command.d.ts +135 -0
- package/dist/commands/cat-file/cat-file-command.d.ts.map +1 -0
- package/dist/commands/cat-file/index.d.ts +3 -0
- package/dist/commands/cat-file/index.d.ts.map +1 -0
- package/dist/commands/check-attr-command.d.ts +66 -0
- package/dist/commands/check-attr-command.d.ts.map +1 -0
- package/dist/commands/check-ignore-command.d.ts +58 -0
- package/dist/commands/check-ignore-command.d.ts.map +1 -0
- package/dist/commands/check-mailmap-command.d.ts +49 -0
- package/dist/commands/check-mailmap-command.d.ts.map +1 -0
- package/dist/commands/check-ref-format-command.d.ts +60 -0
- package/dist/commands/check-ref-format-command.d.ts.map +1 -0
- package/dist/commands/checkout-command.d.ts +7 -0
- package/dist/commands/checkout-command.d.ts.map +1 -1
- package/dist/commands/checkout-index-command.d.ts +96 -0
- package/dist/commands/checkout-index-command.d.ts.map +1 -0
- package/dist/commands/checkout-paths.d.ts +4 -0
- package/dist/commands/checkout-paths.d.ts.map +1 -1
- package/dist/commands/cherry-command.d.ts +61 -0
- package/dist/commands/cherry-command.d.ts.map +1 -0
- package/dist/commands/cherry-pick-command.d.ts +33 -1
- package/dist/commands/cherry-pick-command.d.ts.map +1 -1
- package/dist/commands/clean-command.d.ts +32 -0
- package/dist/commands/clean-command.d.ts.map +1 -1
- package/dist/commands/clean-interactive.d.ts +56 -0
- package/dist/commands/clean-interactive.d.ts.map +1 -0
- package/dist/commands/clone-command.d.ts +135 -2
- package/dist/commands/clone-command.d.ts.map +1 -1
- package/dist/commands/commit-command.d.ts +59 -3
- package/dist/commands/commit-command.d.ts.map +1 -1
- package/dist/commands/config-command.d.ts +2 -0
- package/dist/commands/config-command.d.ts.map +1 -1
- package/dist/commands/daemon-access-hook.d.ts +36 -0
- package/dist/commands/daemon-access-hook.d.ts.map +1 -0
- package/dist/commands/default-branch.d.ts +42 -0
- package/dist/commands/default-branch.d.ts.map +1 -1
- package/dist/commands/describe-command.d.ts +71 -64
- package/dist/commands/describe-command.d.ts.map +1 -1
- package/dist/commands/diff-command.d.ts +249 -10
- package/dist/commands/diff-command.d.ts.map +1 -1
- package/dist/commands/diff-external.d.ts +43 -0
- package/dist/commands/diff-external.d.ts.map +1 -0
- package/dist/commands/diff-plumbing/diff-pairs-command.d.ts +27 -0
- package/dist/commands/diff-plumbing/diff-pairs-command.d.ts.map +1 -0
- package/dist/commands/diff-plumbing/diff-plumbing-command.d.ts +129 -0
- package/dist/commands/diff-plumbing/diff-plumbing-command.d.ts.map +1 -0
- package/dist/commands/diff-plumbing/index.d.ts +3 -0
- package/dist/commands/diff-plumbing/index.d.ts.map +1 -0
- package/dist/commands/diff-textconv.d.ts +5 -1
- package/dist/commands/diff-textconv.d.ts.map +1 -1
- package/dist/commands/fast-export/fast-export-command.d.ts +135 -0
- package/dist/commands/fast-export/fast-export-command.d.ts.map +1 -0
- package/dist/commands/fast-export/fast-import-command.d.ts +182 -0
- package/dist/commands/fast-export/fast-import-command.d.ts.map +1 -0
- package/dist/commands/fast-export/fast-stream-support.d.ts +64 -0
- package/dist/commands/fast-export/fast-stream-support.d.ts.map +1 -0
- package/dist/commands/fast-export/index.d.ts +4 -0
- package/dist/commands/fast-export/index.d.ts.map +1 -0
- package/dist/commands/fetch-command.d.ts +125 -0
- package/dist/commands/fetch-command.d.ts.map +1 -1
- package/dist/commands/fetch-multiple-command.d.ts +193 -0
- package/dist/commands/fetch-multiple-command.d.ts.map +1 -0
- package/dist/commands/format-patch-command.d.ts +28 -2
- package/dist/commands/format-patch-command.d.ts.map +1 -1
- package/dist/commands/format-rev-command.d.ts +58 -0
- package/dist/commands/format-rev-command.d.ts.map +1 -0
- package/dist/commands/fsck/fsck-command.d.ts.map +1 -1
- package/dist/commands/fsck/fsck-msg-ids.d.ts +18 -3
- package/dist/commands/fsck/fsck-msg-ids.d.ts.map +1 -1
- package/dist/commands/fsmonitor-refresh.d.ts +69 -0
- package/dist/commands/fsmonitor-refresh.d.ts.map +1 -0
- package/dist/commands/gc-command.d.ts +5 -0
- package/dist/commands/gc-command.d.ts.map +1 -1
- package/dist/commands/git-describe.d.ts +77 -4
- package/dist/commands/git-describe.d.ts.map +1 -1
- package/dist/commands/git-hooks.d.ts +47 -1
- package/dist/commands/git-hooks.d.ts.map +1 -1
- package/dist/commands/git-paths.d.ts +26 -0
- package/dist/commands/git-paths.d.ts.map +1 -0
- package/dist/commands/grep/grep-command.d.ts +2 -1
- package/dist/commands/grep/grep-command.d.ts.map +1 -1
- package/dist/commands/history-command.d.ts +156 -0
- package/dist/commands/history-command.d.ts.map +1 -0
- package/dist/commands/http-config.d.ts +38 -0
- package/dist/commands/http-config.d.ts.map +1 -0
- package/dist/commands/index-adder.d.ts +12 -1
- package/dist/commands/index-adder.d.ts.map +1 -1
- package/dist/commands/index-host.d.ts.map +1 -1
- package/dist/commands/index.d.ts +56 -1
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +6 -3
- package/dist/commands/init-command.d.ts +89 -0
- package/dist/commands/init-command.d.ts.map +1 -1
- package/dist/commands/last-modified-command.d.ts +102 -0
- package/dist/commands/last-modified-command.d.ts.map +1 -0
- package/dist/commands/lfs/go-url.d.ts +43 -0
- package/dist/commands/lfs/go-url.d.ts.map +1 -0
- package/dist/commands/lfs/index.d.ts +3 -0
- package/dist/commands/lfs/index.d.ts.map +1 -0
- package/dist/commands/lfs/lfs-config.d.ts +174 -0
- package/dist/commands/lfs/lfs-config.d.ts.map +1 -0
- package/dist/commands/lfs/lfs-endpoint-command.d.ts +83 -0
- package/dist/commands/lfs/lfs-endpoint-command.d.ts.map +1 -0
- package/dist/commands/line-log.d.ts +161 -0
- package/dist/commands/line-log.d.ts.map +1 -0
- package/dist/commands/local-transport.d.ts.map +1 -1
- package/dist/commands/log-command.d.ts +261 -6
- package/dist/commands/log-command.d.ts.map +1 -1
- package/dist/commands/log-graph.d.ts +4 -2
- package/dist/commands/log-graph.d.ts.map +1 -1
- package/dist/commands/log-output.d.ts +88 -2
- package/dist/commands/log-output.d.ts.map +1 -1
- package/dist/commands/ls-files-command.d.ts +153 -0
- package/dist/commands/ls-files-command.d.ts.map +1 -0
- package/dist/commands/ls-remote-command.d.ts +5 -0
- package/dist/commands/ls-remote-command.d.ts.map +1 -1
- package/dist/commands/ls-tree-command.d.ts +105 -0
- package/dist/commands/ls-tree-command.d.ts.map +1 -0
- package/dist/commands/mailmap.d.ts +24 -1
- package/dist/commands/mailmap.d.ts.map +1 -1
- package/dist/commands/maintenance-run-command.d.ts +122 -0
- package/dist/commands/maintenance-run-command.d.ts.map +1 -0
- package/dist/commands/merge-command.d.ts +58 -1
- package/dist/commands/merge-command.d.ts.map +1 -1
- package/dist/commands/merge-config.d.ts +7 -0
- package/dist/commands/merge-config.d.ts.map +1 -1
- package/dist/commands/merge-drivers.d.ts +69 -5
- package/dist/commands/merge-drivers.d.ts.map +1 -1
- package/dist/commands/merge-strategy-options.d.ts +69 -0
- package/dist/commands/merge-strategy-options.d.ts.map +1 -0
- package/dist/commands/merge-support.d.ts +16 -0
- package/dist/commands/merge-support.d.ts.map +1 -1
- package/dist/commands/merge-tree-command.d.ts +122 -0
- package/dist/commands/merge-tree-command.d.ts.map +1 -0
- package/dist/commands/message-cleanup.d.ts +2 -0
- package/dist/commands/message-cleanup.d.ts.map +1 -1
- package/dist/commands/mktag-command.d.ts +51 -0
- package/dist/commands/mktag-command.d.ts.map +1 -0
- package/dist/commands/name-rev-command.d.ts +65 -0
- package/dist/commands/name-rev-command.d.ts.map +1 -0
- package/dist/commands/name-rev.d.ts +110 -22
- package/dist/commands/name-rev.d.ts.map +1 -1
- package/dist/commands/object-store/count-objects-command.d.ts +58 -0
- package/dist/commands/object-store/count-objects-command.d.ts.map +1 -0
- package/dist/commands/object-store/index.d.ts +5 -0
- package/dist/commands/object-store/index.d.ts.map +1 -0
- package/dist/commands/object-store/objects-directory.d.ts +12 -0
- package/dist/commands/object-store/objects-directory.d.ts.map +1 -0
- package/dist/commands/object-store/prune-command.d.ts +38 -0
- package/dist/commands/object-store/prune-command.d.ts.map +1 -0
- package/dist/commands/object-store/show-index-command.d.ts +23 -0
- package/dist/commands/object-store/show-index-command.d.ts.map +1 -0
- package/dist/commands/octopus-merge.d.ts +26 -1
- package/dist/commands/octopus-merge.d.ts.map +1 -1
- package/dist/commands/ort-merge.d.ts +40 -0
- package/dist/commands/ort-merge.d.ts.map +1 -1
- package/dist/commands/ort-recursive.d.ts.map +1 -1
- package/dist/commands/patch-id-command.d.ts +30 -0
- package/dist/commands/patch-id-command.d.ts.map +1 -0
- package/dist/commands/patch-id.d.ts +82 -0
- package/dist/commands/patch-id.d.ts.map +1 -1
- package/dist/commands/plumbing-command.d.ts +66 -0
- package/dist/commands/plumbing-command.d.ts.map +1 -0
- package/dist/commands/plumbing-input.d.ts +38 -0
- package/dist/commands/plumbing-input.d.ts.map +1 -0
- package/dist/commands/promisor-remote-reply.d.ts +35 -0
- package/dist/commands/promisor-remote-reply.d.ts.map +1 -0
- package/dist/commands/promisor-remote.d.ts.map +1 -1
- package/dist/commands/pull-command.d.ts +182 -38
- package/dist/commands/pull-command.d.ts.map +1 -1
- package/dist/commands/push-command.d.ts +82 -2
- package/dist/commands/push-command.d.ts.map +1 -1
- package/dist/commands/range-diff/index.d.ts +4 -0
- package/dist/commands/range-diff/index.d.ts.map +1 -0
- package/dist/commands/range-diff/linear-assignment.d.ts +27 -0
- package/dist/commands/range-diff/linear-assignment.d.ts.map +1 -0
- package/dist/commands/range-diff/range-diff-command.d.ts +121 -0
- package/dist/commands/range-diff/range-diff-command.d.ts.map +1 -0
- package/dist/commands/range-diff/range-diff.d.ts +106 -0
- package/dist/commands/range-diff/range-diff.d.ts.map +1 -0
- package/dist/commands/read-tree-command.d.ts +14 -0
- package/dist/commands/read-tree-command.d.ts.map +1 -1
- package/dist/commands/rebase-command.d.ts +129 -4
- package/dist/commands/rebase-command.d.ts.map +1 -1
- package/dist/commands/refs-command.d.ts +81 -0
- package/dist/commands/refs-command.d.ts.map +1 -0
- package/dist/commands/remerge-diff.d.ts +59 -0
- package/dist/commands/remerge-diff.d.ts.map +1 -0
- package/dist/commands/remote-command.d.ts +41 -0
- package/dist/commands/remote-command.d.ts.map +1 -1
- package/dist/commands/remote-object-info-command.d.ts +55 -0
- package/dist/commands/remote-object-info-command.d.ts.map +1 -0
- package/dist/commands/remote-show-command.d.ts +204 -0
- package/dist/commands/remote-show-command.d.ts.map +1 -0
- package/dist/commands/remote-transport.d.ts +40 -3
- package/dist/commands/remote-transport.d.ts.map +1 -1
- package/dist/commands/repack-command.d.ts +115 -0
- package/dist/commands/repack-command.d.ts.map +1 -0
- package/dist/commands/replace-command.d.ts +143 -0
- package/dist/commands/replace-command.d.ts.map +1 -0
- package/dist/commands/replay-command.d.ts +117 -0
- package/dist/commands/replay-command.d.ts.map +1 -0
- package/dist/commands/repo-command.d.ts +136 -0
- package/dist/commands/repo-command.d.ts.map +1 -0
- package/dist/commands/request-pull-command.d.ts +82 -0
- package/dist/commands/request-pull-command.d.ts.map +1 -0
- package/dist/commands/rerere-command.d.ts +36 -0
- package/dist/commands/rerere-command.d.ts.map +1 -0
- package/dist/commands/rerere.d.ts +102 -0
- package/dist/commands/rerere.d.ts.map +1 -0
- package/dist/commands/reset-command.d.ts +19 -1
- package/dist/commands/reset-command.d.ts.map +1 -1
- package/dist/commands/restore-command.d.ts +7 -0
- package/dist/commands/restore-command.d.ts.map +1 -1
- package/dist/commands/rev-filter/commit-grep.d.ts +3 -1
- package/dist/commands/rev-filter/commit-grep.d.ts.map +1 -1
- package/dist/commands/rev-list-command.d.ts +78 -3
- package/dist/commands/rev-list-command.d.ts.map +1 -1
- package/dist/commands/rev-parse-command.d.ts +9 -0
- package/dist/commands/rev-parse-command.d.ts.map +1 -1
- package/dist/commands/revert-command.d.ts +32 -1
- package/dist/commands/revert-command.d.ts.map +1 -1
- package/dist/commands/revision-range.d.ts +7 -0
- package/dist/commands/revision-range.d.ts.map +1 -1
- package/dist/commands/revision-resolver.d.ts +12 -0
- package/dist/commands/revision-resolver.d.ts.map +1 -1
- package/dist/commands/sequencer-pick.d.ts +120 -1
- package/dist/commands/sequencer-pick.d.ts.map +1 -1
- package/dist/commands/sequencer-support.d.ts +10 -1
- package/dist/commands/sequencer-support.d.ts.map +1 -1
- package/dist/commands/serve-repository.d.ts +23 -1
- package/dist/commands/serve-repository.d.ts.map +1 -1
- package/dist/commands/session-id.d.ts +18 -0
- package/dist/commands/session-id.d.ts.map +1 -0
- package/dist/commands/shortlog-command.d.ts +109 -0
- package/dist/commands/shortlog-command.d.ts.map +1 -0
- package/dist/commands/shortlog.d.ts +151 -0
- package/dist/commands/shortlog.d.ts.map +1 -0
- package/dist/commands/show-branch-command.d.ts +59 -0
- package/dist/commands/show-branch-command.d.ts.map +1 -0
- package/dist/commands/show-ref-command.d.ts +112 -0
- package/dist/commands/show-ref-command.d.ts.map +1 -0
- package/dist/commands/signature-check.d.ts +9 -2
- package/dist/commands/signature-check.d.ts.map +1 -1
- package/dist/commands/signing.d.ts +22 -1
- package/dist/commands/signing.d.ts.map +1 -1
- package/dist/commands/stash-apply-command.d.ts.map +1 -1
- package/dist/commands/stash-export-command.d.ts +115 -0
- package/dist/commands/stash-export-command.d.ts.map +1 -0
- package/dist/commands/status-command.d.ts +33 -3
- package/dist/commands/status-command.d.ts.map +1 -1
- package/dist/commands/stripspace-command.d.ts +44 -0
- package/dist/commands/stripspace-command.d.ts.map +1 -0
- package/dist/commands/submodule-add-command.d.ts +10 -1
- package/dist/commands/submodule-add-command.d.ts.map +1 -1
- package/dist/commands/submodule-auth.d.ts +3 -1
- package/dist/commands/submodule-auth.d.ts.map +1 -1
- package/dist/commands/submodule-commands.d.ts +99 -3
- package/dist/commands/submodule-commands.d.ts.map +1 -1
- package/dist/commands/submodule-fetch.d.ts +149 -0
- package/dist/commands/submodule-fetch.d.ts.map +1 -0
- package/dist/commands/submodule-model.d.ts +8 -0
- package/dist/commands/submodule-model.d.ts.map +1 -1
- package/dist/commands/submodule-unpack.d.ts +120 -0
- package/dist/commands/submodule-unpack.d.ts.map +1 -0
- package/dist/commands/submodule-update-command.d.ts +21 -1
- package/dist/commands/submodule-update-command.d.ts.map +1 -1
- package/dist/commands/subtree-shift.d.ts +27 -0
- package/dist/commands/subtree-shift.d.ts.map +1 -0
- package/dist/commands/switch-command.d.ts +3 -0
- package/dist/commands/switch-command.d.ts.map +1 -1
- package/dist/commands/textconv-cache.d.ts +58 -0
- package/dist/commands/textconv-cache.d.ts.map +1 -0
- package/dist/commands/tree-restore.d.ts +5 -0
- package/dist/commands/tree-restore.d.ts.map +1 -1
- package/dist/commands/unpack-objects-command.d.ts +47 -0
- package/dist/commands/unpack-objects-command.d.ts.map +1 -0
- package/dist/commands/update-index-command.d.ts +110 -0
- package/dist/commands/update-index-command.d.ts.map +1 -0
- package/dist/commands/uri-protocols.d.ts +13 -0
- package/dist/commands/uri-protocols.d.ts.map +1 -0
- package/dist/commands/url-parse-command.d.ts +30 -0
- package/dist/commands/url-parse-command.d.ts.map +1 -0
- package/dist/commands/var-command.d.ts +42 -0
- package/dist/commands/var-command.d.ts.map +1 -0
- package/dist/commands/worktree-overwrite-checks.d.ts +2 -0
- package/dist/commands/worktree-overwrite-checks.d.ts.map +1 -1
- package/dist/{commands-ISM52N0n.js → commands-Mlo1dxQN.js} +56133 -70269
- package/dist/errors/command-errors.d.ts +58 -0
- package/dist/errors/command-errors.d.ts.map +1 -1
- package/dist/errors/index.js +67 -1
- package/dist/fsck-CrhVMNIH.js +5179 -0
- package/dist/git-command.d.ts +89 -3
- package/dist/git-command.d.ts.map +1 -1
- package/dist/git.d.ts +628 -1
- package/dist/git.d.ts.map +1 -1
- package/dist/guarded-transport-command.d.ts +84 -0
- package/dist/guarded-transport-command.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -5
- package/dist/maintenance-run-command-Bw21HEkH.js +13539 -0
- package/dist/remote-transport-Bu4PGSMD.js +2605 -0
- package/dist/rename/detect-renames.d.ts +20 -0
- package/dist/rename/detect-renames.d.ts.map +1 -1
- package/dist/rename/diffcore-break.d.ts +51 -0
- package/dist/rename/diffcore-break.d.ts.map +1 -0
- package/dist/rename/index.d.ts +1 -0
- package/dist/rename/index.d.ts.map +1 -1
- package/dist/results/blame-format.d.ts +62 -1
- package/dist/results/blame-format.d.ts.map +1 -1
- package/dist/results/cherry-pick-result.d.ts +6 -0
- package/dist/results/cherry-pick-result.d.ts.map +1 -1
- package/dist/results/clone-result.d.ts +9 -0
- package/dist/results/clone-result.d.ts.map +1 -1
- package/dist/results/diff-dirstat.d.ts +36 -0
- package/dist/results/diff-dirstat.d.ts.map +1 -0
- package/dist/results/diff-entry.d.ts +20 -0
- package/dist/results/diff-entry.d.ts.map +1 -1
- package/dist/results/diff-formatter.d.ts.map +1 -1
- package/dist/results/diff-output.d.ts +67 -3
- package/dist/results/diff-output.d.ts.map +1 -1
- package/dist/results/fetch-result.d.ts +24 -1
- package/dist/results/fetch-result.d.ts.map +1 -1
- package/dist/results/index.d.ts +2 -0
- package/dist/results/index.d.ts.map +1 -1
- package/dist/results/index.js +2 -2
- package/dist/results/init-result.d.ts +8 -1
- package/dist/results/init-result.d.ts.map +1 -1
- package/dist/results/line-range-hunks.d.ts +27 -0
- package/dist/results/line-range-hunks.d.ts.map +1 -0
- package/dist/results/merge-result.d.ts +13 -1
- package/dist/results/merge-result.d.ts.map +1 -1
- package/dist/results/pull-result.d.ts +11 -0
- package/dist/results/pull-result.d.ts.map +1 -1
- package/dist/results/push-result.d.ts +10 -0
- package/dist/results/push-result.d.ts.map +1 -1
- package/dist/results/rebase-result.d.ts +7 -0
- package/dist/results/rebase-result.d.ts.map +1 -1
- package/dist/results/revert-result.d.ts +6 -0
- package/dist/results/revert-result.d.ts.map +1 -1
- package/dist/results/stash-result.d.ts +5 -0
- package/dist/results/stash-result.d.ts.map +1 -1
- package/dist/results/status-result.d.ts +1 -1
- package/dist/results/status-result.d.ts.map +1 -1
- package/dist/results-ERo9vELd.js +49673 -0
- package/dist/transport-command.d.ts +93 -1
- package/dist/transport-command.d.ts.map +1 -1
- package/package.json +12 -12
- package/src/commands/add-command.ts +118 -0
- package/src/commands/add-patch/add-patch.ts +8 -0
- package/src/commands/add-patch/patch-backend.ts +24 -3
- package/src/commands/add-patch/patch-modes.ts +26 -2
- package/src/commands/add-patch/patch-session.ts +6 -0
- package/src/commands/am/am-command.ts +301 -12
- package/src/commands/apply/apply-command.ts +52 -9
- package/src/commands/apply/apply-parse.ts +10 -0
- package/src/commands/apply/index.ts +9 -1
- package/src/commands/archive/archive-command.ts +1148 -0
- package/src/commands/archive/archive-entry.ts +93 -0
- package/src/commands/archive/index.ts +7 -0
- package/src/commands/archive/remote-archive-command.ts +140 -0
- package/src/commands/archive/tar-archive.ts +207 -0
- package/src/commands/archive/tar-commit-id.ts +72 -0
- package/src/commands/archive/upload-archive-writer.ts +213 -0
- package/src/commands/archive/zip-archive.ts +317 -0
- package/src/commands/attributes-source.ts +26 -12
- package/src/commands/blame-command.ts +1551 -53
- package/src/commands/blame-ignore.ts +307 -0
- package/src/commands/bundle/bundle-create-command.ts +405 -0
- package/src/commands/bundle/bundle-format.ts +228 -0
- package/src/commands/bundle/bundle-list.ts +276 -0
- package/src/commands/bundle/bundle-read-commands.ts +157 -0
- package/src/commands/bundle/bundle-support.ts +85 -0
- package/src/commands/bundle/bundle-transport.ts +107 -0
- package/src/commands/bundle/bundle-uri-host.ts +204 -0
- package/src/commands/bundle/bundle-uri.ts +236 -0
- package/src/commands/bundle/bundle-verify.ts +152 -0
- package/src/commands/bundle/index.ts +14 -0
- package/src/commands/cat-file/batch-format.ts +193 -0
- package/src/commands/cat-file/cat-file-command.ts +857 -0
- package/src/commands/cat-file/index.ts +2 -0
- package/src/commands/check-attr-command.ts +333 -0
- package/src/commands/check-ignore-command.ts +261 -0
- package/src/commands/check-mailmap-command.ts +129 -0
- package/src/commands/check-ref-format-command.ts +129 -0
- package/src/commands/checkout-command.ts +131 -28
- package/src/commands/checkout-index-command.ts +568 -0
- package/src/commands/checkout-paths.ts +35 -0
- package/src/commands/cherry-command.ts +187 -0
- package/src/commands/cherry-pick-command.ts +63 -2
- package/src/commands/clean-command.ts +92 -12
- package/src/commands/clean-interactive.ts +522 -0
- package/src/commands/clone-command.ts +803 -50
- package/src/commands/commit-command.ts +202 -51
- package/src/commands/config-command.ts +9 -0
- package/src/commands/daemon-access-hook.ts +78 -0
- package/src/commands/default-branch.ts +99 -1
- package/src/commands/describe-command.ts +341 -254
- package/src/commands/diff-command.ts +1186 -99
- package/src/commands/diff-external.ts +131 -0
- package/src/commands/diff-plumbing/diff-pairs-command.ts +193 -0
- package/src/commands/diff-plumbing/diff-plumbing-command.ts +424 -0
- package/src/commands/diff-plumbing/index.ts +2 -0
- package/src/commands/diff-textconv.ts +5 -1
- package/src/commands/fast-export/fast-export-command.ts +911 -0
- package/src/commands/fast-export/fast-import-command.ts +1553 -0
- package/src/commands/fast-export/fast-stream-support.ts +162 -0
- package/src/commands/fast-export/index.ts +3 -0
- package/src/commands/fetch-command.ts +665 -14
- package/src/commands/fetch-multiple-command.ts +668 -0
- package/src/commands/format-patch-command.ts +189 -77
- package/src/commands/format-rev-command.ts +251 -0
- package/src/commands/fsck/fsck-command.ts +47 -20
- package/src/commands/fsck/fsck-msg-ids.ts +19 -3
- package/src/commands/fsck/fsck-pack.ts +2 -2
- package/src/commands/fsmonitor-refresh.ts +315 -0
- package/src/commands/gc-command.ts +10 -0
- package/src/commands/git-describe.ts +456 -217
- package/src/commands/git-hooks.ts +165 -9
- package/src/commands/git-paths.ts +136 -0
- package/src/commands/grep/grep-command.ts +38 -15
- package/src/commands/history-command.ts +617 -0
- package/src/commands/http-config.ts +139 -0
- package/src/commands/index-adder.ts +37 -3
- package/src/commands/index-host.ts +6 -1
- package/src/commands/index.ts +62 -0
- package/src/commands/init-command.ts +617 -49
- package/src/commands/last-modified-command.ts +804 -0
- package/src/commands/lfs/go-url.ts +370 -0
- package/src/commands/lfs/index.ts +2 -0
- package/src/commands/lfs/lfs-config.ts +738 -0
- package/src/commands/lfs/lfs-endpoint-command.ts +180 -0
- package/src/commands/line-log.ts +931 -0
- package/src/commands/local-transport.ts +252 -4
- package/src/commands/log-command.ts +1518 -182
- package/src/commands/log-graph.ts +6 -3
- package/src/commands/log-output.ts +228 -15
- package/src/commands/ls-files-command.ts +1177 -0
- package/src/commands/ls-remote-command.ts +6 -0
- package/src/commands/ls-tree-command.ts +684 -0
- package/src/commands/mailmap.ts +41 -5
- package/src/commands/maintenance-run-command.ts +949 -0
- package/src/commands/merge-command.ts +351 -47
- package/src/commands/merge-config.ts +23 -1
- package/src/commands/merge-drivers.ts +112 -20
- package/src/commands/merge-strategy-options.ts +224 -0
- package/src/commands/merge-support.ts +130 -26
- package/src/commands/merge-tree-command.ts +786 -0
- package/src/commands/message-cleanup.ts +1 -1
- package/src/commands/mktag-command.ts +149 -0
- package/src/commands/name-rev-command.ts +184 -0
- package/src/commands/name-rev.ts +700 -109
- package/src/commands/object-store/count-objects-command.ts +404 -0
- package/src/commands/object-store/index.ts +4 -0
- package/src/commands/object-store/objects-directory.ts +24 -0
- package/src/commands/object-store/prune-command.ts +129 -0
- package/src/commands/object-store/show-index-command.ts +151 -0
- package/src/commands/octopus-merge.ts +35 -11
- package/src/commands/ort-merge.ts +124 -23
- package/src/commands/ort-recursive.ts +40 -2
- package/src/commands/patch-id-command.ts +65 -0
- package/src/commands/patch-id.ts +327 -0
- package/src/commands/plumbing-command.ts +141 -0
- package/src/commands/plumbing-input.ts +87 -0
- package/src/commands/promisor-remote-reply.ts +276 -0
- package/src/commands/promisor-remote.ts +25 -2
- package/src/commands/pull-command.ts +720 -224
- package/src/commands/push-command.ts +440 -8
- package/src/commands/range-diff/index.ts +3 -0
- package/src/commands/range-diff/linear-assignment.ts +203 -0
- package/src/commands/range-diff/range-diff-command.ts +433 -0
- package/src/commands/range-diff/range-diff.ts +617 -0
- package/src/commands/read-tree-command.ts +74 -3
- package/src/commands/rebase-command.ts +647 -83
- package/src/commands/refs-command.ts +274 -0
- package/src/commands/remerge-diff.ts +241 -0
- package/src/commands/remote-command.ts +98 -10
- package/src/commands/remote-object-info-command.ts +109 -0
- package/src/commands/remote-show-command.ts +836 -0
- package/src/commands/remote-transport.ts +116 -1
- package/src/commands/repack-command.ts +383 -0
- package/src/commands/replace-command.ts +816 -0
- package/src/commands/replay-command.ts +674 -0
- package/src/commands/repo-command.ts +967 -0
- package/src/commands/request-pull-command.ts +356 -0
- package/src/commands/rerere-command.ts +179 -0
- package/src/commands/rerere.ts +925 -0
- package/src/commands/reset-command.ts +78 -3
- package/src/commands/restore-command.ts +15 -0
- package/src/commands/rev-filter/commit-grep.ts +7 -2
- package/src/commands/rev-list-command.ts +196 -11
- package/src/commands/rev-parse-command.ts +62 -4
- package/src/commands/revert-command.ts +62 -2
- package/src/commands/revision-range.ts +10 -3
- package/src/commands/revision-resolver.ts +44 -3
- package/src/commands/sequencer-pick.ts +370 -29
- package/src/commands/sequencer-support.ts +164 -2
- package/src/commands/serve-repository.ts +65 -0
- package/src/commands/session-id.ts +31 -0
- package/src/commands/shortlog-command.ts +354 -0
- package/src/commands/shortlog.ts +361 -0
- package/src/commands/show-branch-command.ts +981 -0
- package/src/commands/show-command.ts +3 -2
- package/src/commands/show-ref-command.ts +439 -0
- package/src/commands/signature-check.ts +37 -5
- package/src/commands/signing.ts +122 -16
- package/src/commands/stash-apply-command.ts +3 -0
- package/src/commands/stash-export-command.ts +397 -0
- package/src/commands/status-command.ts +158 -31
- package/src/commands/status-format.ts +1 -1
- package/src/commands/stripspace-command.ts +118 -0
- package/src/commands/submodule-add-command.ts +22 -1
- package/src/commands/submodule-auth.ts +61 -6
- package/src/commands/submodule-commands.ts +333 -5
- package/src/commands/submodule-fetch.ts +789 -0
- package/src/commands/submodule-model.ts +9 -1
- package/src/commands/submodule-unpack.ts +265 -0
- package/src/commands/submodule-update-command.ts +68 -5
- package/src/commands/subtree-shift.ts +215 -0
- package/src/commands/switch-command.ts +9 -0
- package/src/commands/textconv-cache.ts +143 -0
- package/src/commands/tree-restore.ts +20 -1
- package/src/commands/unpack-objects-command.ts +235 -0
- package/src/commands/update-index-command.ts +1016 -0
- package/src/commands/uri-protocols.ts +13 -0
- package/src/commands/url-parse-command.ts +67 -0
- package/src/commands/var-command.ts +219 -0
- package/src/commands/worktree-overwrite-checks.ts +5 -0
- package/src/errors/command-errors.ts +80 -0
- package/src/git-command.ts +218 -2
- package/src/git.ts +1033 -80
- package/src/guarded-transport-command.ts +176 -0
- package/src/index.ts +1 -0
- package/src/rename/detect-renames.ts +42 -8
- package/src/rename/diffcore-break.ts +166 -0
- package/src/rename/index.ts +1 -0
- package/src/results/blame-format.ts +268 -43
- package/src/results/cherry-pick-result.ts +6 -0
- package/src/results/clone-result.ts +6 -0
- package/src/results/diff-dirstat.ts +117 -0
- package/src/results/diff-entry.ts +24 -0
- package/src/results/diff-formatter.ts +8 -4
- package/src/results/diff-output.ts +239 -8
- package/src/results/diff-pickaxe.ts +1 -1
- package/src/results/fetch-result.ts +24 -1
- package/src/results/index.ts +2 -0
- package/src/results/init-result.ts +10 -1
- package/src/results/line-range-hunks.ts +126 -0
- package/src/results/merge-result.ts +14 -0
- package/src/results/pull-result.ts +7 -0
- package/src/results/push-result.ts +10 -0
- package/src/results/rebase-result.ts +7 -0
- package/src/results/revert-result.ts +6 -0
- package/src/results/stash-result.ts +6 -0
- package/src/results/status-result.ts +2 -2
- package/src/transport-command.ts +216 -4
- package/dist/fsck-DLRpbwTj.js +0 -13405
- package/dist/results-TB2IJ64h.js +0 -4700
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `git show-ref` (builtin/show-ref.c): the refs and their ids, matched by patterns, checked by
|
|
3
|
+
* exact name (`--verify`), tested for existence (`--exists`), or the lines of a remote's
|
|
4
|
+
* listing the repository lacks (`--exclude-existing`).
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* // git show-ref --tags -d
|
|
9
|
+
* const { stdout } = await git.showRef().setTags(true).setDereference(true).callOutput();
|
|
10
|
+
* // git show-ref --verify -q refs/heads/main
|
|
11
|
+
* const { exitCode } = await git.showRef().setVerify(true).setQuiet(true).addPattern("refs/heads/main").call();
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
import { PlumbingCommand } from "./plumbing-command.js";
|
|
15
|
+
/**
|
|
16
|
+
* `git show-ref`. Results are git's stdout ({@link setStdout}, {@link callOutput}), stderr
|
|
17
|
+
* and exit status: 1 when no ref matched (or `--verify -q` missed), 2 for `--exists` of a
|
|
18
|
+
* missing ref; deaths (`fatal:` lines, exit 128) are thrown as {@link PlumbingError}.
|
|
19
|
+
*
|
|
20
|
+
* Version differences (`setCompatibility`): the refusal of two sub-modes at once is 2.43's
|
|
21
|
+
* `only one of ... can be given`, 2.5x's `options ... cannot be used together`; 2.43's
|
|
22
|
+
* `--verify` reads only `refs/...` and HEAD (2.5x also other uppercase names, `ORIG_HEAD`); 2.43's `--exists`
|
|
23
|
+
* of a missing FETCH_HEAD or MERGE_HEAD says `failed to look up reference: Success` (exit 1).
|
|
24
|
+
* `--branches` is 2.46's name of `--heads` (both are {@link setBranches}).
|
|
25
|
+
*/
|
|
26
|
+
export declare class ShowRefCommand extends PlumbingCommand {
|
|
27
|
+
private readonly patterns;
|
|
28
|
+
private head;
|
|
29
|
+
private branches;
|
|
30
|
+
private tags;
|
|
31
|
+
private deref;
|
|
32
|
+
private hashOnly;
|
|
33
|
+
private abbrev;
|
|
34
|
+
private quiet;
|
|
35
|
+
private verify;
|
|
36
|
+
private exists;
|
|
37
|
+
private excludeExisting;
|
|
38
|
+
private excludePattern?;
|
|
39
|
+
private stdin;
|
|
40
|
+
private compatibility;
|
|
41
|
+
/** Patterns (tail-matched on whole components), or the refs of `--verify`/`--exists`. */
|
|
42
|
+
addPattern(...patterns: string[]): this;
|
|
43
|
+
/** `--head`: HEAD listed first, whatever the patterns. */
|
|
44
|
+
setHead(head: boolean): this;
|
|
45
|
+
/** `--branches` (2.46+; `--heads` before): only `refs/heads/`, with tags if asked too. */
|
|
46
|
+
setBranches(branches: boolean): this;
|
|
47
|
+
/** `--heads`, the name of {@link setBranches} before git 2.46. */
|
|
48
|
+
setHeads(heads: boolean): this;
|
|
49
|
+
/** `--tags`: only `refs/tags/`, with branches if asked too. */
|
|
50
|
+
setTags(tags: boolean): this;
|
|
51
|
+
/** `-d`/`--dereference`: a `<ref>^{}` line with what an annotated tag peels to. */
|
|
52
|
+
setDereference(deref: boolean): this;
|
|
53
|
+
/**
|
|
54
|
+
* `-s`/`--hash[=<n>]`: ids alone, abbreviated to `n` digits when given (0: whole; less than 4
|
|
55
|
+
* is 4).
|
|
56
|
+
*/
|
|
57
|
+
setHash(length?: number): this;
|
|
58
|
+
/** `--abbrev[=<n>]`: ids abbreviated (no length: `core.abbrev`'s); `0` is `--no-abbrev`. */
|
|
59
|
+
setAbbrev(length?: number): this;
|
|
60
|
+
/** `-q`/`--quiet`: nothing on stdout. */
|
|
61
|
+
setQuiet(quiet: boolean): this;
|
|
62
|
+
/** `--verify`: the patterns are full ref names (or HEAD and other root refs). */
|
|
63
|
+
setVerify(verify: boolean): this;
|
|
64
|
+
/** `--exists`: whether the one ref given exists, without resolving it. */
|
|
65
|
+
setExists(exists: boolean): this;
|
|
66
|
+
/**
|
|
67
|
+
* `--exclude-existing[=<pattern>]`: the {@link setStdin} lines whose ref the repository
|
|
68
|
+
* lacks, only refs starting with `pattern` when given.
|
|
69
|
+
*/
|
|
70
|
+
setExcludeExisting(pattern?: string): this;
|
|
71
|
+
/** git's stdin (`--exclude-existing`'s lines). */
|
|
72
|
+
setStdin(text: string): this;
|
|
73
|
+
/** The git version whose behaviour to follow (default 2.56). */
|
|
74
|
+
setCompatibility(version: "2.43" | "2.56"): this;
|
|
75
|
+
/** It reads objects only: ids are abbreviated over cached listings. */
|
|
76
|
+
protected writesNoObjects(): boolean;
|
|
77
|
+
protected run(): Promise<number>;
|
|
78
|
+
/** cmd_show_ref__patterns */
|
|
79
|
+
private runPatterns;
|
|
80
|
+
/** cmd_show_ref__verify */
|
|
81
|
+
private runVerify;
|
|
82
|
+
/**
|
|
83
|
+
* The names `--verify` reads: `refs/...` and HEAD, and from 2.45 any name refname_is_safe
|
|
84
|
+
* takes outside `refs/` (`CHERRY_PICK_HEAD`, `ORIG_HEAD`: uppercase letters and `_`).
|
|
85
|
+
*/
|
|
86
|
+
private verifiable;
|
|
87
|
+
/** cmd_show_ref__exists: refs_read_raw_ref, a symbolic ref not followed */
|
|
88
|
+
private runExists;
|
|
89
|
+
/** cmd_show_ref__exclude_existing */
|
|
90
|
+
private runExcludeExisting;
|
|
91
|
+
/** show_one: the ref's line (and its `^{}` line); a missing object is fatal. */
|
|
92
|
+
private showOne;
|
|
93
|
+
/** peel_iterated_oid: what an annotated tag ends at, undefined for anything else. */
|
|
94
|
+
private peel;
|
|
95
|
+
/** repo_find_unique_abbrev with the command's length (0: the whole id). */
|
|
96
|
+
private hexOf;
|
|
97
|
+
/** The refs under `prefix` in name order, symbolic ones at their target's id, dangling ones left out. */
|
|
98
|
+
private listRefs;
|
|
99
|
+
/** What a ref name resolves to, symbolic refs followed (read_ref). */
|
|
100
|
+
private resolveName;
|
|
101
|
+
/** The peeled id packed-refs records for `name`, if it is a direct packed ref. */
|
|
102
|
+
private packedPeel;
|
|
103
|
+
/**
|
|
104
|
+
* A loose ref's file in the files backend that the store does not read as a ref (a
|
|
105
|
+
* directory, FETCH_HEAD): `"directory"`, its text, or undefined when there is none (and
|
|
106
|
+
* always in a reftable repository).
|
|
107
|
+
*/
|
|
108
|
+
private looseRefFile;
|
|
109
|
+
/** parse_loose_ref_contents of a direct value: the format's hex digits, then the end or a space. */
|
|
110
|
+
private isObjectIdLine;
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=show-ref-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"show-ref-command.d.ts","sourceRoot":"","sources":["../../src/commands/show-ref-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAUH,OAAO,EAAE,eAAe,EAAiB,MAAM,uBAAuB,CAAC;AAevE;;;;;;;;;;GAUG;AACH,qBAAa,cAAe,SAAQ,eAAe;IACjD,OAAO,CAA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ACH,kBAAkB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAKzC;IAED,kDAAkD;IAClD,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAI3B;IAED,gEAAgE;IAChE,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI/C;IAED,uEAAuE;IACvE,UAAmB,eAAe,IAAI,OAAO,CAE5C;IAED,UAAgB,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,CAsBrC;IAED,6BAA6B;YACf,WAAW;IAyBzB,2BAA2B;YACb,SAAS;IAgBvB;;;OAGG;IACH,OAAO,CAAC,UAAU;IAKlB,2EAA2E;YAC7D,SAAS;IAoCvB,qCAAqC;YACvB,kBAAkB;IAmBhC,gFAAgF;YAClE,OAAO;IAYrB,qFAAqF;YACvE,IAAI;IAQlB,2EAA2E;YAC7D,KAAK;IAQnB,yGAAyG;YAC3F,QAAQ;IAkBtB,sEAAsE;YACxD,WAAW;IAKzB,kFAAkF;YACpE,UAAU;IAKxB;;;;OAIG;YACW,YAAY;IA4B1B,oGAAoG;IACpG,OAAO,CAAC,cAAc;CAMvB"}
|
|
@@ -20,8 +20,9 @@
|
|
|
20
20
|
* @module
|
|
21
21
|
*/
|
|
22
22
|
import { type ObjectFormat } from "@statewalker/vcs-utils";
|
|
23
|
-
import type { SigningFormat, WorkingCopy } from "@statewalker/vcs-working-tree";
|
|
23
|
+
import type { SigningFormat, Verifier, WorkingCopy } from "@statewalker/vcs-working-tree";
|
|
24
24
|
import { GitApiError } from "../errors/index.js";
|
|
25
|
+
import { type SigningConfig } from "./signing.js";
|
|
25
26
|
/**
|
|
26
27
|
* git's `sigc->result`: `G` good, `B` bad, `E` cannot be checked (missing key, several
|
|
27
28
|
* signatures), `X` good but expired, `Y` good by an expired key, `R` good by a revoked key,
|
|
@@ -58,7 +59,7 @@ export interface SignatureCheck {
|
|
|
58
59
|
messages: string[];
|
|
59
60
|
}
|
|
60
61
|
/** What is signed: the ident whose date ssh checks keys against. */
|
|
61
|
-
export type SignaturePayloadType = "commit" | "tag" | "other";
|
|
62
|
+
export type SignaturePayloadType = "commit" | "tag" | "push-cert" | "other";
|
|
62
63
|
/** git's `get_format_by_sig`: the format whose armor `signature` starts with. */
|
|
63
64
|
export declare function signatureFormatAt(bytes: Uint8Array, at?: number): SigningFormat | undefined;
|
|
64
65
|
/**
|
|
@@ -108,6 +109,12 @@ export interface CheckSignatureOptions {
|
|
|
108
109
|
* @throws InvalidConfigError for a bad signing variable
|
|
109
110
|
*/
|
|
110
111
|
export declare function checkSignature(workingCopy: WorkingCopy, payload: Uint8Array, signature: Uint8Array, options?: CheckSignatureOptions): Promise<SignatureCheck>;
|
|
112
|
+
/**
|
|
113
|
+
* {@link checkSignature} with the signing configuration (read only when the signature has a
|
|
114
|
+
* known format) and the verifier given: a served repository's (receive-pack's push
|
|
115
|
+
* certificates).
|
|
116
|
+
*/
|
|
117
|
+
export declare function checkSignatureWith(signingConfig: () => SigningConfig, verifier: Verifier | undefined, payload: Uint8Array, signature: Uint8Array, options?: CheckSignatureOptions): Promise<SignatureCheck>;
|
|
111
118
|
/**
|
|
112
119
|
* git's `verify_commit_buffer`: the signature in the commit's `gpgsig` header
|
|
113
120
|
* (`gpgsig-sha256` in a SHA-256 repository) checked over the rest; result `N` and a failure
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signature-check.d.ts","sourceRoot":"","sources":["../../src/commands/signature-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,EAAE,KAAK,YAAY,EAAsB,MAAM,wBAAwB,CAAC;AAC/E,OAAO,KAAK,EACV,aAAa,EAEb,WAAW,EACZ,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"signature-check.d.ts","sourceRoot":"","sources":["../../src/commands/signature-check.ts"],"names":[],"mappings":"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;AACH,wBAAsB,oBAAoB,CACxC,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,UAAU,GAAG,SAAS,EAC7B,OAAO,EAAE;IACP,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,OAAO,CAAC;CACrB,GACA,OAAO,CAAC,MAAM,CAAC,CA+BjB;AAED,yEAAyE;AACzE,wBAAsB,qBAAqB,CACzC,WAAW,EAAE,WAAW,EACxB,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAYjC"}
|
|
@@ -28,8 +28,9 @@
|
|
|
28
28
|
* globally), was not taken; switch only on the human's word.
|
|
29
29
|
*/
|
|
30
30
|
import { type Commit, type PersonIdent } from "@statewalker/vcs-core";
|
|
31
|
-
import { type Signer, type SigningFormat, type SigningRequest, type WorkingCopy } from "@statewalker/vcs-working-tree";
|
|
31
|
+
import { type GitHostEnvironment, type Signer, type SigningFormat, type SigningRequest, type WorkingCopy } from "@statewalker/vcs-working-tree";
|
|
32
32
|
import { GitApiError } from "../errors/index.js";
|
|
33
|
+
import { type ConfigValueWhere } from "../remote-config/index.js";
|
|
33
34
|
/**
|
|
34
35
|
* A request to sign: the key to sign with (`""`: the default key, git's `-S` without a key
|
|
35
36
|
* id), or undefined when nothing is to be signed.
|
|
@@ -104,6 +105,16 @@ export interface SigningConfig {
|
|
|
104
105
|
* '<key>' in file '<file>' at line <n>`
|
|
105
106
|
*/
|
|
106
107
|
export declare function signingConfigOf(workingCopy: WorkingCopy): SigningConfig;
|
|
108
|
+
/** The variables {@link signingConfigOf} reads, lower case. */
|
|
109
|
+
export declare const SIGNING_KEYS: readonly string[];
|
|
110
|
+
/**
|
|
111
|
+
* {@link signingConfigOf} over config entries in git's order (keys lower case, only
|
|
112
|
+
* {@link SIGNING_KEYS} are read), for a configuration that is no working copy's (a served
|
|
113
|
+
* repository's).
|
|
114
|
+
*/
|
|
115
|
+
export declare function signingConfigFromEntries(entries: Iterable<ConfigValueWhere & {
|
|
116
|
+
key: string;
|
|
117
|
+
}>, environment: GitHostEnvironment | undefined): SigningConfig;
|
|
107
118
|
/**
|
|
108
119
|
* What git's `sign_buffer(..., SIGN_BUFFER_USE_DEFAULT_KEY)` runs for `sign` (`""`: the
|
|
109
120
|
* default key): the format and program from the configuration, the key `sign` names, else
|
|
@@ -157,4 +168,14 @@ export declare function signPayload(workingCopy: WorkingCopy, sign: string, payl
|
|
|
157
168
|
* ```
|
|
158
169
|
*/
|
|
159
170
|
export declare function signCommit(workingCopy: WorkingCopy, sign: SignRequest, commit: Commit, options?: Omit<SignPayloadOptions, "committer">): Promise<Commit>;
|
|
171
|
+
/**
|
|
172
|
+
* gpg-interface.c's `get_signing_key_id()` for `sign` (`""`: the default key): the key of an
|
|
173
|
+
* openpgp or x509 signature (`user.signingKey`, else the committer as `Name <email>`), the
|
|
174
|
+
* SHA-256 fingerprint of an ssh key (`ssh-keygen -lf`'s `SHA256:...`, for a literal key, a
|
|
175
|
+
* public key file or an OpenSSH private key file).
|
|
176
|
+
*
|
|
177
|
+
* @throws SigningFailedError as git dies when it cannot fingerprint an ssh key (`fatal: failed
|
|
178
|
+
* to get the ssh fingerprint for key '<key>'`), or has none
|
|
179
|
+
*/
|
|
180
|
+
export declare function signingKeyIdOf(workingCopy: WorkingCopy, sign: string, committer: Pick<PersonIdent, "name" | "email">): Promise<string>;
|
|
160
181
|
//# sourceMappingURL=signing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signing.d.ts","sourceRoot":"","sources":["../../src/commands/signing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,EAAE,KAAK,MAAM,EAAsB,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAE1F,OAAO,EAEL,KAAK,M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C,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAMzE;IAED;;;;OAIG;IACH,WAAW,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI,CAIzC;IAED;;OAEG;IACH,WAAW,IAAI,aAAa,CAE3B;IAED;;;;OAIG;IACH,uBAAuB,CAAC,QAAQ,EAAE,oBAAoB,GAAG,IAAI,CAI5D;IAED;;OAEG;IACH,uBAAuB,IAAI,oBAAoB,GAAG,SAAS,CAE1D;IAED;;;;OAIG;IACG,IAAI,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAiBtC;YAEa,KAAK;IA2YnB;;;OAGG;IACH,OAAO,CAAC,aAAa;IAIrB;;;;OAIG;YACW,YAAY;IAe1B,oFAAoF;YACtE,SAAS;IAoBvB;;;;OAIG;YACW,SAAS;IAqBvB;;;;;OAKG;YACW,WAAW;IAyCzB,wCAAwC;YAC1B,SAAS;IA2BvB,wDAAwD;YAC1C,QAAQ;IAatB;;;;;;;;;;;;;OAaG;YACW,oBAAoB;IAuBlC;;;;;;;;OAQG;YACW,cAAc;IAoD5B;;OAEG;YACW,eAAe;CA0D9B"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import type { ObjectId } from "@statewalker/vcs-core";
|
|
2
|
+
import { StashInfoCommand } from "./stash-info.js";
|
|
3
|
+
/** What `git stash export` did. */
|
|
4
|
+
export interface StashExportResult {
|
|
5
|
+
/** The tip of the exported chain; undefined when the export stopped at a bad reflog entry */
|
|
6
|
+
readonly commit?: ObjectId;
|
|
7
|
+
/**
|
|
8
|
+
* git's `error:` lines of a run that still exits 0: a `refs/stash` reflog entry that is no
|
|
9
|
+
* stash stops the export (nothing printed, no ref written), as builtin/stash.c does.
|
|
10
|
+
*/
|
|
11
|
+
readonly errors: string[];
|
|
12
|
+
}
|
|
13
|
+
/** What `git stash import` did. */
|
|
14
|
+
export interface StashImportResult {
|
|
15
|
+
/** The stash commits stored, oldest first (the last is `stash@{0}`) */
|
|
16
|
+
readonly imported: ObjectId[];
|
|
17
|
+
/**
|
|
18
|
+
* git's `error:` lines of a run that still exits 0: a root commit without an author or a
|
|
19
|
+
* committer stops the import before anything is stored, as builtin/stash.c does.
|
|
20
|
+
*/
|
|
21
|
+
readonly errors: string[];
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* What export and import share: raw commits read and written byte for byte, and git's
|
|
25
|
+
* check_stash_topology.
|
|
26
|
+
*/
|
|
27
|
+
declare abstract class StashChainCommand<T> extends StashInfoCommand<T> {
|
|
28
|
+
/** The object's content as stored, undefined when it is missing */
|
|
29
|
+
protected rawObject(id: ObjectId): Promise<{
|
|
30
|
+
type: string;
|
|
31
|
+
raw: string;
|
|
32
|
+
} | undefined>;
|
|
33
|
+
/** git's lookup_commit_reference: the commit `id` names, tags peeled */
|
|
34
|
+
protected peelCommit(id: ObjectId): Promise<ObjectId | undefined>;
|
|
35
|
+
/**
|
|
36
|
+
* git's check_stash_topology: two or three parents, the second with one parent (the
|
|
37
|
+
* first), the third with none.
|
|
38
|
+
*/
|
|
39
|
+
protected isStashTopology(id: ObjectId): Promise<boolean>;
|
|
40
|
+
/** `encoding <i18n.commitEncoding>` as commit_tree_extended writes it, else "" */
|
|
41
|
+
protected encodingHeader(): string;
|
|
42
|
+
protected writeCommit(text: string): Promise<ObjectId>;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* `git stash export (--print | --to-ref <ref>) [<stash>...]` (git 2.51+): the stashes, every
|
|
46
|
+
* entry of `refs/stash` by default, written as a chain of commits that any transport carries,
|
|
47
|
+
* as builtin/stash.c's do_export_stash writes it.
|
|
48
|
+
*
|
|
49
|
+
* The chain starts at a parentless commit of the empty tree by `git stash <git@stash>` dated
|
|
50
|
+
* 2001-09-17 (the same in every repository). Each stash adds a commit of the empty tree whose
|
|
51
|
+
* first parent is the previous link and whose second is the stash commit itself, with the
|
|
52
|
+
* stash's author and committer and its message after `git stash: `. The oldest stash is linked
|
|
53
|
+
* first, so the tip's second parent is `stash@{0}`; named stashes are linked last to first.
|
|
54
|
+
* The tip is printed (`--print`, see {@link getOutput}) or written to the ref named
|
|
55
|
+
* (`--to-ref`, no reflog message). `git stash import` reads the chain back.
|
|
56
|
+
*
|
|
57
|
+
* As git: `error: exactly one of --print and --to-ref is required`, `error: unable to find
|
|
58
|
+
* stash entry <stash>`, `error: <revision> does not look like a stash commit` (exit 128 as git 2.56; 2.51-2.55 exit 1); a
|
|
59
|
+
* `refs/stash` entry that is no stash stops the export with exit 0 and nothing written
|
|
60
|
+
* (`StashExportResult.errors`). Under `setCompatibility("2.43")` it refuses as git 2.43, which
|
|
61
|
+
* has no such subcommand.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```typescript
|
|
65
|
+
* // git stash export --to-ref refs/heads/stashes
|
|
66
|
+
* await git.stashExport().setToRef("refs/heads/stashes").call();
|
|
67
|
+
* // git stash export --print stash@{1}
|
|
68
|
+
* const { commit } = await git.stashExport().setPrint(true).addStash("stash@{1}").call();
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
export declare class StashExportCommand extends StashChainCommand<StashExportResult> {
|
|
72
|
+
private print;
|
|
73
|
+
private toRef?;
|
|
74
|
+
private readonly stashes;
|
|
75
|
+
/** `--print`: the chain's tip printed on stdout. */
|
|
76
|
+
setPrint(print: boolean): this;
|
|
77
|
+
/** `--to-ref <ref>`: the chain's tip written to `ref`. */
|
|
78
|
+
setToRef(ref: string): this;
|
|
79
|
+
/** A stash to export (`stash@{n}`, `n` or any revision); none: every entry of `refs/stash`. */
|
|
80
|
+
addStash(stash: string): this;
|
|
81
|
+
call(): Promise<StashExportResult>;
|
|
82
|
+
/** The ids `refs/stash`'s reflog records, newest first (the ref alone for a store keeping no reflogs) */
|
|
83
|
+
private stashReflog;
|
|
84
|
+
/** git's write_commit_with_parents: the stash linked after `previous`. */
|
|
85
|
+
private exportedCommit;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* `git stash import <commit>` (git 2.51+): the stashes of a chain `git stash export` wrote,
|
|
89
|
+
* added to `refs/stash` oldest first, each with its own message as the reflog message (so
|
|
90
|
+
* the chain's tip becomes `stash@{0}`; the entries already there stay below), as
|
|
91
|
+
* builtin/stash.c's do_import_stash adds them.
|
|
92
|
+
*
|
|
93
|
+
* The whole chain is checked before anything is stored, with git's messages (exit 128 as git 2.56; 2.51-2.55 exit 1):
|
|
94
|
+
* `not a valid revision: <rev>`, `not a commit: <rev>`, `<id> is not a valid exported stash
|
|
95
|
+
* commit` (a tree other than the empty one, or neither none nor two parents), `found stash
|
|
96
|
+
* commit <id> without expected prefix`, `<id> does not look like a stash commit`, `found root
|
|
97
|
+
* commit <id> with invalid data` (a base commit not by `git stash <git@stash>` at its date).
|
|
98
|
+
* A base commit without an author or committer stops the import with exit 0 and nothing
|
|
99
|
+
* stored (`StashImportResult.errors`). Under `setCompatibility("2.43")` it refuses as git
|
|
100
|
+
* 2.43, which has no such subcommand.
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```typescript
|
|
104
|
+
* // git fetch origin refs/heads/stashes && git stash import FETCH_HEAD
|
|
105
|
+
* await git.stashImport().setCommit("FETCH_HEAD").call();
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
export declare class StashImportCommand extends StashChainCommand<StashImportResult> {
|
|
109
|
+
private commit?;
|
|
110
|
+
/** The tip of an exported chain (any revision naming it). */
|
|
111
|
+
setCommit(commit: string): this;
|
|
112
|
+
call(): Promise<StashImportResult>;
|
|
113
|
+
}
|
|
114
|
+
export {};
|
|
115
|
+
//# sourceMappingURL=stash-export-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stash-export-command.d.ts","sourceRoot":"","sources":["../../src/commands/stash-export-command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAKtD,OAAO,EAAE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CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAI7B;IAED,0DAA0D;IAC1D,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAI1B;IAED,+FAA+F;IAC/F,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAI5B;IAEK,IAAI,IAAI,OAAO,CAAC,iBAAiB,CAAC,CAmEvC;IAED,yGAAyG;YAC3F,WAAW;IAUzB,0EAA0E;YAC5D,cAAc;CAsB7B;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,kBAAmB,SAAQ,iBAAiB,CAAC,iBAAiB,CAAC;IAC1E,OAAO,CAAC,MAAM,CAAC,CAAS;IAExB,6DAA6D;IAC7D,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAI9B;IAEK,IAAI,IAAI,OAAO,CAAC,iBAAiB,CAAC,CAwEvC;CACF"}
|
|
@@ -116,7 +116,10 @@ export declare class StatusCommand extends GitCommand<Status> {
|
|
|
116
116
|
private resolvedUntracked;
|
|
117
117
|
private renames?;
|
|
118
118
|
private renameLimit?;
|
|
119
|
+
/** `-M[=<n>]` / `--find-renames[=<n>]`: its score text ("" for none) */
|
|
120
|
+
private findRenames?;
|
|
119
121
|
private ignoreSubmodules?;
|
|
122
|
+
private plumbingSubmodules;
|
|
120
123
|
private gitmodules?;
|
|
121
124
|
/** The commit the index is compared with: undefined is HEAD, null none (initial) */
|
|
122
125
|
private reference?;
|
|
@@ -166,6 +169,12 @@ export declare class StatusCommand extends GitCommand<Status> {
|
|
|
166
169
|
* decides, else `diff.renames`, else on (git's default).
|
|
167
170
|
*/
|
|
168
171
|
setRenames(renames: boolean): this;
|
|
172
|
+
/**
|
|
173
|
+
* `-M[=<n>]` / `--find-renames[=<n>]`: renames detected (copies too if `status.renames`
|
|
174
|
+
* asks for them) at least this similar (git's syntax: `90%`, `9`, `.9`; none, or "", the
|
|
175
|
+
* default 50%). Trailing text throws git's `error: invalid argument to find-renames`.
|
|
176
|
+
*/
|
|
177
|
+
setFindRenames(score?: string): this;
|
|
169
178
|
/**
|
|
170
179
|
* The rename limit: inexact renames are looked for only while the unpaired deleted
|
|
171
180
|
* times added paths stay within its square. Unset, `status.renameLimit` decides, else
|
|
@@ -179,6 +188,14 @@ export declare class StatusCommand extends GitCommand<Status> {
|
|
|
179
188
|
* submodules, `none` reports everything.
|
|
180
189
|
*/
|
|
181
190
|
setIgnoreSubmodules(mode: SubmoduleIgnoreMode): this;
|
|
191
|
+
/**
|
|
192
|
+
* Submodules as a plumbing `git diff-index HEAD` sees them (git describe's `--dirty`):
|
|
193
|
+
* `diff.ignoreSubmodules` is not read (only `git_diff_ui_config` reads it), a submodule
|
|
194
|
+
* without `submodule.<name>.ignore` counts its changes but not its untracked files, and
|
|
195
|
+
* one with it follows it (`none`: untracked files too) whatever {@link setUntrackedFiles}
|
|
196
|
+
* says.
|
|
197
|
+
*/
|
|
198
|
+
setPlumbingSubmodules(plumbing: boolean): this;
|
|
182
199
|
/**
|
|
183
200
|
* The commit the index is compared with instead of HEAD (`s->reference`: `git commit
|
|
184
201
|
* --amend` compares with `HEAD^1`), null for none (every entry new, as before the first
|
|
@@ -188,7 +205,8 @@ export declare class StatusCommand extends GitCommand<Status> {
|
|
|
188
205
|
/**
|
|
189
206
|
* Whether the stats refreshed while comparing (and a changed untracked cache) are written
|
|
190
207
|
* back to the index (default true, as `git status`). A caller holding the index with
|
|
191
|
-
* edits of its own (a commit's prepared index) passes false.
|
|
208
|
+
* edits of its own (a commit's prepared index) passes false. The environment's
|
|
209
|
+
* `optionalLocks: false` (`GIT_OPTIONAL_LOCKS=0`) turns the write off too.
|
|
192
210
|
*/
|
|
193
211
|
setWriteIndex(write: boolean): this;
|
|
194
212
|
/**
|
|
@@ -232,6 +250,11 @@ export declare class StatusCommand extends GitCommand<Status> {
|
|
|
232
250
|
* ones, under their own headers); in a file (the commit template) after the cut line.
|
|
233
251
|
*/
|
|
234
252
|
private verboseText;
|
|
253
|
+
/**
|
|
254
|
+
* wt_longstatus_print_verbose: the verbose diffs detect renames as status does
|
|
255
|
+
* (`s->detect_rename`, `rename_score`, `rename_limit`)
|
|
256
|
+
*/
|
|
257
|
+
private verboseRenames;
|
|
235
258
|
call(): Promise<Status>;
|
|
236
259
|
/** cmd_status's parse_pathspec (PATHSPEC_PREFER_FULL): none for no elements. */
|
|
237
260
|
private parsePaths;
|
|
@@ -251,8 +274,15 @@ export declare class StatusCommand extends GitCommand<Status> {
|
|
|
251
274
|
* index then; an assume-unchanged one missing records the null id).
|
|
252
275
|
*/
|
|
253
276
|
private indexIgnoreOids;
|
|
254
|
-
/**
|
|
255
|
-
|
|
277
|
+
/**
|
|
278
|
+
* What renames are detected (builtin/commit.c): the setter, else `status.renames`, else
|
|
279
|
+
* `diff.renames`, else renames; `-M` turns them on, keeping copies.
|
|
280
|
+
*/
|
|
281
|
+
private renameMode;
|
|
282
|
+
/** The rename threshold of `-M<n>` (git's `rename_score`), undefined for the default */
|
|
283
|
+
private renameScore;
|
|
284
|
+
/** The rename limit: the setter, else `status.renameLimit`, else `diff.renameLimit` */
|
|
285
|
+
private statusRenameLimit;
|
|
256
286
|
/**
|
|
257
287
|
* Pairs renames as git status does: on the index side (`diff-index --cached`) a path
|
|
258
288
|
* removed from the index with one added to it; on the worktree side (`diff-files`) a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status-command.d.ts","sourceRoot":"","sources":["../../src/commands/status-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4C,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEhG,OAAO,
|
|
1
|
+
{"version":3,"file":"status-command.d.ts","sourceRoot":"","sources":["../../src/commands/status-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4C,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEhG,OAAO,EAsBL,KAAK,WAAW,EAChB,KAAK,QAAQ,EAGd,MAAM,+BAA+B,CAAC;AAOvC,OAAO,EAAE,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AM,CAAC,EAAE,OAAO,CAAC;IACjB,2EAA2E;IAC3E,CAAC,CAAC,EAAE,OAAO,CAAC;IACZ,iDAAiD;IACjD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,2FAA2F;IAC3F,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,2FAA2F;IAC3F,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mEAAmE;IACnE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,sGAAsG;IACtG,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kEAAkE;IAClE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,qFAAqF;IACrF,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,wFAAwF;IACxF,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,6FAA6F;IAC7F,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,6DAA6D;IAC7D,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,qFAAqF;AACrF,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IAClD,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAqBD;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAM/C"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `git stripspace` (builtin/stripspace.c): a message cleaned up as `strbuf_stripspace`
|
|
3
|
+
* cleans it (`-s` also drops comment lines), or every line commented out (`-c`,
|
|
4
|
+
* `strbuf_add_commented_lines`).
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* // printf 'a \n\n\n# c\nb' | git stripspace -s
|
|
9
|
+
* await git.stripspace().setInput("a \n\n\n# c\nb").setMode("strip-comments").call();
|
|
10
|
+
* // { exitCode: 0, stdout: "a\n\nb\n", stderr: "" }
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
import { GitCommand } from "../git-command.js";
|
|
14
|
+
import type { PlumbingTextOutput } from "./check-ref-format-command.js";
|
|
15
|
+
/** `git stripspace`'s modes: no option, `-s` (`--strip-comments`), `-c` (`--comment-lines`). */
|
|
16
|
+
export type StripspaceMode = "default" | "strip-comments" | "comment-lines";
|
|
17
|
+
/**
|
|
18
|
+
* git's `add_lines` with a space after the prefix (`strbuf_add_commented_lines`): every
|
|
19
|
+
* line prefixed, a space between unless the line is empty or starts with a tab, the last
|
|
20
|
+
* line completed.
|
|
21
|
+
*/
|
|
22
|
+
export declare function commentLines(text: string, commentPrefix: string): string;
|
|
23
|
+
/**
|
|
24
|
+
* `git stripspace [-s | -c]` over {@link setInput} (git's stdin). The comment string of
|
|
25
|
+
* `-s` and `-c` is `core.commentChar` / `core.commentString` (the last value of either; `auto`
|
|
26
|
+
* is `#`); git dies reading a value it refuses (2.5x: empty or holding a newline; 2.43, which
|
|
27
|
+
* knows only `core.commentChar`: anything but one ASCII character), exit 128 with git's two
|
|
28
|
+
* lines. The default mode reads no configuration.
|
|
29
|
+
*/
|
|
30
|
+
export declare class StripspaceCommand extends GitCommand<PlumbingTextOutput> {
|
|
31
|
+
private input;
|
|
32
|
+
private mode;
|
|
33
|
+
private compatibility;
|
|
34
|
+
/** The text to clean up (git's stdin); bytes are read as git paths are (`decodeGitPath`). */
|
|
35
|
+
setInput(input: string | Uint8Array): this;
|
|
36
|
+
/** `-s` / `-c`; the default only cleans up whitespace. */
|
|
37
|
+
setMode(mode: StripspaceMode): this;
|
|
38
|
+
/** The git version whose behaviour to follow (default 2.56). */
|
|
39
|
+
setCompatibility(version: "2.43" | "2.56"): this;
|
|
40
|
+
call(): Promise<PlumbingTextOutput>;
|
|
41
|
+
/** git_default_core_config's comment settings, each value checked in config order. */
|
|
42
|
+
private commentString;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=stripspace-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stripspace-command.d.ts","sourceRoot":"","sources":["../../src/commands/stripspace-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAGxE,gGAAgG;AAChG,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,gBAAgB,GAAG,eAAe,CAAC;AAE5E;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CAWxE;AAED;;;;;;GAMG;AACH,qBAAa,iBAAkB,SAAQ,UAAU,CAAC,kBAAkB,CAAC;IACnE,OAAO,CAAC,KAAK,CAAM;IACnB,OAAO,CAAC,IAAI,CAA6B;IACzC,OAAO,CAAC,aAAa,CAA2B;IAEhD,6FAA6F;IAC7F,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAIzC;IAED,0DAA0D;IAC1D,OAAO,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAIlC;IAED,gEAAgE;IAChE,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI/C;IAEK,IAAI,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAaxC;IAED,sFAAsF;IACtF,OAAO,CAAC,aAAa;CA2BtB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GitTransportRegistry } from "@statewalker/vcs-transport";
|
|
1
|
+
import type { GitTransportRegistry, HttpCredentialHelper } from "@statewalker/vcs-transport";
|
|
2
2
|
import { SubmoduleCommandBase, type SubmoduleCommandResult } from "./submodule-commands.js";
|
|
3
3
|
/**
|
|
4
4
|
* git's `git_url_basename(repo, 0, 0)` (dir.c): the directory `git clone <repo>` would
|
|
@@ -49,6 +49,8 @@ export declare class SubmoduleAddCommand extends SubmoduleCommandBase {
|
|
|
49
49
|
private reference?;
|
|
50
50
|
private depth?;
|
|
51
51
|
private transports?;
|
|
52
|
+
private credentialHelper?;
|
|
53
|
+
private warningCallback?;
|
|
52
54
|
/** `<repository>`: the URL to clone (absolute, or `./`/`../` relative to the remote). */
|
|
53
55
|
setURI(uri: string): this;
|
|
54
56
|
/** `<path>`: where the submodule goes (default: the URL's basename, as `git clone`'s). */
|
|
@@ -65,6 +67,13 @@ export declare class SubmoduleAddCommand extends SubmoduleCommandBase {
|
|
|
65
67
|
setDepth(depth: number): this;
|
|
66
68
|
/** The transports the clone reaches non-local URLs through. */
|
|
67
69
|
setTransports(transports: GitTransportRegistry): this;
|
|
70
|
+
/**
|
|
71
|
+
* A credential helper, as git's `credential.helper` read by the child clone: asked with the
|
|
72
|
+
* submodule URL's host when its server answers 401.
|
|
73
|
+
*/
|
|
74
|
+
setCredentialHelper(helper: HttpCredentialHelper): this;
|
|
75
|
+
/** Receives the `warning:` lines of the clone's HTTP client. */
|
|
76
|
+
setWarningCallback(callback: (line: string) => void): this;
|
|
68
77
|
call(): Promise<SubmoduleCommandResult>;
|
|
69
78
|
/** submodule.c's `is_writing_gitmodules_ok`. */
|
|
70
79
|
private writingGitmodulesOk;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"submodule-add-command.d.ts","sourceRoot":"","sources":["../../src/commands/submodule-add-command.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"submodule-add-command.d.ts","sourceRoot":"","sources":["../../src/commands/submodule-add-command.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAU7F,OAAO,EAAE,oBAAoB,EAAE,KAAK,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AA+B5F;;;;;;;;;;;;G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AAI,CAIzD;IAEK,IAAI,IAAI,OAAO,CAAC,sBAAsB,CAAC,CAmF5C;IAED,gDAAgD;YAClC,mBAAmB;IAejC;;;OAGG;YACW,gBAAgB;IAyB9B,0FAA0F;YAC5E,UAAU;IAWxB,kDAAkD;YACpC,eAAe;IAmB7B,2DAA2D;YAC7C,uBAAuB;IAOrC,6CAA6C;YAC/B,YAAY;IAmE1B,oFAAoF;YACtE,cAAc;IAY5B,yDAAyD;YAC3C,uBAAuB;CA6CtC"}
|
|
@@ -19,7 +19,9 @@
|
|
|
19
19
|
* the commands: a native connector gets them for the URL just checked, and every smart-HTTP
|
|
20
20
|
* request carries them only when `new URL(request.url).origin` is the approved origin;
|
|
21
21
|
* redirects are followed by hand (`redirect: "manual"`) so a redirect to another origin
|
|
22
|
-
* goes out without them
|
|
22
|
+
* goes out without them; an opaque redirect (a browser's, whose target cannot be read) is
|
|
23
|
+
* asked again following it with none of them, and they go to where it ended only when
|
|
24
|
+
* that is the approved origin.
|
|
23
25
|
*
|
|
24
26
|
* @example
|
|
25
27
|
* ```typescript
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"submodule-auth.d.ts","sourceRoot":"","sources":["../../src/commands/submodule-auth.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"submodule-auth.d.ts","sourceRoot":"","sources":["../../src/commands/submodule-auth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,OAAO,EACL,KAAK,WAAW,EAIhB,oBAAoB,EAGrB,MAAM,4BAA4B,CAAC;AAGpC,8FAA8F;AAC9F,MAAM,WAAW,aAAa;IAC5B,sFAAsF;IACtF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED,+CAA+C;AAC/C,MAAM,MAAM,gB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