@statewalker/vcs-commands 0.5.0 → 0.7.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 +123 -8
- package/dist/commands/add-command.d.ts +265 -34
- package/dist/commands/add-command.d.ts.map +1 -1
- package/dist/commands/add-patch/add-interactive.d.ts +46 -0
- package/dist/commands/add-patch/add-interactive.d.ts.map +1 -0
- package/dist/commands/add-patch/add-patch.d.ts +139 -0
- package/dist/commands/add-patch/add-patch.d.ts.map +1 -0
- package/dist/commands/add-patch/index.d.ts +6 -0
- package/dist/commands/add-patch/index.d.ts.map +1 -0
- package/dist/commands/add-patch/patch-backend.d.ts +80 -0
- package/dist/commands/add-patch/patch-backend.d.ts.map +1 -0
- package/dist/commands/add-patch/patch-modes.d.ts +71 -0
- package/dist/commands/add-patch/patch-modes.d.ts.map +1 -0
- package/dist/commands/add-patch/patch-session.d.ts +49 -0
- package/dist/commands/add-patch/patch-session.d.ts.map +1 -0
- package/dist/commands/am/am-command.d.ts +175 -0
- package/dist/commands/am/am-command.d.ts.map +1 -0
- package/dist/commands/am/index.d.ts +3 -0
- package/dist/commands/am/index.d.ts.map +1 -0
- package/dist/commands/am/mailinfo.d.ts +58 -0
- package/dist/commands/am/mailinfo.d.ts.map +1 -0
- package/dist/commands/am/patch-format.d.ts +24 -0
- package/dist/commands/am/patch-format.d.ts.map +1 -0
- package/dist/commands/apply/apply-command.d.ts +153 -0
- package/dist/commands/apply/apply-command.d.ts.map +1 -0
- package/dist/commands/apply/apply-engine.d.ts +195 -0
- package/dist/commands/apply/apply-engine.d.ts.map +1 -0
- package/dist/commands/apply/apply-parse.d.ts +86 -0
- package/dist/commands/apply/apply-parse.d.ts.map +1 -0
- package/dist/commands/apply/apply-types.d.ts +70 -0
- package/dist/commands/apply/apply-types.d.ts.map +1 -0
- package/dist/commands/apply/index.d.ts +6 -0
- package/dist/commands/apply/index.d.ts.map +1 -0
- package/dist/commands/apply/latin1.d.ts +32 -0
- package/dist/commands/apply/latin1.d.ts.map +1 -0
- package/dist/commands/apply/whitespace.d.ts +58 -0
- package/dist/commands/apply/whitespace.d.ts.map +1 -0
- package/dist/commands/attributes-source.d.ts +26 -0
- package/dist/commands/attributes-source.d.ts.map +1 -0
- package/dist/commands/backfill-command.d.ts +110 -0
- package/dist/commands/backfill-command.d.ts.map +1 -0
- package/dist/commands/bisect/bisect-checkout.d.ts +64 -0
- package/dist/commands/bisect/bisect-checkout.d.ts.map +1 -0
- package/dist/commands/bisect/bisect-command.d.ts +201 -0
- package/dist/commands/bisect/bisect-command.d.ts.map +1 -0
- package/dist/commands/bisect/bisect-engine.d.ts +219 -0
- package/dist/commands/bisect/bisect-engine.d.ts.map +1 -0
- package/dist/commands/bisect/bisect-graph.d.ts +127 -0
- package/dist/commands/bisect/bisect-graph.d.ts.map +1 -0
- package/dist/commands/bisect/bisect-quote.d.ts +27 -0
- package/dist/commands/bisect/bisect-quote.d.ts.map +1 -0
- package/dist/commands/bisect/index.d.ts +5 -0
- package/dist/commands/bisect/index.d.ts.map +1 -0
- package/dist/commands/blame-command.d.ts +122 -131
- package/dist/commands/blame-command.d.ts.map +1 -1
- package/dist/commands/branch-command.d.ts +52 -2
- package/dist/commands/branch-command.d.ts.map +1 -1
- package/dist/commands/branch-tracking.d.ts +98 -0
- package/dist/commands/branch-tracking.d.ts.map +1 -0
- package/dist/commands/checkout-command.d.ts +300 -18
- package/dist/commands/checkout-command.d.ts.map +1 -1
- package/dist/commands/checkout-paths.d.ts +124 -0
- package/dist/commands/checkout-paths.d.ts.map +1 -0
- package/dist/commands/cherry-pick-command.d.ts +50 -42
- package/dist/commands/cherry-pick-command.d.ts.map +1 -1
- package/dist/commands/clean-command.d.ts +49 -16
- package/dist/commands/clean-command.d.ts.map +1 -1
- package/dist/commands/clone-command.d.ts +134 -0
- package/dist/commands/clone-command.d.ts.map +1 -1
- package/dist/commands/comment-char-config.d.ts +35 -0
- package/dist/commands/comment-char-config.d.ts.map +1 -0
- package/dist/commands/commit-command.d.ts +311 -17
- package/dist/commands/commit-command.d.ts.map +1 -1
- package/dist/commands/core-config.d.ts +78 -1
- package/dist/commands/core-config.d.ts.map +1 -1
- package/dist/commands/date-format.d.ts +58 -0
- package/dist/commands/date-format.d.ts.map +1 -0
- package/dist/commands/default-branch.d.ts +70 -0
- package/dist/commands/default-branch.d.ts.map +1 -0
- package/dist/commands/describe-command.d.ts.map +1 -1
- package/dist/commands/diff-command.d.ts +377 -30
- package/dist/commands/diff-command.d.ts.map +1 -1
- package/dist/commands/diff-textconv.d.ts +40 -0
- package/dist/commands/diff-textconv.d.ts.map +1 -0
- package/dist/commands/fetch-command.d.ts +149 -10
- package/dist/commands/fetch-command.d.ts.map +1 -1
- package/dist/commands/format-patch-command.d.ts +164 -0
- package/dist/commands/format-patch-command.d.ts.map +1 -0
- package/dist/commands/fsck/fetch-fsck.d.ts +60 -0
- package/dist/commands/fsck/fetch-fsck.d.ts.map +1 -0
- package/dist/commands/fsck/fsck-command.d.ts +227 -0
- package/dist/commands/fsck/fsck-command.d.ts.map +1 -0
- package/dist/commands/fsck/fsck-loose.d.ts +71 -0
- package/dist/commands/fsck/fsck-loose.d.ts.map +1 -0
- package/dist/commands/fsck/fsck-msg-ids.d.ts +122 -0
- package/dist/commands/fsck/fsck-msg-ids.d.ts.map +1 -0
- package/dist/commands/fsck/fsck-object-checks.d.ts +159 -0
- package/dist/commands/fsck/fsck-object-checks.d.ts.map +1 -0
- package/dist/commands/fsck/fsck-object-table.d.ts +140 -0
- package/dist/commands/fsck/fsck-object-table.d.ts.map +1 -0
- package/dist/commands/fsck/fsck-pack.d.ts +122 -0
- package/dist/commands/fsck/fsck-pack.d.ts.map +1 -0
- package/dist/commands/fsck/index.d.ts +6 -0
- package/dist/commands/fsck/index.d.ts.map +1 -0
- package/dist/commands/fsck/verify-pack-command.d.ts +81 -0
- package/dist/commands/fsck/verify-pack-command.d.ts.map +1 -0
- package/dist/commands/gc-command.d.ts +106 -39
- package/dist/commands/gc-command.d.ts.map +1 -1
- package/dist/commands/git-date.d.ts +2 -0
- package/dist/commands/git-date.d.ts.map +1 -0
- package/dist/commands/git-describe.d.ts +67 -0
- package/dist/commands/git-describe.d.ts.map +1 -0
- package/dist/commands/git-hooks.d.ts +424 -0
- package/dist/commands/git-hooks.d.ts.map +1 -0
- package/dist/commands/git-ident.d.ts +128 -0
- package/dist/commands/git-ident.d.ts.map +1 -0
- package/dist/commands/hook-command.d.ts +96 -0
- package/dist/commands/hook-command.d.ts.map +1 -0
- package/dist/commands/index-adder.d.ts +233 -0
- package/dist/commands/index-adder.d.ts.map +1 -0
- package/dist/commands/index-host.d.ts +86 -0
- package/dist/commands/index-host.d.ts.map +1 -0
- package/dist/commands/index.d.ts +56 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +3 -2
- package/dist/commands/init-command.d.ts +62 -4
- package/dist/commands/init-command.d.ts.map +1 -1
- package/dist/commands/legacy-remotes.d.ts +55 -0
- package/dist/commands/legacy-remotes.d.ts.map +1 -0
- package/dist/commands/local-clone.d.ts +60 -0
- package/dist/commands/local-clone.d.ts.map +1 -0
- package/dist/commands/local-transport.d.ts +117 -0
- package/dist/commands/local-transport.d.ts.map +1 -0
- package/dist/commands/log-command.d.ts +216 -24
- package/dist/commands/log-command.d.ts.map +1 -1
- package/dist/commands/log-graph.d.ts +120 -0
- package/dist/commands/log-graph.d.ts.map +1 -0
- package/dist/commands/log-output.d.ts +323 -0
- package/dist/commands/log-output.d.ts.map +1 -0
- package/dist/commands/ls-remote-command.d.ts +23 -7
- package/dist/commands/ls-remote-command.d.ts.map +1 -1
- package/dist/commands/mailmap.d.ts +31 -0
- package/dist/commands/mailmap.d.ts.map +1 -0
- package/dist/commands/merge-bases.d.ts +85 -0
- package/dist/commands/merge-bases.d.ts.map +1 -0
- package/dist/commands/merge-command.d.ts +221 -74
- package/dist/commands/merge-command.d.ts.map +1 -1
- package/dist/commands/merge-config.d.ts +13 -0
- package/dist/commands/merge-config.d.ts.map +1 -0
- package/dist/commands/merge-drivers.d.ts +130 -0
- package/dist/commands/merge-drivers.d.ts.map +1 -0
- package/dist/commands/merge-support.d.ts +260 -0
- package/dist/commands/merge-support.d.ts.map +1 -0
- package/dist/commands/message-cleanup.d.ts +86 -0
- package/dist/commands/message-cleanup.d.ts.map +1 -0
- package/dist/commands/mv-command.d.ts +94 -0
- package/dist/commands/mv-command.d.ts.map +1 -0
- package/dist/commands/notes-command.d.ts +256 -0
- package/dist/commands/notes-command.d.ts.map +1 -0
- package/dist/commands/notes-commands.d.ts +41 -0
- package/dist/commands/notes-commands.d.ts.map +1 -0
- package/dist/commands/notes-merge-command.d.ts +105 -0
- package/dist/commands/notes-merge-command.d.ts.map +1 -0
- package/dist/commands/notes-support.d.ts +125 -0
- package/dist/commands/notes-support.d.ts.map +1 -0
- package/dist/commands/notes-tree.d.ts +116 -0
- package/dist/commands/notes-tree.d.ts.map +1 -0
- package/dist/commands/object-id-input.d.ts +20 -0
- package/dist/commands/object-id-input.d.ts.map +1 -0
- package/dist/commands/octopus-merge.d.ts +59 -0
- package/dist/commands/octopus-merge.d.ts.map +1 -0
- package/dist/commands/ort-merge.d.ts +126 -0
- package/dist/commands/ort-merge.d.ts.map +1 -0
- package/dist/commands/ort-recursive.d.ts +53 -0
- package/dist/commands/ort-recursive.d.ts.map +1 -0
- package/dist/commands/pack-refs-command.d.ts +20 -0
- package/dist/commands/pack-refs-command.d.ts.map +1 -1
- package/dist/commands/patch-id.d.ts +44 -0
- package/dist/commands/patch-id.d.ts.map +1 -0
- package/dist/commands/pathspec-attributes.d.ts +64 -0
- package/dist/commands/pathspec-attributes.d.ts.map +1 -0
- package/dist/commands/pathspec.d.ts +324 -0
- package/dist/commands/pathspec.d.ts.map +1 -0
- package/dist/commands/post-index-change.d.ts +33 -0
- package/dist/commands/post-index-change.d.ts.map +1 -0
- package/dist/commands/pretty-format.d.ts +222 -0
- package/dist/commands/pretty-format.d.ts.map +1 -0
- package/dist/commands/promisor-remote.d.ts +80 -0
- package/dist/commands/promisor-remote.d.ts.map +1 -0
- package/dist/commands/pull-command.d.ts +59 -8
- package/dist/commands/pull-command.d.ts.map +1 -1
- package/dist/commands/push-command.d.ts +24 -8
- package/dist/commands/push-command.d.ts.map +1 -1
- package/dist/commands/read-tree-command.d.ts +112 -0
- package/dist/commands/read-tree-command.d.ts.map +1 -0
- package/dist/commands/rebase-command.d.ts +507 -75
- package/dist/commands/rebase-command.d.ts.map +1 -1
- package/dist/commands/rebase-todo.d.ts +130 -0
- package/dist/commands/rebase-todo.d.ts.map +1 -0
- package/dist/commands/ref-decoration-filter.d.ts +53 -0
- package/dist/commands/ref-decoration-filter.d.ts.map +1 -0
- package/dist/commands/reflog-messages.d.ts +98 -0
- package/dist/commands/reflog-messages.d.ts.map +1 -0
- package/dist/commands/remote-command.d.ts +31 -0
- package/dist/commands/remote-command.d.ts.map +1 -1
- package/dist/commands/remote-transport.d.ts +120 -0
- package/dist/commands/remote-transport.d.ts.map +1 -0
- package/dist/commands/reset-command.d.ts +161 -7
- package/dist/commands/reset-command.d.ts.map +1 -1
- package/dist/commands/restore-command.d.ts +103 -0
- package/dist/commands/restore-command.d.ts.map +1 -0
- package/dist/commands/rev-list-command.d.ts +78 -0
- package/dist/commands/rev-list-command.d.ts.map +1 -0
- package/dist/commands/rev-parse-command.d.ts +89 -0
- package/dist/commands/rev-parse-command.d.ts.map +1 -0
- package/dist/commands/revert-command.d.ts +46 -38
- package/dist/commands/revert-command.d.ts.map +1 -1
- package/dist/commands/revision-filenames.d.ts +95 -0
- package/dist/commands/revision-filenames.d.ts.map +1 -0
- package/dist/commands/revision-range.d.ts +67 -0
- package/dist/commands/revision-range.d.ts.map +1 -0
- package/dist/commands/revision-resolver.d.ts +325 -0
- package/dist/commands/revision-resolver.d.ts.map +1 -0
- package/dist/commands/rm-command.d.ts +69 -7
- package/dist/commands/rm-command.d.ts.map +1 -1
- package/dist/commands/sequencer-pick.d.ts +191 -0
- package/dist/commands/sequencer-pick.d.ts.map +1 -0
- package/dist/commands/sequencer-support.d.ts +125 -0
- package/dist/commands/sequencer-support.d.ts.map +1 -0
- package/dist/commands/serve-repository.d.ts +52 -0
- package/dist/commands/serve-repository.d.ts.map +1 -0
- package/dist/commands/sparse-checkout-command.d.ts +190 -0
- package/dist/commands/sparse-checkout-command.d.ts.map +1 -0
- package/dist/commands/sparse-checkout-support.d.ts +268 -0
- package/dist/commands/sparse-checkout-support.d.ts.map +1 -0
- package/dist/commands/stash-apply-command.d.ts +42 -8
- package/dist/commands/stash-apply-command.d.ts.map +1 -1
- package/dist/commands/stash-create-command.d.ts +156 -2
- package/dist/commands/stash-create-command.d.ts.map +1 -1
- package/dist/commands/stash-drop-command.d.ts +2 -0
- package/dist/commands/stash-drop-command.d.ts.map +1 -1
- package/dist/commands/stash-working-tree.d.ts +23 -0
- package/dist/commands/stash-working-tree.d.ts.map +1 -1
- package/dist/commands/status-command.d.ts +300 -15
- package/dist/commands/status-command.d.ts.map +1 -1
- package/dist/commands/status-format.d.ts +155 -0
- package/dist/commands/status-format.d.ts.map +1 -0
- package/dist/commands/status-header.d.ts +64 -0
- package/dist/commands/status-header.d.ts.map +1 -0
- package/dist/commands/strerror.d.ts +7 -0
- package/dist/commands/strerror.d.ts.map +1 -0
- package/dist/commands/submodule-config.d.ts +38 -0
- package/dist/commands/submodule-config.d.ts.map +1 -0
- package/dist/commands/submodule-summary-command.d.ts +80 -0
- package/dist/commands/submodule-summary-command.d.ts.map +1 -0
- package/dist/commands/submodule-summary.d.ts +150 -0
- package/dist/commands/submodule-summary.d.ts.map +1 -0
- package/dist/commands/switch-command.d.ts +132 -0
- package/dist/commands/switch-command.d.ts.map +1 -0
- package/dist/commands/tag-command.d.ts +23 -2
- package/dist/commands/tag-command.d.ts.map +1 -1
- package/dist/commands/tracking-info.d.ts +64 -0
- package/dist/commands/tracking-info.d.ts.map +1 -0
- package/dist/commands/trailers.d.ts +73 -0
- package/dist/commands/trailers.d.ts.map +1 -0
- package/dist/commands/tree-restore.d.ts +85 -1
- package/dist/commands/tree-restore.d.ts.map +1 -1
- package/dist/commands/untracked-cache-support.d.ts +54 -0
- package/dist/commands/untracked-cache-support.d.ts.map +1 -0
- package/dist/commands/worktree-add-command.d.ts +108 -0
- package/dist/commands/worktree-add-command.d.ts.map +1 -0
- package/dist/commands/worktree-list-command.d.ts +69 -0
- package/dist/commands/worktree-list-command.d.ts.map +1 -0
- package/dist/commands/worktree-lock-command.d.ts +44 -0
- package/dist/commands/worktree-lock-command.d.ts.map +1 -0
- package/dist/commands/worktree-overwrite-checks.d.ts +146 -6
- package/dist/commands/worktree-overwrite-checks.d.ts.map +1 -1
- package/dist/commands/worktree-prune-command.d.ts +48 -0
- package/dist/commands/worktree-prune-command.d.ts.map +1 -0
- package/dist/commands/worktree-remove-command.d.ts +59 -0
- package/dist/commands/worktree-remove-command.d.ts.map +1 -0
- package/dist/commands/worktree-repair-command.d.ts +35 -0
- package/dist/commands/worktree-repair-command.d.ts.map +1 -0
- package/dist/commands/worktree-support.d.ts +64 -0
- package/dist/commands/worktree-support.d.ts.map +1 -0
- package/dist/commands-DIJ91NnD.js +62225 -0
- package/dist/core-commands/add.command.impl.d.ts.map +1 -1
- package/dist/errors/add-errors.d.ts +55 -0
- package/dist/errors/add-errors.d.ts.map +1 -1
- package/dist/errors/checkout-errors.d.ts +16 -0
- package/dist/errors/checkout-errors.d.ts.map +1 -1
- package/dist/errors/command-errors.d.ts +77 -0
- package/dist/errors/command-errors.d.ts.map +1 -1
- package/dist/errors/commit-errors.d.ts +9 -0
- package/dist/errors/commit-errors.d.ts.map +1 -1
- package/dist/errors/git-api-error.d.ts +59 -2
- package/dist/errors/git-api-error.d.ts.map +1 -1
- package/dist/errors/index.d.ts +1 -0
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/index.js +354 -19
- package/dist/errors/rebase-errors.d.ts +9 -0
- package/dist/errors/rebase-errors.d.ts.map +1 -1
- package/dist/errors/ref-errors.d.ts +32 -0
- package/dist/errors/ref-errors.d.ts.map +1 -1
- package/dist/errors/transport-errors.d.ts +12 -2
- package/dist/errors/transport-errors.d.ts.map +1 -1
- package/dist/errors/worktree-errors.d.ts +35 -0
- package/dist/errors/worktree-errors.d.ts.map +1 -0
- package/dist/git-command-BGiOJ8Zk.js +7246 -0
- package/dist/git-command.d.ts +428 -32
- package/dist/git-command.d.ts.map +1 -1
- package/dist/git.d.ts +315 -5
- package/dist/git.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/remote-config/index.d.ts +1 -1
- package/dist/remote-config/index.d.ts.map +1 -1
- package/dist/remote-config/remote-config-store.d.ts +167 -6
- package/dist/remote-config/remote-config-store.d.ts.map +1 -1
- package/dist/remote-config/remote-refs.d.ts +7 -3
- package/dist/remote-config/remote-refs.d.ts.map +1 -1
- package/dist/rename/detect-renames.d.ts +148 -0
- package/dist/rename/detect-renames.d.ts.map +1 -0
- package/dist/rename/git-similarity.d.ts +44 -0
- package/dist/rename/git-similarity.d.ts.map +1 -0
- package/dist/rename/index.d.ts +2 -0
- package/dist/rename/index.d.ts.map +1 -1
- package/dist/results/binary-patch.d.ts +11 -0
- package/dist/results/binary-patch.d.ts.map +1 -0
- package/dist/results/blame-format.d.ts +55 -0
- package/dist/results/blame-format.d.ts.map +1 -0
- package/dist/results/cherry-pick-result.d.ts +10 -0
- package/dist/results/cherry-pick-result.d.ts.map +1 -1
- package/dist/results/clone-result.d.ts +18 -0
- package/dist/results/clone-result.d.ts.map +1 -1
- package/dist/results/combined-diff.d.ts +77 -0
- package/dist/results/combined-diff.d.ts.map +1 -0
- package/dist/results/diff-entry.d.ts +32 -0
- package/dist/results/diff-entry.d.ts.map +1 -1
- package/dist/results/diff-formatter.d.ts +34 -60
- package/dist/results/diff-formatter.d.ts.map +1 -1
- package/dist/results/diff-order.d.ts +25 -0
- package/dist/results/diff-order.d.ts.map +1 -0
- package/dist/results/diff-output.d.ts +249 -0
- package/dist/results/diff-output.d.ts.map +1 -0
- package/dist/results/fetch-result.d.ts +15 -0
- package/dist/results/fetch-result.d.ts.map +1 -1
- package/dist/results/index.d.ts +5 -0
- package/dist/results/index.d.ts.map +1 -1
- package/dist/results/index.js +2 -252
- package/dist/results/init-result.d.ts +7 -0
- package/dist/results/init-result.d.ts.map +1 -1
- package/dist/results/merge-result.d.ts +15 -1
- package/dist/results/merge-result.d.ts.map +1 -1
- package/dist/results/pull-result.d.ts +17 -3
- package/dist/results/pull-result.d.ts.map +1 -1
- package/dist/results/push-result.d.ts +47 -0
- package/dist/results/push-result.d.ts.map +1 -1
- package/dist/results/quote-path.d.ts +27 -0
- package/dist/results/quote-path.d.ts.map +1 -0
- package/dist/results/rebase-result.d.ts +28 -1
- package/dist/results/rebase-result.d.ts.map +1 -1
- package/dist/results/revert-result.d.ts +10 -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 +60 -6
- package/dist/results/status-result.d.ts.map +1 -1
- package/dist/results-WVlBhVb1.js +2935 -0
- package/dist/transport-command.d.ts +44 -1
- package/dist/transport-command.d.ts.map +1 -1
- package/package.json +15 -11
- package/src/commands/add-command.ts +1291 -226
- package/src/commands/add-patch/add-interactive.ts +941 -0
- package/src/commands/add-patch/add-patch.ts +1169 -0
- package/src/commands/add-patch/index.ts +5 -0
- package/src/commands/add-patch/patch-backend.ts +239 -0
- package/src/commands/add-patch/patch-modes.ts +249 -0
- package/src/commands/add-patch/patch-session.ts +159 -0
- package/src/commands/am/am-command.ts +1111 -0
- package/src/commands/am/index.ts +2 -0
- package/src/commands/am/mailinfo.ts +1015 -0
- package/src/commands/am/patch-format.ts +121 -0
- package/src/commands/apply/apply-command.ts +842 -0
- package/src/commands/apply/apply-engine.ts +1602 -0
- package/src/commands/apply/apply-parse.ts +1210 -0
- package/src/commands/apply/apply-types.ts +112 -0
- package/src/commands/apply/index.ts +5 -0
- package/src/commands/apply/latin1.ts +171 -0
- package/src/commands/apply/whitespace.ts +260 -0
- package/src/commands/attributes-source.ts +96 -0
- package/src/commands/backfill-command.ts +694 -0
- package/src/commands/bisect/bisect-checkout.ts +217 -0
- package/src/commands/bisect/bisect-command.ts +788 -0
- package/src/commands/bisect/bisect-engine.ts +1080 -0
- package/src/commands/bisect/bisect-graph.ts +595 -0
- package/src/commands/bisect/bisect-quote.ts +92 -0
- package/src/commands/bisect/index.ts +4 -0
- package/src/commands/blame-command.ts +711 -986
- package/src/commands/branch-command.ts +354 -32
- package/src/commands/branch-tracking.ts +331 -0
- package/src/commands/checkout-command.ts +1290 -243
- package/src/commands/checkout-paths.ts +784 -0
- package/src/commands/cherry-pick-command.ts +156 -396
- package/src/commands/clean-command.ts +504 -156
- package/src/commands/clone-command.ts +748 -69
- package/src/commands/comment-char-config.ts +160 -0
- package/src/commands/commit-command.ts +1782 -166
- package/src/commands/core-config.ts +166 -6
- package/src/commands/date-format.ts +668 -0
- package/src/commands/default-branch.ts +196 -0
- package/src/commands/describe-command.ts +2 -0
- package/src/commands/diff-command.ts +1916 -110
- package/src/commands/diff-textconv.ts +50 -0
- package/src/commands/fetch-command.ts +622 -68
- package/src/commands/format-patch-command.ts +974 -0
- package/src/commands/fsck/fetch-fsck.ts +229 -0
- package/src/commands/fsck/fsck-command.ts +3464 -0
- package/src/commands/fsck/fsck-loose.ts +297 -0
- package/src/commands/fsck/fsck-msg-ids.ts +176 -0
- package/src/commands/fsck/fsck-object-checks.ts +1085 -0
- package/src/commands/fsck/fsck-object-table.ts +373 -0
- package/src/commands/fsck/fsck-pack.ts +634 -0
- package/src/commands/fsck/index.ts +5 -0
- package/src/commands/fsck/verify-pack-command.ts +252 -0
- package/src/commands/gc-command.ts +324 -77
- package/src/commands/git-date.ts +9 -0
- package/src/commands/git-describe.ts +316 -0
- package/src/commands/git-hooks.ts +1483 -0
- package/src/commands/git-ident.ts +344 -0
- package/src/commands/hook-command.ts +247 -0
- package/src/commands/index-adder.ts +711 -0
- package/src/commands/index-host.ts +291 -0
- package/src/commands/index.ts +84 -0
- package/src/commands/init-command.ts +194 -14
- package/src/commands/legacy-remotes.ts +224 -0
- package/src/commands/local-clone.ts +183 -0
- package/src/commands/local-transport.ts +762 -0
- package/src/commands/log-command.ts +1930 -170
- package/src/commands/log-graph.ts +671 -0
- package/src/commands/log-output.ts +1359 -0
- package/src/commands/ls-remote-command.ts +105 -58
- package/src/commands/mailmap.ts +129 -0
- package/src/commands/merge-bases.ts +296 -0
- package/src/commands/merge-command.ts +1416 -491
- package/src/commands/merge-config.ts +25 -0
- package/src/commands/merge-drivers.ts +306 -0
- package/src/commands/merge-support.ts +1219 -0
- package/src/commands/message-cleanup.ts +275 -0
- package/src/commands/mv-command.ts +976 -0
- package/src/commands/notes-command.ts +890 -0
- package/src/commands/notes-commands.ts +87 -0
- package/src/commands/notes-merge-command.ts +777 -0
- package/src/commands/notes-support.ts +402 -0
- package/src/commands/notes-tree.ts +617 -0
- package/src/commands/object-id-input.ts +27 -0
- package/src/commands/octopus-merge.ts +378 -0
- package/src/commands/ort-merge.ts +1660 -0
- package/src/commands/ort-recursive.ts +160 -0
- package/src/commands/pack-refs-command.ts +39 -22
- package/src/commands/patch-id.ts +204 -0
- package/src/commands/pathspec-attributes.ts +162 -0
- package/src/commands/pathspec.ts +1199 -0
- package/src/commands/post-index-change.ts +62 -0
- package/src/commands/pretty-format.ts +1432 -0
- package/src/commands/promisor-remote.ts +298 -0
- package/src/commands/pull-command.ts +326 -33
- package/src/commands/push-command.ts +257 -29
- package/src/commands/read-tree-command.ts +861 -0
- package/src/commands/rebase-command.ts +3820 -372
- package/src/commands/rebase-todo.ts +584 -0
- package/src/commands/ref-decoration-filter.ts +118 -0
- package/src/commands/reflog-messages.ts +177 -0
- package/src/commands/remote-command.ts +124 -23
- package/src/commands/remote-transport.ts +383 -0
- package/src/commands/reset-command.ts +821 -104
- package/src/commands/restore-command.ts +350 -0
- package/src/commands/rev-list-command.ts +167 -0
- package/src/commands/rev-parse-command.ts +299 -0
- package/src/commands/revert-command.ts +152 -399
- package/src/commands/revision-filenames.ts +254 -0
- package/src/commands/revision-range.ts +222 -0
- package/src/commands/revision-resolver.ts +1397 -0
- package/src/commands/rm-command.ts +613 -67
- package/src/commands/sequencer-pick.ts +874 -0
- package/src/commands/sequencer-support.ts +876 -0
- package/src/commands/serve-repository.ts +125 -0
- package/src/commands/sparse-checkout-command.ts +1389 -0
- package/src/commands/sparse-checkout-support.ts +793 -0
- package/src/commands/stash-apply-command.ts +376 -343
- package/src/commands/stash-create-command.ts +625 -42
- package/src/commands/stash-drop-command.ts +15 -2
- package/src/commands/stash-working-tree.ts +168 -24
- package/src/commands/status-command.ts +1326 -105
- package/src/commands/status-format.ts +775 -0
- package/src/commands/status-header.ts +332 -0
- package/src/commands/strerror.ts +29 -0
- package/src/commands/submodule-config.ts +94 -0
- package/src/commands/submodule-summary-command.ts +333 -0
- package/src/commands/submodule-summary.ts +446 -0
- package/src/commands/switch-command.ts +402 -0
- package/src/commands/tag-command.ts +129 -41
- package/src/commands/tracking-info.ts +201 -0
- package/src/commands/trailers.ts +417 -0
- package/src/commands/tree-restore.ts +204 -4
- package/src/commands/untracked-cache-support.ts +198 -0
- package/src/commands/worktree-add-command.ts +458 -0
- package/src/commands/worktree-list-command.ts +206 -0
- package/src/commands/worktree-lock-command.ts +96 -0
- package/src/commands/worktree-overwrite-checks.ts +452 -26
- package/src/commands/worktree-prune-command.ts +99 -0
- package/src/commands/worktree-remove-command.ts +186 -0
- package/src/commands/worktree-repair-command.ts +59 -0
- package/src/commands/worktree-support.ts +214 -0
- package/src/core-commands/add.command.impl.ts +8 -2
- package/src/errors/add-errors.ts +45 -0
- package/src/errors/checkout-errors.ts +26 -2
- package/src/errors/command-errors.ts +101 -1
- package/src/errors/commit-errors.ts +18 -2
- package/src/errors/git-api-error.ts +82 -2
- package/src/errors/index.ts +1 -0
- package/src/errors/merge-errors.ts +2 -2
- package/src/errors/rebase-errors.ts +12 -0
- package/src/errors/ref-errors.ts +56 -2
- package/src/errors/remote-errors.ts +2 -2
- package/src/errors/stash-errors.ts +1 -1
- package/src/errors/transport-errors.ts +20 -4
- package/src/errors/worktree-errors.ts +49 -0
- package/src/git-command.ts +1207 -118
- package/src/git.ts +538 -12
- package/src/index.ts +1 -1
- package/src/remote-config/index.ts +2 -0
- package/src/remote-config/remote-config-store.ts +378 -18
- package/src/remote-config/remote-refs.ts +22 -6
- package/src/rename/detect-renames.ts +715 -0
- package/src/rename/git-similarity.ts +116 -0
- package/src/rename/index.ts +2 -0
- package/src/results/binary-patch.ts +401 -0
- package/src/results/blame-format.ts +239 -0
- package/src/results/cherry-pick-result.ts +10 -0
- package/src/results/clone-result.ts +21 -0
- package/src/results/combined-diff.ts +585 -0
- package/src/results/diff-entry.ts +35 -0
- package/src/results/diff-formatter.ts +152 -288
- package/src/results/diff-order.ts +64 -0
- package/src/results/diff-output.ts +1053 -0
- package/src/results/fetch-result.ts +15 -0
- package/src/results/index.ts +5 -0
- package/src/results/init-result.ts +9 -0
- package/src/results/merge-result.ts +15 -1
- package/src/results/pull-result.ts +17 -3
- package/src/results/push-result.ts +48 -0
- package/src/results/quote-path.ts +103 -0
- package/src/results/rebase-result.ts +37 -0
- package/src/results/revert-result.ts +10 -0
- package/src/results/stash-result.ts +6 -0
- package/src/results/status-result.ts +127 -46
- package/src/transport-command.ts +121 -2
- package/dist/commands-CsLNyvZ1.js +0 -12587
- package/dist/status-result-BpyUK1Sg.js +0 -519
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rebase-command.d.ts","sourceRoot":"","sources":["../../src/commands/rebase-command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"rebase-command.d.ts","sourceRoot":"","sources":["../../src/commands/rebase-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,QAAQ,EACb,KAAK,WAAW,EAGjB,MAAM,uBAA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0DhC;;;OAGG;YACW,WAAW;IAUzB;;;;OAIG;YACW,SAAS;IAiBvB;;;;OAIG;YACW,aAAa;IAmB3B,0FAA0F;YAC5E,QAAQ;IAKtB;;;OAGG;YACW,mBAAmB;IAuBjC,wFAAwF;YAC1E,WAAW;IAkBzB,wFAAwF;YAC1E,QAAQ;IAWtB;;;;;OAKG;YACW,gBAAgB;IAgB9B,yFAAyF;YAC3E,eAAe;IAS7B,oFAAoF;IACpF,OAAO,CAAC,wBAAwB;IAWhC;;;OAGG;YACW,cAAc;IA6B5B,uFAAuF;YACzE,QAAQ;IAMtB;;;OAGG;YACW,iBAAiB;IA+D/B;;;;OAIG;YACW,QAAQ;IAuEtB,qFAAqF;YACvE,cAAc;IAa5B,uFAAuF;YACzE,eAAe;IAY7B;;;;;OAKG;YACW,oBAAoB;IA6DlC;;;OAGG;YACW,gBAAgB;IAyB9B,kDAAkD;YACpC,eAAe;IAY7B;;;OAGG;YACW,YAAY;IA8B1B;;;;;OAKG;YACW,eAAe;IA4B7B,2FAA2F;IAC3F,OAAO,CAAC,SAAS;IAejB;;;OAGG;YACW,cAAc;IAmB5B;;;;;OAKG;YACW,eAAe;IAmD7B;;;;;;OAMG;YACW,eAAe;IA6D7B;;;;;OAKG;YACW,iBAAiB;IA6D/B,iEAAiE;YACnD,UAAU;IASxB;;;;;OAKG;YACW,cAAc;YAWd,UAAU;CAIzB"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { type ObjectId } from "@statewalker/vcs-core";
|
|
2
|
+
import { RebaseAction } from "../results/rebase-result.js";
|
|
3
|
+
/**
|
|
4
|
+
* The todo list of git's sequencer (`rebase-merge/git-rebase-todo`): parsing as git's
|
|
5
|
+
* parse_insn_line reads a line, writing as todo_list_to_strbuf writes it, the help text
|
|
6
|
+
* the editor shows (append_todo_help), and the rearrangements git makes before the list is
|
|
7
|
+
* edited (`--autosquash`, `--exec`).
|
|
8
|
+
*/
|
|
9
|
+
/** One line of the todo list. */
|
|
10
|
+
export interface TodoItem {
|
|
11
|
+
action: RebaseAction;
|
|
12
|
+
/**
|
|
13
|
+
* The commit of a pick-like command, or the original merge of a `merge -C` (empty for the
|
|
14
|
+
* other commands); as written until the list's names are resolved
|
|
15
|
+
*/
|
|
16
|
+
id: ObjectId;
|
|
17
|
+
/**
|
|
18
|
+
* The line's text after the id (`# <subject>`, as `rebase.instructionFormat` made it, or as
|
|
19
|
+
* the todo file has it): written back unchanged, and what `Could not apply` names. The
|
|
20
|
+
* argument of `exec`, `label`, `reset`, `update-ref` and an id-less `merge`, the whole line
|
|
21
|
+
* of a comment (a blank line is one)
|
|
22
|
+
*/
|
|
23
|
+
rest?: string;
|
|
24
|
+
/** `merge -c` / `fixup -c`: the message edited */
|
|
25
|
+
editMessage?: boolean;
|
|
26
|
+
/** `fixup -C`: this commit's message replaces the previous one's */
|
|
27
|
+
replaceMessage?: boolean;
|
|
28
|
+
/** A line git could not parse: kept as written (git's TODO_COMMENT + 1) */
|
|
29
|
+
invalid?: boolean;
|
|
30
|
+
/** The line as read from a todo file (written back as it is while the list runs) */
|
|
31
|
+
line?: string;
|
|
32
|
+
/** git's errors for this line (`error: ...`), in the order git prints them */
|
|
33
|
+
errors?: string[];
|
|
34
|
+
/**
|
|
35
|
+
* An `update-ref` (or checked-out comment) --update-refs added: its argument keeps the
|
|
36
|
+
* newline git added it with, so the first list shows a blank line after it
|
|
37
|
+
*/
|
|
38
|
+
blankAfter?: boolean;
|
|
39
|
+
}
|
|
40
|
+
/** git's is_noop: `noop`, `drop`, comments and lines that could not be parsed. */
|
|
41
|
+
export declare function isNoop(item: TodoItem): boolean;
|
|
42
|
+
/** git's is_fixup: `fixup` or `squash`. */
|
|
43
|
+
export declare function isFixup(action: RebaseAction | undefined): boolean;
|
|
44
|
+
/** git's is_pick_or_similar: the commands that make a (non-merge) commit. */
|
|
45
|
+
export declare function isPickLike(action: RebaseAction): boolean;
|
|
46
|
+
/** git's count_commands: every item but comments (`noop`, `drop` and bad lines count). */
|
|
47
|
+
export declare function countTodoCommands(items: TodoItem[]): number;
|
|
48
|
+
/** The result of parsing a todo list: its items and git's errors (`error: ...` lines). */
|
|
49
|
+
export interface ParsedTodo {
|
|
50
|
+
items: TodoItem[];
|
|
51
|
+
errors: string[];
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* A todo list's lines as git's todo_list_parse_insn_buffer reads them. Commit names are
|
|
55
|
+
* kept as written (resolved later); a line git refuses is kept as written (`invalid`) and
|
|
56
|
+
* reported as git reports it (`error: invalid command 'x'`, `error: invalid line 3: x`).
|
|
57
|
+
* `fixupOkay` (`rebase-merge/done` exists): a fixup or squash may start the list.
|
|
58
|
+
*/
|
|
59
|
+
export declare function parseTodo(text: string, comment?: string, fixupOkay?: boolean): ParsedTodo;
|
|
60
|
+
/** Whether the command carries a commit (resolved after parsing). */
|
|
61
|
+
export declare function takesCommit(item: TodoItem): boolean;
|
|
62
|
+
/** Options of {@link formatTodo}. */
|
|
63
|
+
export interface FormatTodoOptions {
|
|
64
|
+
/** `rebase.abbreviateCommands`: the commands as their letters */
|
|
65
|
+
abbreviate?: boolean;
|
|
66
|
+
/** The id written for a commit (TODO_LIST_SHORTEN_IDS: abbreviated); default the id */
|
|
67
|
+
idOf?: (id: ObjectId) => string;
|
|
68
|
+
/** Lines read from a file written back as they were read (save_todo) */
|
|
69
|
+
verbatim?: boolean;
|
|
70
|
+
}
|
|
71
|
+
/** git's peek_command: the first command from `offset` on that is not a noop. */
|
|
72
|
+
export declare function peekCommand(items: TodoItem[], offset: number): RebaseAction | undefined;
|
|
73
|
+
/** sequencer.c's is_final_fixup: `items[0]` is a fixup/squash no later one follows. */
|
|
74
|
+
export declare function isFinalFixup(items: TodoItem[]): boolean;
|
|
75
|
+
/** git's todo_list_to_strbuf: each item as a line. */
|
|
76
|
+
export declare function formatTodo(items: TodoItem[], options?: FormatTodoOptions): string;
|
|
77
|
+
/**
|
|
78
|
+
* git's strbuf_add_commented_lines: each line after the comment string and a space (no
|
|
79
|
+
* space before an empty line or a tab), the text ended by a newline.
|
|
80
|
+
*/
|
|
81
|
+
export declare function commentLines(out: string, text: string, comment: string): string;
|
|
82
|
+
/**
|
|
83
|
+
* sequencer.c's add_commented_lines: like {@link commentLines}, but the lines at the start
|
|
84
|
+
* that are already comments are copied as they are.
|
|
85
|
+
*/
|
|
86
|
+
declare function commentLinesOnce(out: string, text: string, comment: string): string;
|
|
87
|
+
/**
|
|
88
|
+
* rebase-interactive.c's append_todo_help: the help after the list (`# Rebase a..b onto c
|
|
89
|
+
* (n commands)` for a new list, the commands, the warnings).
|
|
90
|
+
*/
|
|
91
|
+
export declare function todoHelp(commandCount: number, comment: string, range?: {
|
|
92
|
+
shortRevisions: string;
|
|
93
|
+
shortOnto: string;
|
|
94
|
+
}, missingCommitsError?: boolean): string;
|
|
95
|
+
/**
|
|
96
|
+
* sequencer.c's todo_list_add_exec_commands: the commands after every pick and merge (after
|
|
97
|
+
* the fixup/squash chain that follows it).
|
|
98
|
+
*/
|
|
99
|
+
export declare function addExecCommands(items: TodoItem[], commands: string[]): TodoItem[];
|
|
100
|
+
/**
|
|
101
|
+
* sequencer.c's todo_list_rearrange_squash (`--autosquash`): each `fixup! <subject>`,
|
|
102
|
+
* `amend! <subject>` and `squash! <subject>` commit moved after the commit it names (by
|
|
103
|
+
* subject, by a commit name, or by a subject's prefix) and made a `fixup`, `fixup -C` or
|
|
104
|
+
* `squash`; undefined when the list already has fixups (git's "the script was already
|
|
105
|
+
* rearranged.").
|
|
106
|
+
*/
|
|
107
|
+
export declare function rearrangeSquash(items: TodoItem[], subjectOf: (id: ObjectId) => Promise<string>, commitNamed: (name: string) => Promise<ObjectId | undefined>): Promise<TodoItem[] | undefined>;
|
|
108
|
+
/** git's find_commit_subject: the message from its first non-blank line. */
|
|
109
|
+
export declare function messageBody(message: string): string;
|
|
110
|
+
/** commit.c's commit_subject_length: the subject paragraph's length (its newlines included). */
|
|
111
|
+
export declare function subjectLength(body: string): number;
|
|
112
|
+
declare const nthMessage: (n: number) => string;
|
|
113
|
+
declare const skipNthMessage: (n: number) => string;
|
|
114
|
+
export declare const combinedMessage: (n: number) => string;
|
|
115
|
+
/**
|
|
116
|
+
* sequencer.c's update_squash_message_for_fixup (a `fixup -C` after fixups): the messages
|
|
117
|
+
* kept so far commented out and said to be skipped, the blank lines around them kept.
|
|
118
|
+
*/
|
|
119
|
+
export declare function squashMessageForFixup(message: string, comment: string): string;
|
|
120
|
+
/** The pieces of git's fixup/squash message text, for the command's update_squash_messages. */
|
|
121
|
+
export declare const squashTexts: {
|
|
122
|
+
firstMessage: string;
|
|
123
|
+
nthMessage: typeof nthMessage;
|
|
124
|
+
skipFirstMessage: string;
|
|
125
|
+
skipNthMessage: typeof skipNthMessage;
|
|
126
|
+
combinedMessage: typeof combinedMessage;
|
|
127
|
+
commentLinesOnce: typeof commentLinesOnce;
|
|
128
|
+
};
|
|
129
|
+
export {};
|
|
130
|
+
//# sourceMappingURL=rebase-todo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rebase-todo.d.ts","sourceRoot":"","sources":["../../src/commands/rebase-todo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D;;;;;GAKG;AAEH,iCAAiC;AACjC,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,YAAY,CAAC;IACrB;;;OAGG;IACH,EAAE,EAAE,QAAQ,CAAC;IACb;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,oEAAoE;IACpE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,2EAA2E;IAC3E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oFAAoF;IACpF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8EAA8E;IA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AAC;AAEvF;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CA0C9E;AAED,+FAA+F;AAC/F,eAAO,MAAM,WAAW;;;;;;;CAOvB,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which refs `git log` decorates commits with: builtin/log.c's decoration filter
|
|
3
|
+
* (`--decorate-refs`, `--decorate-refs-exclude`, `--clear-decorations`, and the
|
|
4
|
+
* `log.excludeDecoration`, `log.initialDecorationSet` and `log.decorate` settings) and
|
|
5
|
+
* log-tree.c's ref_filter_match.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* const decorates = createRefDecorationFilter({ config: RemoteConfigStore.from(workingCopy) });
|
|
10
|
+
* decorates("refs/heads/main"); // true
|
|
11
|
+
* decorates("refs/notes/commits"); // false: not in the default set
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
/** The configuration the filter reads (a `RemoteConfigStore` is one). */
|
|
15
|
+
export interface RefDecorationConfig {
|
|
16
|
+
/** Every value of a variable, in the configuration's order */
|
|
17
|
+
values(key: string): string[];
|
|
18
|
+
}
|
|
19
|
+
/** Options of {@link createRefDecorationFilter}. */
|
|
20
|
+
export interface RefDecorationFilterOptions {
|
|
21
|
+
/** `--decorate-refs=<pattern>`: only refs matching one of them are decorated */
|
|
22
|
+
decorateRefs?: readonly string[];
|
|
23
|
+
/** `--decorate-refs-exclude=<pattern>`: refs matching one of them are not decorated */
|
|
24
|
+
decorateRefsExclude?: readonly string[];
|
|
25
|
+
/**
|
|
26
|
+
* `--clear-decorations`: no default set (every ref, unless patterns say otherwise). The
|
|
27
|
+
* patterns given before it on a command line are cleared by it: pass only those after.
|
|
28
|
+
*/
|
|
29
|
+
clearDecorations?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* The configuration: `log.excludeDecoration` (patterns not decorated, unless
|
|
32
|
+
* `--decorate-refs` includes them) and `log.initialDecorationSet` (`all`: no default set)
|
|
33
|
+
*/
|
|
34
|
+
config?: RefDecorationConfig;
|
|
35
|
+
/** Where replace refs live (`GIT_REPLACE_REF_BASE`; default `refs/replace/`) */
|
|
36
|
+
replaceRefBase?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Whether git's `git log` decorates commits with a ref (log-tree.c's ref_filter_match over
|
|
40
|
+
* the filter builtin/log.c sets up): a ref matching an excluding pattern is not; with
|
|
41
|
+
* including patterns, only a ref matching one of them is; else one matching a pattern of
|
|
42
|
+
* `log.excludeDecoration` is not. Without patterns on the command line or in the
|
|
43
|
+
* configuration, only the default set is decorated (HEAD, `refs/heads/`, `refs/tags/`,
|
|
44
|
+
* `refs/remotes/`, `refs/stash`, the replace refs), unless `--clear-decorations` or
|
|
45
|
+
* `log.initialDecorationSet=all` asks for every ref.
|
|
46
|
+
*/
|
|
47
|
+
export declare function createRefDecorationFilter(options?: RefDecorationFilterOptions): (refName: string) => boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Whether `log.decorate` asks for full ref names (`full`): `%d` and friends then show
|
|
50
|
+
* `refs/heads/main` where they show `main` by default (`short`, a boolean, `auto`).
|
|
51
|
+
*/
|
|
52
|
+
export declare function decorateFullRefs(config: RefDecorationConfig | undefined): boolean;
|
|
53
|
+
//# sourceMappingURL=ref-decoration-filter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ref-decoration-filter.d.ts","sourceRoot":"","sources":["../../src/commands/ref-decoration-filter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAKH,yEAAyE;AACzE,MAAM,WAAW,mBAAmB;IAClC,8DAA8D;IAC9D,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC/B;AAED,oDAAoD;AACpD,MAAM,WAAW,0BAA0B;IACzC,gFAAgF;IAChF,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,uFAAuF;IACvF,mBAAmB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACxC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;OAGG;IACH,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,gFAAgF;IAChF,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAkCD;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,GAAE,0BAA+B,GACvC,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAqB9B;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,mBAAmB,GAAG,SAAS,GAAG,OAAO,CAIjF"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The reflog lines our porcelain writes, as native git writes them: one place for the
|
|
3
|
+
* messages of each command (checked against git 2.43 and git's sources: `builtin/*.c`,
|
|
4
|
+
* `sequencer.c`, `reset.c`), and the identity and time of a line (`git_committer_info`).
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* const log = reflogLine(workingCopy, reflogMessages.reset("HEAD~1"));
|
|
9
|
+
* await updateHead(refs, targetId, log); // the branch and HEAD: "reset: moving to HEAD~1"
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
import { type ObjectId, type PersonIdent, type RefLogOptions, type Refs } from "@statewalker/vcs-core";
|
|
13
|
+
import type { WorkingCopy } from "@statewalker/vcs-working-tree";
|
|
14
|
+
/**
|
|
15
|
+
* The identity and time of a reflog line written now, as git's `git_committer_info` builds
|
|
16
|
+
* it (not strict): `GIT_COMMITTER_NAME` / `GIT_COMMITTER_EMAIL` / `GIT_COMMITTER_DATE` (the
|
|
17
|
+
* host environment's `committer`, on the working copy's configuration), else
|
|
18
|
+
* `committer.name` / `committer.email`, `user.name` / `user.email` and the clock (`now`, in
|
|
19
|
+
* seconds, when the caller read it once for all its lines, as git reads its default date
|
|
20
|
+
* once per process). Undefined when neither names anyone: the ref store's own identity is
|
|
21
|
+
* used then.
|
|
22
|
+
*/
|
|
23
|
+
export declare function committerIdent(workingCopy: WorkingCopy, now?: number): PersonIdent | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* A reflog line's options: `message`, with `who` as its identity (a commit's committer),
|
|
26
|
+
* else {@link committerIdent} at `now` (seconds; the clock when omitted).
|
|
27
|
+
*/
|
|
28
|
+
export declare function reflogLine(workingCopy: WorkingCopy, message: string, who?: PersonIdent, now?: number): RefLogOptions;
|
|
29
|
+
/**
|
|
30
|
+
* The first line of a commit message as git's commit and sequencer put it in a reflog line:
|
|
31
|
+
* leading blank lines skipped (git's cleanup), whitespace collapsed.
|
|
32
|
+
*/
|
|
33
|
+
export declare function reflogSubject(message: string): string;
|
|
34
|
+
/** What a commit records in `commit (<kind>): <subject>` (git's builtin/commit.c). */
|
|
35
|
+
export type CommitReflogKind = "initial" | "amend" | "merge" | "cherry-pick" | undefined;
|
|
36
|
+
/** git's reflog messages, per command. */
|
|
37
|
+
export declare const reflogMessages: {
|
|
38
|
+
/**
|
|
39
|
+
* `git checkout` / `git switch`: `from` is the branch left (short name) or, detached, the
|
|
40
|
+
* full id of HEAD; `to` the argument as given (`feat`, `HEAD~1`, `v1.0`).
|
|
41
|
+
*/
|
|
42
|
+
checkout: (from: string, to: string) => string;
|
|
43
|
+
/** `git commit`: `commit: <subject>`, `commit (initial): ...`, `commit (amend): ...` */
|
|
44
|
+
commit: (kind: CommitReflogKind, message: string, action?: string) => string;
|
|
45
|
+
/** `git reset <rev>`: the revision as given, `HEAD` by default. */
|
|
46
|
+
reset: (rev: string) => string;
|
|
47
|
+
/** `git merge <names>`: `merge feat: Fast-forward`, `merge feat: Merge made by ...`. */
|
|
48
|
+
merge: (action: string, outcome: string) => string;
|
|
49
|
+
/** The action of `git merge <names>`, with the names as given. */
|
|
50
|
+
mergeAction: (names: string[]) => string;
|
|
51
|
+
/** The outcome of a merge that made a commit. */
|
|
52
|
+
mergeMade: (strategy: string) => string;
|
|
53
|
+
/** `git cherry-pick` / `git revert` (and a rebase's pick): `<action>: <subject>`. */
|
|
54
|
+
pick: (action: string, message: string) => string;
|
|
55
|
+
/** A rebase detaching HEAD at what it rebases onto, named as given. */
|
|
56
|
+
rebaseStart: (action: string, ontoName: string) => string;
|
|
57
|
+
/** A rebase's `<action> (pick)`, `(continue)`, `(abort)`, `(finish)`. */
|
|
58
|
+
rebaseStep: (action: string, step: string) => string;
|
|
59
|
+
/** The branch a finished rebase moves. */
|
|
60
|
+
rebaseFinishBranch: (action: string, headName: string, onto: ObjectId) => string;
|
|
61
|
+
/** HEAD attached to that branch again. */
|
|
62
|
+
rebaseFinishHead: (action: string, headName: string) => string;
|
|
63
|
+
/** HEAD back on the branch an aborted rebase started from. */
|
|
64
|
+
rebaseAbort: (action: string, headName: string) => string;
|
|
65
|
+
/** A rebase that only switches to the branch named (it is up to date). */
|
|
66
|
+
rebaseCheckout: (action: string, branch: string) => string;
|
|
67
|
+
/** `git clone <url>`: HEAD, the branch and `refs/remotes/<remote>/HEAD`. */
|
|
68
|
+
clone: (url: string) => string;
|
|
69
|
+
/**
|
|
70
|
+
* `git fetch`: `<action>: fast-forward`, `forced-update`, `storing head` (a new ref the
|
|
71
|
+
* remote has under refs/heads/), `storing tag`, `storing ref`, `updating tag`.
|
|
72
|
+
*/
|
|
73
|
+
fetch: (action: string, what: string) => string;
|
|
74
|
+
/** `git branch <name> [<start>]` and `checkout -b`: the start point as given, `HEAD` by default. */
|
|
75
|
+
branchCreated: (start: string) => string;
|
|
76
|
+
/** `git branch -f` / `checkout -B` of a branch that exists. */
|
|
77
|
+
branchReset: (start: string) => string;
|
|
78
|
+
/** `git branch -m`. */
|
|
79
|
+
branchRenamed: (from: string, to: string) => string;
|
|
80
|
+
/** `git branch -c`. */
|
|
81
|
+
branchCopied: (from: string, to: string) => string;
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Move HEAD to `id` as git's `update_ref("HEAD", ...)` does: through a symbolic HEAD its
|
|
85
|
+
* branch moves (logged in the branch's reflog and HEAD's), a detached HEAD moves itself.
|
|
86
|
+
*/
|
|
87
|
+
export declare function updateHead(refs: Refs, id: ObjectId, log?: RefLogOptions): Promise<void>;
|
|
88
|
+
/**
|
|
89
|
+
* Move HEAD to `id` as git's `refs_update_ref("HEAD", id, old)` does: one transaction on
|
|
90
|
+
* HEAD expecting `old` (unchecked when undefined), through a symbolic HEAD to its branch
|
|
91
|
+
* unless `noDeref` (a detached HEAD written as itself), as the reference-transaction hook
|
|
92
|
+
* sees it (`<old> <new> HEAD`). A store whose batches cannot take HEAD sets it plainly; a
|
|
93
|
+
* refusal (HEAD moved meanwhile, its lock held) throws.
|
|
94
|
+
*/
|
|
95
|
+
export declare function updateHeadExpecting(refs: Refs, id: ObjectId, old: ObjectId | undefined, log: RefLogOptions | undefined, options?: {
|
|
96
|
+
noDeref?: boolean;
|
|
97
|
+
}): Promise<void>;
|
|
98
|
+
//# sourceMappingURL=reflog-messages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reflog-messages.d.ts","sourceRoot":"","sources":["../../src/commands/reflog-messages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAGL,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,IAAI,EACV,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAKjE;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,WAAW,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAK9F;AAED;;;GAGG;AACH,wBAAgB,UAAU,CACxB,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,MAAM,EACf,GAAG,CAAC,EAAE,WAAW,EACjB,GAAG,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;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAI7F;AAED;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,IAAI,EACV,EAAE,EAAE,QAAQ,EACZ,GAAG,EAAE,QAAQ,GAAG,SAAS,EACzB,GAAG,EAAE,aAAa,GAAG,SAAS,EAC9B,OAAO,GAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAO,GAClC,OAAO,CAAC,IAAI,CAAC,CAmCf"}
|
|
@@ -155,6 +155,8 @@ export declare class RemoteRenameCommand extends GitCommand<RemoteRenameResult>
|
|
|
155
155
|
*/
|
|
156
156
|
call(): Promise<RemoteRenameResult>;
|
|
157
157
|
}
|
|
158
|
+
/** git's valid_remote_name: `refs/remotes/<name>/test` is a valid ref name. */
|
|
159
|
+
export declare function isValidRemoteName(name: string): boolean;
|
|
158
160
|
/**
|
|
159
161
|
* List remotes in the repository.
|
|
160
162
|
*
|
|
@@ -182,6 +184,35 @@ export declare class RemoteListCommand extends GitCommand<RemoteConfig[]> {
|
|
|
182
184
|
*/
|
|
183
185
|
call(): Promise<RemoteConfig[]>;
|
|
184
186
|
}
|
|
187
|
+
/**
|
|
188
|
+
* The URLs of a remote as git uses them: `git remote get-url [--push] [--all] <name>`.
|
|
189
|
+
*
|
|
190
|
+
* The URLs are rewritten by `url.<base>.insteadOf` (and, for push URLs of a remote without
|
|
191
|
+
* `pushurl`, by `url.<base>.pushInsteadOf`), as git reads them.
|
|
192
|
+
*
|
|
193
|
+
* @example
|
|
194
|
+
* ```typescript
|
|
195
|
+
* const [url] = await git.remoteGetUrl().setRemoteName("origin").call();
|
|
196
|
+
* const pushUrls = await git.remoteGetUrl().setRemoteName("origin").setPush(true).setAll(true).call();
|
|
197
|
+
* ```
|
|
198
|
+
*/
|
|
199
|
+
export declare class RemoteGetUrlCommand extends GitCommand<string[]> {
|
|
200
|
+
private remoteName?;
|
|
201
|
+
private push;
|
|
202
|
+
private all;
|
|
203
|
+
/** Set the remote whose URL is read. */
|
|
204
|
+
setRemoteName(name: string): this;
|
|
205
|
+
/** Read the push URLs (`--push`). */
|
|
206
|
+
setPush(push: boolean): this;
|
|
207
|
+
/** Every URL (`--all`), not only the first. */
|
|
208
|
+
setAll(all: boolean): this;
|
|
209
|
+
/**
|
|
210
|
+
* @returns the first URL, or with {@link setAll} every one
|
|
211
|
+
* @throws RemoteNotFoundError (exit 2) when the remote has no configuration (git: "No such
|
|
212
|
+
* remote '<name>'")
|
|
213
|
+
*/
|
|
214
|
+
call(): Promise<string[]>;
|
|
215
|
+
}
|
|
185
216
|
/**
|
|
186
217
|
* Set URL for a remote.
|
|
187
218
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-command.d.ts","sourceRoot":"","sources":["../../src/commands/remote-command.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAKL,KAAK,YAAY,EAElB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"remote-command.d.ts","sourceRoot":"","sources":["../../src/commands/remote-command.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAKL,KAAK,YAAY,EAElB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAI3D,YAAY,EAAE,YAAY,EAAE,CAAC;AAE7B;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,gBAAiB,SAAQ,UAAU,CAAC,YAAY,CAAC;IAC5D,OAAO,CAAC,IAAI,CAAC,CAAS;IACtB,OAAO,CAAC,GAAG,CAAC,CAAS;IACrB,OAAO,CA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CAI9B;IAED;;OAEG;IACH,YAAY,IAAI,MAAM,GAAG,SAAS,CAEjC;IAED;;;;OAIG;IACH,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAI3B;IAED;;OAEG;IACH,MAAM,IAAI,OAAO,CAEhB;IAED;;;;;;;;OAQG;IACH,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAI3B;IAED;;;;;;;;;;;OAWG;IACG,IAAI,IAAI,OAAO,CAAC,YAAY,CAAC,CAuBlC;IAED,sDAAsD;YACxC,eAAe;CAM9B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,oBAAqB,SAAQ,gBAAgB,CAAC,MAAM,GAAG,SAAS,CAAC;IAC5E,OAAO,CAAC,UAAU,CAAC,CAAS;IAC5B,OAAO,CAAC,MAAM,CAAC,CAAS;IACxB,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,QAAQ,CAAgB;IAEhC,wCAAwC;IACxC,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAIhC;IAED,+EAA+E;IAC/E,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAI9B;IAED,wDAAwD;IACxD,SAAS,CAAC,UAAU,EAAE,OAAO,GAAG,IAAI,CAInC;IAED;;;;OAIG;IACH,WAAW,IAAI,MAAM,EAAE,CAEtB;IAED,6EAA6E;IAC7E,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAI3B;IAED;;;;;;OAMG;IACG,IAAI,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CA+CxC;IAED;;;;OAIG;YACW,WAAW;CAkB1B"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How a remote command reaches a remote, as git's `transport_get` and `git_connect` decide:
|
|
3
|
+
* the URL (already rewritten by `url.<base>.insteadOf`, see `RemoteConfigStore`) is checked
|
|
4
|
+
* against `protocol.allow`; a path or `file://` URL is git's local transport (served in
|
|
5
|
+
* process, see `local-transport.ts`); anything else goes to the connector the transport
|
|
6
|
+
* registry names for it (smart HTTP by default).
|
|
7
|
+
*/
|
|
8
|
+
import { type Credentials, type GitConnectRequest, type GitService, type GitSession, type GitTransportConnector, type GitTransportRegistry, type GitUrl, type ReceivePackConnection, type UploadPackConnection } from "@statewalker/vcs-transport";
|
|
9
|
+
import type { GitHostEnvironment, OpenedRepository, WorkingCopy } from "@statewalker/vcs-working-tree";
|
|
10
|
+
import { RemoteConfigStore } from "../remote-config/index.js";
|
|
11
|
+
import type { HookSession } from "./git-hooks.js";
|
|
12
|
+
/** A remote URL resolved to the transport that reaches it. */
|
|
13
|
+
export type ResolvedRemote = {
|
|
14
|
+
kind: "local";
|
|
15
|
+
/** The URL as given (rewritten) */
|
|
16
|
+
url: string;
|
|
17
|
+
/** The repository's path, as git reports it (`file://` stripped and decoded) */
|
|
18
|
+
path: string;
|
|
19
|
+
} | {
|
|
20
|
+
kind: "connector";
|
|
21
|
+
url: string;
|
|
22
|
+
parsed: GitUrl;
|
|
23
|
+
connector: GitTransportConnector;
|
|
24
|
+
};
|
|
25
|
+
/** A resolved remote, its local repository opened. */
|
|
26
|
+
export type PreparedRemote = (Extract<ResolvedRemote, {
|
|
27
|
+
kind: "local";
|
|
28
|
+
}> & {
|
|
29
|
+
repository: OpenedRepository;
|
|
30
|
+
}) | Extract<ResolvedRemote, {
|
|
31
|
+
kind: "connector";
|
|
32
|
+
}>;
|
|
33
|
+
/** What {@link resolveRemote} reads: the configuration, the environment and the registry. */
|
|
34
|
+
export interface RemoteResolutionContext {
|
|
35
|
+
/** `protocol.*` settings */
|
|
36
|
+
config: RemoteConfigStore;
|
|
37
|
+
/** `GIT_PROTOCOL_FROM_USER`, `GIT_ALLOW_PROTOCOL` */
|
|
38
|
+
environment?: GitHostEnvironment;
|
|
39
|
+
transports: GitTransportRegistry;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* transport.c's `is_transport_allowed`: `GIT_ALLOW_PROTOCOL` when set (the only transports
|
|
43
|
+
* allowed); else `protocol.<type>.allow`, then `protocol.allow`, then git's defaults (http,
|
|
44
|
+
* https, git and ssh always; ext never; any other, `file` included, only when
|
|
45
|
+
* `GIT_PROTOCOL_FROM_USER` is not false).
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* isTransportAllowed("ext", store); // false
|
|
50
|
+
* isTransportAllowed("file", store, { protocolFromUser: false } as GitHostEnvironment); // false
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
export declare function isTransportAllowed(type: string, config: RemoteConfigStore, environment?: GitHostEnvironment): boolean;
|
|
54
|
+
/** transport.c's `transport_check_allowed`: git's "transport '<type>' not allowed". */
|
|
55
|
+
export declare function checkTransportAllowed(type: string, config: RemoteConfigStore, environment?: GitHostEnvironment): void;
|
|
56
|
+
/**
|
|
57
|
+
* `protocol.version` (git's `get_protocol_version_config`): 0, 1 or 2, default 2; any other
|
|
58
|
+
* value is git's "unknown value for config 'protocol.version'".
|
|
59
|
+
*/
|
|
60
|
+
export declare function protocolVersionOf(config: RemoteConfigStore): 0 | 1 | 2;
|
|
61
|
+
/**
|
|
62
|
+
* Resolves a remote URL (already rewritten by `insteadOf`) to its transport, in git's order
|
|
63
|
+
* (transport_get, then git_connect): a `<helper>::<address>` URL goes to the connector for
|
|
64
|
+
* the helper; `rsync:` is refused; a path or `file://` URL is the local transport (its path
|
|
65
|
+
* checked first, then `protocol.file.allow`); `ssh`/`git` URLs (path, then
|
|
66
|
+
* `protocol.<scheme>.allow`) and any other `<scheme>://` (`protocol.<scheme>.allow`) go to
|
|
67
|
+
* the registry's connector. Without one, git's words: "unable to find remote helper" where
|
|
68
|
+
* git would run a remote helper, ours for ssh and git:// (git would connect directly).
|
|
69
|
+
*
|
|
70
|
+
* @throws TransportError git's lines (exit 128)
|
|
71
|
+
*/
|
|
72
|
+
export declare function resolveRemote(url: string, context: RemoteResolutionContext): ResolvedRemote;
|
|
73
|
+
/**
|
|
74
|
+
* {@link resolveRemote}, then a local remote's repository opened (git's "does not appear to
|
|
75
|
+
* be a git repository" when it cannot be).
|
|
76
|
+
*/
|
|
77
|
+
export declare function prepareRemote(workingCopy: WorkingCopy, url: string, transports: GitTransportRegistry): Promise<PreparedRemote>;
|
|
78
|
+
/** A resolved remote with its local repository opened ({@link prepareRemote}'s second half). */
|
|
79
|
+
export declare function openResolvedRemote(workingCopy: WorkingCopy, resolved: ResolvedRemote): Promise<PreparedRemote>;
|
|
80
|
+
/** The resolution context of a working copy: its configuration and host environment. */
|
|
81
|
+
export declare function remoteContextOf(workingCopy: WorkingCopy, transports: GitTransportRegistry): RemoteResolutionContext;
|
|
82
|
+
/** How a remote command talks to a remote reached through a connector. */
|
|
83
|
+
export interface RemoteSessionOptions {
|
|
84
|
+
credentials?: Credentials;
|
|
85
|
+
headers?: Record<string, string>;
|
|
86
|
+
timeout?: number;
|
|
87
|
+
/** Smart HTTP: gzip large fetch request bodies */
|
|
88
|
+
gzipRequests?: boolean;
|
|
89
|
+
/** Smart HTTP: stream the push request body */
|
|
90
|
+
streamRequestBody?: boolean;
|
|
91
|
+
/** `protocol.version` ({@link protocolVersionOf}) */
|
|
92
|
+
protocolVersion: 0 | 1 | 2;
|
|
93
|
+
/**
|
|
94
|
+
* The program the remote runs for the service (git's `--upload-pack` / `--receive-pack`,
|
|
95
|
+
* `remote.<name>.uploadpack` / `receivepack`); connectors that run one (ssh, git://) use it
|
|
96
|
+
*/
|
|
97
|
+
program?: string;
|
|
98
|
+
signal?: AbortSignal;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Runs `run` over a session the remote's connector opens for `service` (the request's
|
|
102
|
+
* protocol version as git_connect asks for it: v0 for receive-pack when v2 is configured); a
|
|
103
|
+
* native session's stream is closed afterwards, once, whether or not `run` closed it.
|
|
104
|
+
*/
|
|
105
|
+
export declare function withRemoteSession<T>(remote: Extract<ResolvedRemote, {
|
|
106
|
+
kind: "connector";
|
|
107
|
+
}>, service: GitService, options: RemoteSessionOptions, run: (session: GitSession, request: GitConnectRequest) => Promise<T>): Promise<T>;
|
|
108
|
+
/**
|
|
109
|
+
* Runs `run` over a connection to upload-pack of a remote: in process for a local one
|
|
110
|
+
* (`withLocalUploadPack`, protocol v2 unless `protocol.version` says otherwise), else over
|
|
111
|
+
* the session its connector opens (`openUploadPack`).
|
|
112
|
+
*/
|
|
113
|
+
export declare function withRemoteUploadPack<T>(remote: PreparedRemote, options: RemoteSessionOptions, run: (connection: UploadPackConnection) => Promise<T>): Promise<T>;
|
|
114
|
+
/**
|
|
115
|
+
* Runs `run` over a connection to receive-pack of a remote: in process for a local one
|
|
116
|
+
* (`withLocalReceivePack`, with the remote repository's hooks), else over the session its
|
|
117
|
+
* connector opens (`openReceivePack`).
|
|
118
|
+
*/
|
|
119
|
+
export declare function withRemoteReceivePack<T>(remote: PreparedRemote, options: RemoteSessionOptions, run: (connection: ReceivePackConnection) => Promise<T>, hooks?: HookSession, transactionHooks?: HookSession): Promise<T>;
|
|
120
|
+
//# sourceMappingURL=remote-transport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote-transport.d.ts","sourceRoot":"","sources":["../../src/commands/remote-transport.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,iBAAiB,EACtB,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,MAAM,EAMX,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EAC1B,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,kBAAkB,EAClB,gBAAgB,EAChB,WAAW,EACZ,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EA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