@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
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* whose `result` holds what was printed before.
|
|
8
8
|
*/
|
|
9
9
|
import { type ObjectId } from "@statewalker/vcs-core";
|
|
10
|
-
import type { GitTransportRegistry } from "@statewalker/vcs-transport";
|
|
10
|
+
import type { GitTransportRegistry, HttpCredentialHelper } from "@statewalker/vcs-transport";
|
|
11
11
|
import { type FilesApi } from "@statewalker/vcs-utils/files";
|
|
12
12
|
import type { GitHostEnvironment, WorkingCopy } from "@statewalker/vcs-working-tree";
|
|
13
13
|
import { GitApiError } from "../errors/index.js";
|
|
@@ -21,6 +21,10 @@ export interface SubmoduleCloneOptions {
|
|
|
21
21
|
references?: string[];
|
|
22
22
|
/** `--require-init`: a non-empty directory at the path is refused */
|
|
23
23
|
requireInit?: boolean;
|
|
24
|
+
/** `--filter=<spec>` */
|
|
25
|
+
filter?: string;
|
|
26
|
+
/** `--single-branch` (true) / `--no-single-branch` (false) */
|
|
27
|
+
singleBranch?: boolean;
|
|
24
28
|
/**
|
|
25
29
|
* The transports and timeout the clone reaches its remote with. No credentials or headers
|
|
26
30
|
* are taken: a submodule's URL comes from the repository's content, so they are attached
|
|
@@ -28,6 +32,14 @@ export interface SubmoduleCloneOptions {
|
|
|
28
32
|
*/
|
|
29
33
|
transports?: GitTransportRegistry;
|
|
30
34
|
timeout?: number;
|
|
35
|
+
/**
|
|
36
|
+
* The credential helper (git's `credential.helper`, which the child clone reads): asked
|
|
37
|
+
* with the submodule's own URL after a 401, so it decides per host; the guarded transports
|
|
38
|
+
* drop what it gave on a redirect to another origin.
|
|
39
|
+
*/
|
|
40
|
+
credentialHelper?: HttpCredentialHelper;
|
|
41
|
+
/** git's `warning:` lines of the clone's HTTP client */
|
|
42
|
+
warningCallback?: (line: string) => void;
|
|
31
43
|
}
|
|
32
44
|
/** What a submodule command printed, and its exit status. */
|
|
33
45
|
export interface SubmoduleCommandResult {
|
|
@@ -60,6 +72,17 @@ export interface SubmoduleListEntry {
|
|
|
60
72
|
export declare const SUBMODULE_UNSET_ENV: string[];
|
|
61
73
|
/** git's `sq_quote_buf`: `'...'`, a `'` or `!` inside written as `'\''` / `'\!'`. */
|
|
62
74
|
export declare function shellQuote(text: string): string;
|
|
75
|
+
/** Where `<path>/.git` leads (setup.c's `resolve_gitdir_gently`). */
|
|
76
|
+
interface ResolvedGitdir {
|
|
77
|
+
/**
|
|
78
|
+
* The repository directory as a physical FilesApi path (links followed); null when a gitfile
|
|
79
|
+
* or a `.git` link leads beyond the FilesApi
|
|
80
|
+
*/
|
|
81
|
+
gitDir: string | null;
|
|
82
|
+
kind: "directory" | "gitfile";
|
|
83
|
+
}
|
|
84
|
+
/** setup.c's `READ_GITFILE_ERR_*` codes. */
|
|
85
|
+
type GitfileError = "missing" | "stat-failed" | "is-a-dir" | "not-a-file" | "too-large" | "read-failed" | "invalid-format" | "no-path" | "not-a-repo";
|
|
63
86
|
/**
|
|
64
87
|
* The parts every submodule command shares: output, the index's gitlinks, the model.
|
|
65
88
|
*
|
|
@@ -143,7 +166,7 @@ export declare abstract class SubmoduleCommandBase extends GitCommand<SubmoduleC
|
|
|
143
166
|
* submodules (`--super-prefix=<path>/`), as git's child `submodule--helper absorbgitdirs`.
|
|
144
167
|
*/
|
|
145
168
|
protected absorbGitDirIntoSuperproject(path: string): Promise<void>;
|
|
146
|
-
|
|
169
|
+
protected filesOrFail(): FilesApi;
|
|
147
170
|
/**
|
|
148
171
|
* submodule.c's `relocate_single_git_dir_into_superproject`: the `.git` directory moved
|
|
149
172
|
* (git's `rename`, its result checked before anything else changes) to the submodule's
|
|
@@ -167,7 +190,9 @@ export declare abstract class SubmoduleCommandBase extends GitCommand<SubmoduleC
|
|
|
167
190
|
* repository, else what `read_gitfile_gently` makes of it (the repository a gitfile names,
|
|
168
191
|
* `gitDir` null when it lies beyond this FilesApi, or git's error code).
|
|
169
192
|
*/
|
|
170
|
-
|
|
193
|
+
protected resolveGitdirGently(path: string): Promise<ResolvedGitdir | {
|
|
194
|
+
error: GitfileError;
|
|
195
|
+
}>;
|
|
171
196
|
/**
|
|
172
197
|
* worktree.c's `submodule_uses_worktrees`: whether the submodule's common git directory
|
|
173
198
|
* (its `commondir`) has anything in `worktrees/`.
|
|
@@ -179,6 +204,76 @@ export declare abstract class SubmoduleCommandBase extends GitCommand<SubmoduleC
|
|
|
179
204
|
protected start(): void;
|
|
180
205
|
protected finish(): SubmoduleCommandResult;
|
|
181
206
|
}
|
|
207
|
+
/** Flags of {@link SubmoduleHeadMover.moveHead} (submodule.c's `SUBMODULE_MOVE_HEAD_*`). */
|
|
208
|
+
export interface SubmoduleMoveHeadFlags {
|
|
209
|
+
/** `SUBMODULE_MOVE_HEAD_DRY_RUN`: only check (`read-tree -n`), change nothing */
|
|
210
|
+
dryRun?: boolean;
|
|
211
|
+
/** `SUBMODULE_MOVE_HEAD_FORCE`: local changes are thrown away (`read-tree --reset`) */
|
|
212
|
+
force?: boolean;
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* submodule.c's `submodule_move_head` for the unpack-trees runs of a superproject
|
|
216
|
+
* (`checkout`, `switch`, `reset`, `restore`, `read-tree` with `--recurse-submodules`): the
|
|
217
|
+
* submodule at a path moved from one commit to another (`null` for none: a submodule coming
|
|
218
|
+
* into existence or going away) by its own `read-tree --recurse-submodules` (in-process, the
|
|
219
|
+
* nested submodules moved the same way), its HEAD then detached at the new commit, or, for
|
|
220
|
+
* one going away, its gitfile removed, its directory if empty and its `core.worktree` unset.
|
|
221
|
+
* Its `error:` lines collect in the output ({@link takeStderr}); git's deaths throw
|
|
222
|
+
* `SubmoduleCommandError`. Not a command of its own.
|
|
223
|
+
*
|
|
224
|
+
* @internal
|
|
225
|
+
*/
|
|
226
|
+
export declare class SubmoduleHeadMover extends SubmoduleCommandBase {
|
|
227
|
+
constructor(workingCopy: WorkingCopy, superPrefix: string);
|
|
228
|
+
call(): Promise<SubmoduleCommandResult>;
|
|
229
|
+
/** What was printed since the last call (git's immediate `error:` lines). */
|
|
230
|
+
takeStderr(): string;
|
|
231
|
+
/** `repo_read_gitmodules` again (after `.gitmodules` was checked out). */
|
|
232
|
+
reload(): void;
|
|
233
|
+
/** `submodule_from_ce` of a gitlink at `path`: `.gitmodules` names a submodule there. */
|
|
234
|
+
isSubmodule(path: string): Promise<boolean>;
|
|
235
|
+
/** git's `file_exists` (`lstat`) of a worktree path. */
|
|
236
|
+
exists(path: string): Promise<boolean>;
|
|
237
|
+
/** The kind of what `lstat` finds at a worktree path (`symlink` for a link). */
|
|
238
|
+
kind(path: string): Promise<string | undefined>;
|
|
239
|
+
/**
|
|
240
|
+
* A submodule path that is a symbolic link to a repository: git's stat follows it, finds the
|
|
241
|
+
* submodule populated and dies in `validate_submodule_path` before any change.
|
|
242
|
+
*/
|
|
243
|
+
validateLinked(path: string): Promise<void>;
|
|
244
|
+
/** `is_submodule_populated_gently` (with an error pointer: never dies). */
|
|
245
|
+
populated(path: string): Promise<boolean>;
|
|
246
|
+
/** Whether `<path>/.git` is a repository directory (not absorbed into the superproject). */
|
|
247
|
+
hasGitDirectory(path: string): Promise<boolean>;
|
|
248
|
+
/** `submodule_move_head`; false where git's returns an error (its lines in the output). */
|
|
249
|
+
moveHead(path: string, oldHead: string | null, newHead: string | null, flags?: SubmoduleMoveHeadFlags): Promise<boolean>;
|
|
250
|
+
/**
|
|
251
|
+
* `is_submodule_populated_gently`: `<path>/.git` names a repository. Without `gentle`
|
|
252
|
+
* (no error code pointer) the gitfile errors `read_gitfile_error_die` dies on are deaths.
|
|
253
|
+
*/
|
|
254
|
+
private populatedGently;
|
|
255
|
+
/** `submodule_has_dirty_index`: `git diff-index --quiet --cached HEAD` there fails. */
|
|
256
|
+
private hasDirtyIndex;
|
|
257
|
+
/**
|
|
258
|
+
* `submodule_uses_gitfile`: `<path>/.git` is a gitfile, and so is every populated nested
|
|
259
|
+
* submodule's (`submodule foreach --recursive test -f .git`).
|
|
260
|
+
*/
|
|
261
|
+
private usesGitfile;
|
|
262
|
+
/**
|
|
263
|
+
* dir.c's `connect_work_tree_and_git_dir(path, gitDir, 1)`: the gitfile and `core.worktree`,
|
|
264
|
+
* then the same for every nested submodule `.gitmodules` names and that is active
|
|
265
|
+
* (`connect_wt_gitdir_in_nested`), populated or not.
|
|
266
|
+
*/
|
|
267
|
+
private connectRecursively;
|
|
268
|
+
/**
|
|
269
|
+
* git's child `read-tree --super-prefix=<prefix><path>/ ...` in the submodule
|
|
270
|
+
* (`prepare_submodule_repo_env`: its own `.git`), `null` trees being the empty tree; its
|
|
271
|
+
* error lines go to the output. False when it failed.
|
|
272
|
+
*/
|
|
273
|
+
private readTreeIn;
|
|
274
|
+
/** `git update-ref HEAD --no-deref <id>` in the submodule. */
|
|
275
|
+
private detachHead;
|
|
276
|
+
}
|
|
182
277
|
/**
|
|
183
278
|
* `git submodule init [-q] [<path>...]`: each submodule of the index (matching the paths)
|
|
184
279
|
* registered in `.git/config` from `.gitmodules`: `submodule.<name>.active` unless already
|
|
@@ -372,4 +467,5 @@ export declare class SubmoduleForeachCommand extends SubmoduleCommandBase {
|
|
|
372
467
|
}
|
|
373
468
|
/** The environment with `GIT_PROTOCOL_FROM_USER=0` (git-submodule.sh exports it). */
|
|
374
469
|
export declare function notFromUser(environment: GitHostEnvironment): GitHostEnvironment;
|
|
470
|
+
export {};
|
|
375
471
|
//# sourceMappingURL=submodule-commands.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"submodule-commands.d.ts","sourceRoot":"","sources":["../../src/commands/submodule-commands.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAY,KAAK,QAAQ,
|
|
1
|
+
{"version":3,"file":"submodule-commands.d.ts","sourceRoot":"","sources":["../../src/commands/submodule-commands.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAY,KAAK,QAAQ,EAAkB,MAAM,uBAAuB,CAAC;AAEhF,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAE7F,OAAO,EAAE,KAAK,QAAQ,EAAY,MAAM,8BAA8B,CAAC;AAEvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAErF,OAAO,EAAE,WAAW,EAAiB,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAc/C,OAAO,EAYL,cAAc,EACd,KAAK,iBAAiB,EAUvB,MAAM,sBAAsB,CAAC;AAE9B,4FAA4F;AAC5F,MAAM,WAAW,qBAAqB;IACpC,oBAAoB;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,UAAU,CAAC,EAAE,M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AwB,GAAG,IAAI,CAIpD;IAED,4CAA4C;IAC5C,YAAY,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,CAIrC;IAEK,IAAI,IAAI,OAAO,CAAC,sBAAsB,CAAC,CAoD5C;IAED,gFAAgF;YAClE,UAAU;CAkCzB;AAOD,qFAAqF;AACrF,wBAAgB,WAAW,CAAC,WAAW,EAAE,kBAAkB,GAAG,kBAAkB,CAI/E"}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `git fetch --recurse-submodules` (submodule.c `fetch_submodules`,
|
|
3
|
+
* `calculate_changed_submodule_paths`, `collect_changed_submodules`, `get_next_submodule`,
|
|
4
|
+
* `fetch_finish`): after the superproject's fetch, which submodules are fetched, in git's
|
|
5
|
+
* order, with git's lines. The fetches themselves are the caller's (a `FetchCommand` in the
|
|
6
|
+
* submodule, given by {@link SubmoduleFetchOptions.runFetch}), so this module knows nothing
|
|
7
|
+
* of transports or credentials.
|
|
8
|
+
*
|
|
9
|
+
* Submodules are fetched one after another: git's `submodule.fetchJobs` / `-j` only change
|
|
10
|
+
* how many run at once, and with one job git's output is this order.
|
|
11
|
+
*/
|
|
12
|
+
import { type ObjectId } from "@statewalker/vcs-core";
|
|
13
|
+
import type { WorkingCopy } from "@statewalker/vcs-working-tree";
|
|
14
|
+
import { GitCommand } from "../git-command.js";
|
|
15
|
+
import type { FetchResult } from "../results/fetch-result.js";
|
|
16
|
+
/**
|
|
17
|
+
* How far a fetch recurses into submodules (git's `RECURSE_SUBMODULES_ON`, `_ON_DEMAND`,
|
|
18
|
+
* `_OFF`): every populated submodule, only those whose recorded commits the fetch brought
|
|
19
|
+
* changes to, or none.
|
|
20
|
+
*/
|
|
21
|
+
export type FetchRecurseSubmodules = "yes" | "on-demand" | "no";
|
|
22
|
+
/**
|
|
23
|
+
* git's `parse_fetch_recurse_submodules_arg`: a boolean, or `on-demand`; anything else dies
|
|
24
|
+
* `bad <key> argument: <value>`. A variable without a value is true.
|
|
25
|
+
*/
|
|
26
|
+
export declare function parseFetchRecurseSubmodules(key: string, value: string | undefined): FetchRecurseSubmodules;
|
|
27
|
+
/** One fetch {@link fetchSubmodules} asks for (git's child `git fetch`). */
|
|
28
|
+
export interface SubmoduleFetchTask {
|
|
29
|
+
/** The submodule's repository */
|
|
30
|
+
workingCopy: WorkingCopy;
|
|
31
|
+
/** `--recurse-submodules-default`: the child's own default */
|
|
32
|
+
defaultMode: "yes" | "on-demand";
|
|
33
|
+
/** `--submodule-prefix` of the child: the path its nested submodules are shown under */
|
|
34
|
+
prefix: string;
|
|
35
|
+
/** git runs the child with `--work-tree=.` (a submodule only the fetched history records) */
|
|
36
|
+
workTreeDot?: boolean;
|
|
37
|
+
/** For the fetch of missing commits: the remote and the commits named on its command line */
|
|
38
|
+
remote?: string;
|
|
39
|
+
commits?: ObjectId[];
|
|
40
|
+
}
|
|
41
|
+
/** What a submodule's fetch did: git's stderr text and whether it exited 0. */
|
|
42
|
+
export interface SubmoduleFetchRun {
|
|
43
|
+
text: string;
|
|
44
|
+
ok: boolean;
|
|
45
|
+
result?: FetchResult;
|
|
46
|
+
}
|
|
47
|
+
/** What {@link fetchSubmodules} needs from the superproject's fetch. */
|
|
48
|
+
export interface SubmoduleFetchOptions {
|
|
49
|
+
/** `config.recurse_submodules` (the command line, else the configuration); undefined: none */
|
|
50
|
+
commandLine?: FetchRecurseSubmodules;
|
|
51
|
+
/** `--recurse-submodules-default` (on-demand for a fetch run by hand) */
|
|
52
|
+
defaultMode: "yes" | "on-demand";
|
|
53
|
+
/** `--submodule-prefix` */
|
|
54
|
+
prefix: string;
|
|
55
|
+
/** `-q`: no `Fetching submodule` lines */
|
|
56
|
+
quiet: boolean;
|
|
57
|
+
/** Every ref's value before the fetch stored its refs (`ref_tips_before_fetch`) */
|
|
58
|
+
tipsBefore: readonly ObjectId[];
|
|
59
|
+
/** The ref map's new values (`ref_tips_after_fetch`) */
|
|
60
|
+
tipsAfter: readonly ObjectId[];
|
|
61
|
+
compatibility: "2.43" | "2.56";
|
|
62
|
+
/** Runs one child fetch */
|
|
63
|
+
runFetch(task: SubmoduleFetchTask): Promise<SubmoduleFetchRun>;
|
|
64
|
+
}
|
|
65
|
+
/** What the recursion printed (git's stderr), whether it failed, and each child's result. */
|
|
66
|
+
export interface SubmoduleFetchOutcome {
|
|
67
|
+
output: string;
|
|
68
|
+
failed: boolean;
|
|
69
|
+
/** The results by submodule path (the first fetch of each) */
|
|
70
|
+
results: Map<string, FetchResult>;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* The repository questions the recursion asks, as git's `the_repository` and the submodule
|
|
74
|
+
* repositories answer them.
|
|
75
|
+
*
|
|
76
|
+
* @internal
|
|
77
|
+
*/
|
|
78
|
+
export declare class SubmoduleFetchRepository extends GitCommand<never> {
|
|
79
|
+
call(): Promise<never>;
|
|
80
|
+
/** Every ref's value under `refs/` (`refs_for_each_ref`), symbolic refs resolved. */
|
|
81
|
+
refTips(): Promise<Map<string, ObjectId>>;
|
|
82
|
+
/** HEAD's full ref name (`refs/heads/x`), `HEAD` when detached, undefined when unreadable. */
|
|
83
|
+
headRef(): Promise<string | undefined>;
|
|
84
|
+
/** HEAD's commit, if any. */
|
|
85
|
+
head(): Promise<ObjectId | undefined>;
|
|
86
|
+
/** The commit an id names through tags, undefined for anything else. */
|
|
87
|
+
peelToCommit(id: ObjectId): Promise<ObjectId | undefined>;
|
|
88
|
+
/** The type of a non-commit object here, undefined when absent (or a commit). */
|
|
89
|
+
objectTypeOf(id: ObjectId): Promise<"tag" | "tree" | "blob" | undefined>;
|
|
90
|
+
hasCommit(id: ObjectId): Promise<boolean>;
|
|
91
|
+
private commit;
|
|
92
|
+
/**
|
|
93
|
+
* The commits `include --not exclude` lists, in the order git's default (limited) revision
|
|
94
|
+
* walk returns them: commits popped newest first by committer date, those an excluded
|
|
95
|
+
* commit reaches dropped.
|
|
96
|
+
*/
|
|
97
|
+
walk(include: readonly ObjectId[], exclude: readonly ObjectId[]): Promise<ObjectId[]>;
|
|
98
|
+
/**
|
|
99
|
+
* The gitlinks a commit's combined diff against its parents records (`diff_tree_combined`):
|
|
100
|
+
* none for a root commit; for a merge, the paths that differ from every parent.
|
|
101
|
+
*/
|
|
102
|
+
changedGitlinks(id: ObjectId): Promise<Map<string, ObjectId>>;
|
|
103
|
+
private entries;
|
|
104
|
+
private diffGitlinks;
|
|
105
|
+
/** Whether every commit exists here and a ref (or HEAD) reaches it (`rev-list --not --all`). */
|
|
106
|
+
reachesAll(commits: readonly ObjectId[]): Promise<boolean>;
|
|
107
|
+
/** Whether every commit exists here and one of `tips` reaches it. */
|
|
108
|
+
reachesAllFrom(commits: readonly ObjectId[], tips: readonly ObjectId[]): Promise<boolean>;
|
|
109
|
+
/** The values of the refs below `prefix` (`--remotes`, `--remotes=<name>`). */
|
|
110
|
+
refTipsUnder(prefix: string): Promise<ObjectId[]>;
|
|
111
|
+
/** git's DEFAULT_ABBREV abbreviation of an id of this repository. */
|
|
112
|
+
abbreviate(id: ObjectId): Promise<string>;
|
|
113
|
+
/** The gitlinks of the index, in index order (`cache_nr` loop). */
|
|
114
|
+
indexGitlinks(): Promise<string[]>;
|
|
115
|
+
/** `is_submodule_populated_gently`: `<path>/.git` names a repository. */
|
|
116
|
+
populated(path: string): Promise<boolean>;
|
|
117
|
+
/** `is_empty_dir(<worktree>/<path>/)`: a directory without entries (missing: not empty). */
|
|
118
|
+
emptyDirectory(path: string): Promise<boolean>;
|
|
119
|
+
/** Whether `<git dir>/modules/` exists and holds something (`repo_has_absorbed_submodules`). */
|
|
120
|
+
hasAbsorbedSubmodules(): Promise<boolean>;
|
|
121
|
+
/** The submodule's repository (`repo_submodule_init`: `<path>/.git`, else `modules/<name>`). */
|
|
122
|
+
open(path: string, name: string | undefined): Promise<WorkingCopy | undefined>;
|
|
123
|
+
/** Whether the repository has a worktree (a bare one's working copy refuses to give one). */
|
|
124
|
+
hasWorktree(): boolean;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* submodule.c's `fetch_submodules`: the submodules to fetch, each fetched (see the module's
|
|
128
|
+
* notes), and git's lines: `Fetching submodule <prefix><path>` before each fetch of the
|
|
129
|
+
* index's submodules, `... at commit <abbrev>` for one only the fetched history records,
|
|
130
|
+
* `Could not access submodule ...`, a second fetch of the recorded commits still missing
|
|
131
|
+
* (`<remote> <commit>...`), and `Errors during submodule fetch:` with each failed one.
|
|
132
|
+
*
|
|
133
|
+
* @throws GitApiError where git dies (a symlinked submodule path, a bad
|
|
134
|
+
* `submodule.<name>.fetchRecurseSubmodules`)
|
|
135
|
+
*/
|
|
136
|
+
export declare function fetchSubmodules(workingCopy: WorkingCopy, options: SubmoduleFetchOptions): Promise<SubmoduleFetchOutcome>;
|
|
137
|
+
/**
|
|
138
|
+
* submodule.c's `find_unpushed_submodules`: the paths (sorted) of the submodules whose
|
|
139
|
+
* commits recorded by `commits --not --remotes=<remote>` are in the submodule but on none of
|
|
140
|
+
* its remote-tracking refs (a submodule with none is left alone, as one lacking the commits).
|
|
141
|
+
* `warn` gets git's collision warnings.
|
|
142
|
+
*/
|
|
143
|
+
export declare function findUnpushedSubmodules(workingCopy: WorkingCopy, commits: readonly ObjectId[], remoteName: string, warn: (line: string) => void): Promise<string[]>;
|
|
144
|
+
/**
|
|
145
|
+
* submodule.c's `submodule_touches_in_range`: how many submodules the commits `include --not
|
|
146
|
+
* exclude` record new commits for (0 when `.gitmodules` names none).
|
|
147
|
+
*/
|
|
148
|
+
export declare function submoduleTouchesInRange(workingCopy: WorkingCopy, exclude: ObjectId | undefined, include: ObjectId): Promise<number>;
|
|
149
|
+
//# sourceMappingURL=submodule-fetch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"submodule-fetch.d.ts","sourceRoot":"","sources":["../../src/commands/submodule-fetch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAY,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEhE,O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AAE,MAAM,KAAK,IAAI,GAC3B,OAAO,CAAC,MAAM,EAAE,CAAC,CA6BnB;AAiCD;;;GAGG;AACH,wBAAsB,uBAAuB,CAC3C,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,QAAQ,GAAG,SAAS,EAC7B,OAAO,EAAE,QAAQ,GAChB,OAAO,CAAC,MAAM,CAAC,CAgBjB"}
|
|
@@ -82,6 +82,14 @@ export interface GitmodulesParseOptions {
|
|
|
82
82
|
export declare class Gitmodules {
|
|
83
83
|
/** git's `warning:` lines, in order */
|
|
84
84
|
readonly warnings: string[];
|
|
85
|
+
/**
|
|
86
|
+
* The variables that name no submodule (`fetch.recurseSubmodules`, `submodule.fetchJobs`),
|
|
87
|
+
* in the file's order, as `fetch_config_from_gitmodules` reads them
|
|
88
|
+
*/
|
|
89
|
+
readonly settings: {
|
|
90
|
+
key: string;
|
|
91
|
+
value: string | undefined;
|
|
92
|
+
}[];
|
|
85
93
|
private readonly names;
|
|
86
94
|
private readonly paths;
|
|
87
95
|
/** The submodules, in the order their names first appear. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"submodule-model.d.ts","sourceRoot":"","sources":["../../src/commands/submodule-model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAY,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAGL,oBAAoB,EAErB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EAAE,QAAQ,EAAiB,MAAM,8BAA8B,CAAC;AAC5E,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAEhF,OAAO,EAAE,WAAW,EAAsB,MAAM,oBAAoB,CAAC;AAErE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAK9D,OAAO,EAAyB,KAAK,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAExF,wGAAwG;AACxG,MAAM,MAAM,mBAAmB,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,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* unpack-trees' submodule support (`--recurse-submodules`, `submodule.recurse`): the checks
|
|
3
|
+
* `check_submodule_move_head` makes in `verify_uptodate_1`, `verify_absent_1` and
|
|
4
|
+
* `merged_entry`, and the moves entry.c's `checkout_entry` and `unlink_entry` make in
|
|
5
|
+
* `check_updates`, for the commands that switch a superproject's index and worktree
|
|
6
|
+
* (checkout, switch, reset, read-tree, restore).
|
|
7
|
+
*/
|
|
8
|
+
import { type ObjectId } from "@statewalker/vcs-core";
|
|
9
|
+
import type { WorkingCopy, Worktree } from "@statewalker/vcs-working-tree";
|
|
10
|
+
/** An index or tree entry as the checks see it. */
|
|
11
|
+
interface Entry {
|
|
12
|
+
objectId: ObjectId;
|
|
13
|
+
mode: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Whether a command recurses into submodules: `--[no-]recurse-submodules` when given, else
|
|
17
|
+
* `submodule.recurse` (git's `config_update_recurse_submodules`).
|
|
18
|
+
*/
|
|
19
|
+
export declare function recursesIntoSubmodules(workingCopy: WorkingCopy, given: boolean | undefined): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* One unpack-trees run's submodule handling. The checks run before anything is written and
|
|
22
|
+
* record what they refuse ({@link rejected}, git's `ERROR_WOULD_LOSE_SUBMODULE`) with the
|
|
23
|
+
* lines the submodules' own read-tree printed ({@link lines}); the moves run with the
|
|
24
|
+
* worktree update, removals first, then (`.gitmodules` read again) the checkouts.
|
|
25
|
+
*/
|
|
26
|
+
export declare class SubmoduleUnpack {
|
|
27
|
+
private readonly workingCopy;
|
|
28
|
+
/** unpack-trees' `o->reset`: the checks pass `SUBMODULE_MOVE_HEAD_FORCE` */
|
|
29
|
+
readonly reset: boolean;
|
|
30
|
+
/** git's `--super-prefix` of the run (its plain messages name paths with it) */
|
|
31
|
+
readonly superPrefix: string;
|
|
32
|
+
/** The lines printed while checking or moving (the child read-trees' errors, git's `error:`) */
|
|
33
|
+
readonly lines: string[];
|
|
34
|
+
/** The paths refused as `Cannot update submodule` (ERROR_WOULD_LOSE_SUBMODULE) */
|
|
35
|
+
readonly rejected: string[];
|
|
36
|
+
private moverLoad?;
|
|
37
|
+
private loadedMover?;
|
|
38
|
+
/** submodule-commands.ts, loaded when first needed (it imports the commands this serves) */
|
|
39
|
+
private commands?;
|
|
40
|
+
private constructor();
|
|
41
|
+
/**
|
|
42
|
+
* The run's submodule handling, or undefined when the command does not recurse. The
|
|
43
|
+
* `.gitmodules` the run starts with is read here, before anything changes it (git reads it
|
|
44
|
+
* before its removals: `load_gitmodules_file`).
|
|
45
|
+
*/
|
|
46
|
+
static start(workingCopy: WorkingCopy, options: {
|
|
47
|
+
recurse: boolean;
|
|
48
|
+
reset: boolean;
|
|
49
|
+
superPrefix?: string;
|
|
50
|
+
}): Promise<SubmoduleUnpack | undefined>;
|
|
51
|
+
private m;
|
|
52
|
+
/** `submodule_from_ce`: a gitlink `.gitmodules` (as read now) names. */
|
|
53
|
+
isSubmodule(path: string, entry: Entry | undefined): Promise<boolean>;
|
|
54
|
+
/** `file_exists`. */
|
|
55
|
+
exists(path: string): Promise<boolean>;
|
|
56
|
+
/** Whether the submodule at `path` keeps its repository in its worktree (`.git` directory). */
|
|
57
|
+
hasGitDirectory(path: string): Promise<boolean>;
|
|
58
|
+
/**
|
|
59
|
+
* `check_submodule_move_head` (a dry run): whether the submodule at `path` could move from
|
|
60
|
+
* `oldHead` to `newHead`; a refusal is recorded. True when refused.
|
|
61
|
+
*/
|
|
62
|
+
refuses(path: string, oldHead: string | null, newHead: string | null): Promise<boolean>;
|
|
63
|
+
/**
|
|
64
|
+
* `verify_uptodate_1` of the index entry `entry` at `path`: undefined when it is not a
|
|
65
|
+
* submodule there (the file checks apply), else whether it is refused (its HEAD cannot move
|
|
66
|
+
* to the recorded commit: local changes, a dirty index).
|
|
67
|
+
*/
|
|
68
|
+
notUptodate(path: string, entry: Entry): Promise<boolean | undefined>;
|
|
69
|
+
/**
|
|
70
|
+
* `merged_entry`'s check of the entry `next` replacing `old` (none for a new path): the
|
|
71
|
+
* submodule there must be able to move. True when refused.
|
|
72
|
+
*/
|
|
73
|
+
mergedRefuses(path: string, old: Entry | undefined, next: Entry): Promise<boolean>;
|
|
74
|
+
/**
|
|
75
|
+
* `verify_absent_1` of a new entry `next` at `path` (with an update, without
|
|
76
|
+
* `UNPACK_RESET_OVERWRITE_UNTRACKED`): undefined when not a submodule (the untracked-file
|
|
77
|
+
* checks apply), else whether it is refused.
|
|
78
|
+
*/
|
|
79
|
+
absentRefuses(path: string, next: Entry): Promise<boolean | undefined>;
|
|
80
|
+
/** `load_gitmodules_file` after `.gitmodules` was checked out. */
|
|
81
|
+
reload(): void;
|
|
82
|
+
/**
|
|
83
|
+
* `unlink_entry` of a gitlink `entry` leaving the index: the submodule moved to nothing
|
|
84
|
+
* (forced), then its directory removed when empty.
|
|
85
|
+
*/
|
|
86
|
+
unlink(worktree: Worktree, path: string, entry: Entry): Promise<void>;
|
|
87
|
+
/** `unlink_entry`'s move of a submodule leaving the index (forced), without the rmdir. */
|
|
88
|
+
moveAway(path: string, entry: Entry): Promise<void>;
|
|
89
|
+
/**
|
|
90
|
+
* `checkout_entry` of the gitlink `entry` (check_updates' `state.force`): an existing
|
|
91
|
+
* submodule moved to its commit (forced), a missing or unpopulated one checked out there.
|
|
92
|
+
* False when the move failed.
|
|
93
|
+
*/
|
|
94
|
+
checkout(worktree: Worktree, path: string, entry: Entry): Promise<boolean>;
|
|
95
|
+
/**
|
|
96
|
+
* The refusal git prints for the recorded submodules, in porcelain form (`Cannot update
|
|
97
|
+
* submodule:` and the list) or plain (`Submodule '<path>' cannot checkout new HEAD.`).
|
|
98
|
+
*/
|
|
99
|
+
refusalLines(plain: boolean): string[];
|
|
100
|
+
/** The lines printed so far, as one text (each line ended). */
|
|
101
|
+
printed(): string;
|
|
102
|
+
/**
|
|
103
|
+
* A plain (read-tree, reset) refusal of `path`: what the submodules printed, then
|
|
104
|
+
* unpack-trees' own lines (`not uptodate` too when `verify_uptodate` refused it).
|
|
105
|
+
*/
|
|
106
|
+
plainRefusal(path: string, notUptodate: boolean): string;
|
|
107
|
+
/**
|
|
108
|
+
* A worktree file or link replacing the submodule at `path`: refused where its repository
|
|
109
|
+
* is a `.git` directory in it (a deliberate divergence: git's `checkout_entry` removes the
|
|
110
|
+
* whole directory, the submodule's only copy of its history included); else the directory
|
|
111
|
+
* goes, untracked files and all, as git's `remove_subtree`. True when refused.
|
|
112
|
+
*/
|
|
113
|
+
fileReplacesRefuses(path: string, old: Entry): Promise<boolean>;
|
|
114
|
+
/** git's `remove_subtree` of a submodule's directory a file replaces. */
|
|
115
|
+
removeForFile(worktree: Worktree, path: string, old: Entry): Promise<void>;
|
|
116
|
+
/** Runs a move, its printed lines kept; git's deaths propagate. */
|
|
117
|
+
private run;
|
|
118
|
+
}
|
|
119
|
+
export {};
|
|
120
|
+
//# sourceMappingURL=submodule-unpack.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"submodule-unpack.d.ts","sourceRoot":"","sources":["../../src/commands/submodule-unpack.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAY,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAM3E,mDAAmD;AACnD,UAAU,KAAK;IACb,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,OAAO,GAAG,SAAS,GACzB,OAAO,CAIT;AAED;;;;;GAKG;AACH,qBAAa,eAAe;IAYxB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,4EAA4E;IAC5E,QAAQ,CAAC,KAAK,EAAE,OAAO;IACvB,gFAAgF;IAChF,QAAQ,CAAC,WAAW,EAAE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AO,CAAC,CAGvF;IAED;;;;OAIG;IACG,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,GAAG,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC,CAG3E;IAED,kEAAkE;IAClE,MAAM,IAAI,IAAI,CAEb;IAED;;;OAGG;IACG,MAAM,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAK1E;IAED,0FAA0F;IACpF,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAGxD;IAED;;;;OAIG;IACG,QAAQ,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAuB/E;IAED;;;OAGG;IACH,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,EAAE,CAUrC;IAED,+DAA+D;IAC/D,OAAO,IAAI,MAAM,CAEhB;IAED;;;OAGG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,GAAG,MAAM,CAMvD;IAED;;;;;OAKG;IACG,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAKpE;IAED,yEAAyE;IACnE,aAAa,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAK/E;IAED,mEAAmE;YACrD,GAAG;CAclB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Credentials, type GitTransportRegistry } from "@statewalker/vcs-transport";
|
|
1
|
+
import { type Credentials, type GitTransportRegistry, type HttpCredentialHelper } from "@statewalker/vcs-transport";
|
|
2
2
|
import { type CredentialsForUrl, type HeadersForUrl, type SubmoduleAuthFor } from "./submodule-auth.js";
|
|
3
3
|
import { SubmoduleCommandBase, type SubmoduleCommandResult } from "./submodule-commands.js";
|
|
4
4
|
/** The update strategies `submodule update` takes on its command line. */
|
|
@@ -43,6 +43,10 @@ export declare class SubmoduleUpdateCommand extends SubmoduleCommandBase {
|
|
|
43
43
|
private recommendShallow?;
|
|
44
44
|
private references;
|
|
45
45
|
private requireInit;
|
|
46
|
+
/** `--filter=<spec>` of the clones */
|
|
47
|
+
private filter?;
|
|
48
|
+
/** `--[no-]single-branch` of the clones */
|
|
49
|
+
private singleBranch?;
|
|
46
50
|
private transports?;
|
|
47
51
|
private credentials?;
|
|
48
52
|
private headers?;
|
|
@@ -52,6 +56,8 @@ export declare class SubmoduleUpdateCommand extends SubmoduleCommandBase {
|
|
|
52
56
|
/** Set once at the top superproject, handed to nested updates unchanged */
|
|
53
57
|
private authPolicy?;
|
|
54
58
|
private timeout?;
|
|
59
|
+
private credentialHelper?;
|
|
60
|
+
private warningCallback?;
|
|
55
61
|
/** A path (pathspec element) limiting the submodules; uninitialized ones are then reported. */
|
|
56
62
|
addPath(path: string): this;
|
|
57
63
|
/** `--init`: `submodule init` the submodules first. */
|
|
@@ -75,6 +81,10 @@ export declare class SubmoduleUpdateCommand extends SubmoduleCommandBase {
|
|
|
75
81
|
* by default it does.
|
|
76
82
|
*/
|
|
77
83
|
setRecommendShallow(recommend: boolean): this;
|
|
84
|
+
/** `--filter=<spec>`: partial clones of the submodules (`CloneCommand.setFilter`). */
|
|
85
|
+
setFilter(spec: string | undefined): this;
|
|
86
|
+
/** `--[no-]single-branch`: how the submodules are cloned (`CloneCommand.setSingleBranch`). */
|
|
87
|
+
setSingleBranch(singleBranch: boolean | undefined): this;
|
|
78
88
|
/** `--reference <repository>`: borrow objects in clones. */
|
|
79
89
|
addReference(reference: string): this;
|
|
80
90
|
/** The transports clones and fetches reach non-local URLs through. */
|
|
@@ -116,6 +126,16 @@ export declare class SubmoduleUpdateCommand extends SubmoduleCommandBase {
|
|
|
116
126
|
private guardedTransports;
|
|
117
127
|
/** The policy: inherited, else built from the setters and the superproject's remote. */
|
|
118
128
|
private auth;
|
|
129
|
+
/**
|
|
130
|
+
* A credential helper, as git's `credential.helper` read by its child clones and fetches:
|
|
131
|
+
* asked with each submodule's own URL when its server answers 401 (so it decides per host,
|
|
132
|
+
* at any depth), told when the credentials worked or were refused. Unlike
|
|
133
|
+
* {@link setCredentials}, its answer for one host never goes to another: the client asks
|
|
134
|
+
* it per URL, and the guarded transports drop it on a redirect to another origin.
|
|
135
|
+
*/
|
|
136
|
+
setCredentialHelper(helper: HttpCredentialHelper): this;
|
|
137
|
+
/** Receives the `warning:` lines of the clones' and fetches' HTTP clients. */
|
|
138
|
+
setWarningCallback(callback: (line: string) => void): this;
|
|
119
139
|
/** The timeout of clones and fetches, in milliseconds. */
|
|
120
140
|
setTimeout(timeout: number): this;
|
|
121
141
|
call(): Promise<SubmoduleCommandResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"submodule-update-command.d.ts","sourceRoot":"","sources":["../../src/commands/submodule-update-command.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,oBAAoB,EAC1B,MAAM,4BAA4B,CAAC;AAiBpC,OAAO,EACL,KAAK,iBAAiB,EAGtB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EAEtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAGL,oBAAoB,EAEpB,KAAK,sBAAsB,EAG5B,MAAM,yBAAyB,CAAC;AAcjC,0EAA0E;AAC1E,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,OAAO,GAAG,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"submodule-update-command.d.ts","sourceRoot":"","sources":["../../src/commands/submodule-update-command.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,oBAAoB,EACzB,KAAK,oBAAo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yBxB,wFAAwF;YAC1E,OAAO;CAqCtB;AAED;;;;;;;;;;;;;GAaG;AACH,qBAAa,sBAAuB,SAAQ,oBAAoB;IAC9D,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IACtC,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,SAAS,CAAS;IAE1B,yDAAyD;IACzD,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAI1B;IAED,uEAAuE;IACvE,SAAS,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAI/B;IAED,4CAA4C;IAC5C,YAAY,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,CAIrC;IAEK,IAAI,IAAI,OAAO,CAAC,sBAAsB,CAAC,CAM5C;YAEa,SAAS;IA8CvB,4CAA4C;YAC9B,KAAK;CASpB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* git's subtree shift (match-trees.c), which `-s subtree` and `-X subtree[=<path>]` apply to
|
|
3
|
+
* a merge's other side and its base before merge-ort reads them: a tree that matches a
|
|
4
|
+
* subdirectory of ours is shifted down into it (ours' tree with that directory replaced),
|
|
5
|
+
* a tree whose subdirectory matches ours is shifted up to it.
|
|
6
|
+
*
|
|
7
|
+
* ```ts
|
|
8
|
+
* const shifted = await shiftTree(trees, oursTree, theirsTree); // -s subtree
|
|
9
|
+
* const byPath = await shiftTreeBy(trees, oursTree, theirsTree, "git-gui"); // -X subtree=git-gui
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* Trees are given by id, `undefined` for the empty tree; a shift down stores the spliced
|
|
13
|
+
* trees, as git writes them.
|
|
14
|
+
*/
|
|
15
|
+
import type { ObjectId } from "@statewalker/vcs-core";
|
|
16
|
+
import type { CommandTrees } from "../git-command.js";
|
|
17
|
+
/**
|
|
18
|
+
* match-trees.c's shift_tree: `two` shifted to match the shape of `one` (`-s subtree`,
|
|
19
|
+
* `-X subtree`), as the id of the tree merge-ort then reads.
|
|
20
|
+
*/
|
|
21
|
+
export declare function shiftTree(trees: CommandTrees, one: ObjectId | undefined, two: ObjectId | undefined, emptyTree: () => Promise<ObjectId>, depthLimit?: number): Promise<ObjectId | undefined>;
|
|
22
|
+
/**
|
|
23
|
+
* match-trees.c's shift_tree_by: `two` shifted by `prefix` (`-X subtree=<path>`), down when
|
|
24
|
+
* `one` holds a directory there (and that matches better), up when `two` does.
|
|
25
|
+
*/
|
|
26
|
+
export declare function shiftTreeBy(trees: CommandTrees, one: ObjectId | undefined, two: ObjectId | undefined, prefix: string, emptyTree: () => Promise<ObjectId>): Promise<ObjectId | undefined>;
|
|
27
|
+
//# sourceMappingURL=subtree-shift.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subtree-shift.d.ts","sourceRoot":"","sources":["../../src/commands/subtree-shift.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAa,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AA4ItD;;;GAGG;AACH,wBAAsB,SAAS,CAC7B,KAAK,EAAE,YAAY,EACnB,GAAG,EAAE,QAAQ,GAAG,SAAS,EACzB,GAAG,EAAE,QAAQ,GAAG,SAAS,EACzB,SAAS,EAAE,MAAM,OAAO,CAAC,QAAQ,CAAC,EAClC,UAAU,SAAI,GACb,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC,CAe/B;AAED;;;GAGG;AACH,wBAAsB,WAAW,CAC/B,KAAK,EAAE,YAAY,EACnB,GAAG,EAAE,QAAQ,GAAG,SAAS,EACzB,GAAG,EAAE,QAAQ,GAAG,SAAS,EACzB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,OAAO,CAAC,QAAQ,CAAC,GACjC,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC,CAoB/B"}
|