@statewalker/vcs-commands 0.4.0 → 0.6.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 +299 -34
- 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 +67 -4
- package/dist/commands/clean-command.d.ts.map +1 -1
- package/dist/commands/clone-command.d.ts +179 -7
- package/dist/commands/clone-command.d.ts.map +1 -1
- 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 +93 -0
- package/dist/commands/core-config.d.ts.map +1 -0
- package/dist/commands/date-format.d.ts +58 -0
- package/dist/commands/date-format.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 +244 -23
- 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 +225 -0
- package/dist/commands/fsck/fsck-command.d.ts.map +1 -0
- package/dist/commands/fsck/fsck-loose.d.ts +68 -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 +148 -0
- package/dist/commands/fsck/fsck-object-checks.d.ts.map +1 -0
- package/dist/commands/fsck/fsck-object-table.d.ts +132 -0
- package/dist/commands/fsck/fsck-object-table.d.ts.map +1 -0
- package/dist/commands/fsck/fsck-pack.d.ts +115 -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 +43 -0
- package/dist/commands/gc-command.d.ts.map +1 -1
- package/dist/commands/git-date.d.ts +66 -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 +416 -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 +231 -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 +55 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +3 -2
- package/dist/commands/init-command.d.ts +12 -1
- package/dist/commands/init-command.d.ts.map +1 -1
- 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 +209 -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 +252 -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 +106 -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 +41 -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 +41 -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 +146 -6
- 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 +80 -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 +321 -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 +69 -13
- package/dist/commands/stash-apply-command.d.ts.map +1 -1
- package/dist/commands/stash-create-command.d.ts +214 -26
- package/dist/commands/stash-create-command.d.ts.map +1 -1
- package/dist/commands/stash-drop-command.d.ts +10 -2
- package/dist/commands/stash-drop-command.d.ts.map +1 -1
- package/dist/commands/stash-list-command.d.ts +2 -4
- package/dist/commands/stash-list-command.d.ts.map +1 -1
- package/dist/commands/stash-working-tree.d.ts +95 -0
- package/dist/commands/stash-working-tree.d.ts.map +1 -0
- package/dist/commands/status-command.d.ts +320 -28
- 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 +137 -6
- package/dist/commands/tree-restore.d.ts.map +1 -1
- package/dist/commands/untracked-cache-support.d.ts +53 -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 +204 -0
- package/dist/commands/worktree-overwrite-checks.d.ts.map +1 -0
- 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-DnmlfwGV.js +61620 -0
- package/dist/core-commands/add.command.impl.d.ts.map +1 -1
- package/dist/core-commands/index.d.ts +0 -3
- package/dist/core-commands/index.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 +29 -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 +371 -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-DxvwPrPB.js +7612 -0
- package/dist/git-command.d.ts +422 -32
- package/dist/git-command.d.ts.map +1 -1
- package/dist/git.d.ts +326 -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 -0
- package/dist/remote-config/index.d.ts.map +1 -1
- package/dist/remote-config/remote-config-store.d.ts +123 -3
- package/dist/remote-config/remote-config-store.d.ts.map +1 -1
- package/dist/remote-config/remote-refs.d.ts +41 -0
- package/dist/remote-config/remote-refs.d.ts.map +1 -0
- 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 +16 -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 +24 -1
- 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/merge-result.d.ts +15 -1
- package/dist/results/merge-result.d.ts.map +1 -1
- package/dist/results/pull-result.d.ts +12 -3
- package/dist/results/pull-result.d.ts.map +1 -1
- package/dist/results/push-result.d.ts +42 -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 +143 -18
- package/dist/results/status-result.d.ts.map +1 -1
- package/dist/results-BZGa2Z3I.js +2934 -0
- package/dist/transport-command.d.ts +56 -1
- package/dist/transport-command.d.ts.map +1 -1
- package/package.json +15 -10
- package/src/commands/add-command.ts +1291 -224
- 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 +832 -0
- package/src/commands/apply/apply-engine.ts +1603 -0
- package/src/commands/apply/apply-parse.ts +1209 -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 +1079 -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 +1426 -297
- package/src/commands/checkout-paths.ts +784 -0
- package/src/commands/cherry-pick-command.ts +156 -396
- package/src/commands/clean-command.ts +532 -85
- package/src/commands/clone-command.ts +826 -55
- package/src/commands/commit-command.ts +1781 -166
- package/src/commands/core-config.ts +196 -0
- package/src/commands/date-format.ts +668 -0
- package/src/commands/describe-command.ts +2 -0
- package/src/commands/diff-command.ts +1898 -110
- package/src/commands/diff-textconv.ts +50 -0
- package/src/commands/fetch-command.ts +1038 -79
- package/src/commands/format-patch-command.ts +969 -0
- package/src/commands/fsck/fetch-fsck.ts +229 -0
- package/src/commands/fsck/fsck-command.ts +3347 -0
- package/src/commands/fsck/fsck-loose.ts +287 -0
- package/src/commands/fsck/fsck-msg-ids.ts +176 -0
- package/src/commands/fsck/fsck-object-checks.ts +1044 -0
- package/src/commands/fsck/fsck-object-table.ts +363 -0
- package/src/commands/fsck/fsck-pack.ts +604 -0
- package/src/commands/fsck/index.ts +5 -0
- package/src/commands/fsck/verify-pack-command.ts +249 -0
- package/src/commands/gc-command.ts +147 -1
- package/src/commands/git-date.ts +895 -0
- package/src/commands/git-describe.ts +316 -0
- package/src/commands/git-hooks.ts +1472 -0
- package/src/commands/git-ident.ts +344 -0
- package/src/commands/hook-command.ts +247 -0
- package/src/commands/index-adder.ts +706 -0
- package/src/commands/index-host.ts +291 -0
- package/src/commands/index.ts +83 -0
- package/src/commands/init-command.ts +60 -11
- package/src/commands/local-clone.ts +183 -0
- package/src/commands/local-transport.ts +762 -0
- package/src/commands/log-command.ts +1915 -170
- package/src/commands/log-graph.ts +671 -0
- package/src/commands/log-output.ts +1359 -0
- package/src/commands/ls-remote-command.ts +101 -58
- package/src/commands/mailmap.ts +129 -0
- package/src/commands/merge-bases.ts +296 -0
- package/src/commands/merge-command.ts +1386 -491
- package/src/commands/merge-config.ts +25 -0
- package/src/commands/merge-drivers.ts +306 -0
- package/src/commands/merge-support.ts +1198 -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 +768 -0
- package/src/commands/notes-support.ts +402 -0
- package/src/commands/notes-tree.ts +602 -0
- package/src/commands/object-id-input.ts +27 -0
- package/src/commands/octopus-merge.ts +377 -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 +196 -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 +1431 -0
- package/src/commands/promisor-remote.ts +298 -0
- package/src/commands/pull-command.ts +207 -22
- package/src/commands/push-command.ts +236 -23
- package/src/commands/read-tree-command.ts +857 -0
- package/src/commands/rebase-command.ts +3808 -371
- 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 +500 -19
- package/src/commands/remote-transport.ts +383 -0
- package/src/commands/reset-command.ts +828 -91
- package/src/commands/restore-command.ts +350 -0
- package/src/commands/rev-list-command.ts +167 -0
- package/src/commands/rev-parse-command.ts +277 -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 +1379 -0
- package/src/commands/rm-command.ts +613 -67
- package/src/commands/sequencer-pick.ts +869 -0
- package/src/commands/sequencer-support.ts +869 -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 +692 -124
- package/src/commands/stash-create-command.ts +752 -89
- package/src/commands/stash-drop-command.ts +67 -6
- package/src/commands/stash-list-command.ts +10 -4
- package/src/commands/stash-working-tree.ts +387 -0
- package/src/commands/status-command.ts +1426 -97
- package/src/commands/status-format.ts +775 -0
- package/src/commands/status-header.ts +330 -0
- package/src/commands/strerror.ts +29 -0
- package/src/commands/submodule-config.ts +94 -0
- package/src/commands/submodule-summary-command.ts +334 -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 +344 -15
- package/src/commands/untracked-cache-support.ts +194 -0
- package/src/commands/worktree-add-command.ts +458 -0
- package/src/commands/worktree-list-command.ts +208 -0
- package/src/commands/worktree-lock-command.ts +96 -0
- package/src/commands/worktree-overwrite-checks.ts +641 -0
- 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 +9 -5
- package/src/core-commands/index.ts +0 -8
- package/src/errors/add-errors.ts +45 -0
- package/src/errors/checkout-errors.ts +46 -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 +1218 -118
- package/src/git.ts +552 -11
- package/src/index.ts +1 -1
- package/src/remote-config/index.ts +1 -0
- package/src/remote-config/remote-config-store.ts +326 -16
- package/src/remote-config/remote-refs.ts +119 -0
- package/src/rename/detect-renames.ts +711 -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 +18 -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 +1051 -0
- package/src/results/fetch-result.ts +24 -1
- package/src/results/index.ts +5 -0
- package/src/results/merge-result.ts +15 -1
- package/src/results/pull-result.ts +12 -3
- package/src/results/push-result.ts +43 -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 +288 -27
- package/src/transport-command.ts +139 -2
- package/dist/commands-BpeXZTC3.js +0 -10278
- package/dist/core-commands/checkout.command.d.ts +0 -103
- package/dist/core-commands/checkout.command.d.ts.map +0 -1
- package/dist/core-commands/checkout.command.impl.d.ts +0 -110
- package/dist/core-commands/checkout.command.impl.d.ts.map +0 -1
- package/dist/status-result-BapZoQaR.js +0 -411
- package/src/core-commands/checkout.command.impl.ts +0 -564
- package/src/core-commands/checkout.command.ts +0 -125
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `git log`'s output: the commits of a walk printed as git prints them (log-tree.c's
|
|
3
|
+
* log_tree_commit and show_log, pretty.c's pretty_print_commit), with the history graph
|
|
4
|
+
* (graph.c, see {@link LogGraph}) and each commit's diff.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* const text = await git.log().setMaxCount(3).callText({ pretty: "oneline", graph: true });
|
|
9
|
+
* // "* 1a2b3c4 Merge branch 'topic'\n|\\ \n| * 5d6e7f8 Topic work\n..."
|
|
10
|
+
* const patch = await git.log().addPath("src").callText({ patch: true, stat: true });
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* The options are `git log`'s: `pretty` takes what `--pretty=`/`--format=` take (`medium`,
|
|
14
|
+
* `short`, `full`, `fuller`, `reference`, `email`, `mboxrd`, `raw`, `oneline`, a
|
|
15
|
+
* `pretty.<name>` alias, `format:<fmt>`, `tformat:<fmt>`, or a format with a `%`), `date`
|
|
16
|
+
* what `--date=` takes, and so on; unset, the configuration's defaults apply (`format.pretty`,
|
|
17
|
+
* `log.date`, `log.abbrevCommit`, `log.decorate`, `log.showRoot`, `log.mailmap`,
|
|
18
|
+
* `log.follow`, `log.graphIndent`, `log.excludeDecoration`, `notes.displayRef`...). Colors
|
|
19
|
+
* are never written (git without a terminal).
|
|
20
|
+
*
|
|
21
|
+
* A commit with an `encoding` header is shown in UTF-8 (git's default `i18n.logOutputEncoding`);
|
|
22
|
+
* another output encoding is not supported. One quirk of git is not reproduced: where its C
|
|
23
|
+
* code takes a user format's output as a NUL-terminated string under `--graph`, a `%x00`
|
|
24
|
+
* can cut what git prints; the whole text is printed here. Combined diffs (`-c`, `--cc`)
|
|
25
|
+
* compare each path with the same path in every parent: git's per-parent rename detection
|
|
26
|
+
* there (find_paths_generic under `diff.renames`, which pairs a merge's path with the file a
|
|
27
|
+
* parent has it under) is not reproduced, but for the one path `--follow` follows.
|
|
28
|
+
*
|
|
29
|
+
* @module
|
|
30
|
+
*/
|
|
31
|
+
import type { Commit, ObjectId } from "@statewalker/vcs-core";
|
|
32
|
+
import { ChangeType } from "../results/diff-entry.js";
|
|
33
|
+
import type { DiffOutputFormat, DiffTextOptions } from "./diff-command.js";
|
|
34
|
+
import type { Mailmap } from "./mailmap.js";
|
|
35
|
+
import { type RefDecorations } from "./pretty-format.js";
|
|
36
|
+
/** How `git log` treats merges in its diffs (`--diff-merges=<mode>`, `-m`, `-c`, `--cc`). */
|
|
37
|
+
export type LogDiffMerges = "off" | "first-parent" | "separate" | "combined" | "dense-combined";
|
|
38
|
+
/** What `git log` prints of each commit (its command-line options). */
|
|
39
|
+
export interface LogOutputOptions {
|
|
40
|
+
/** `--pretty=<format>` / `--format=<format>` (default `format.pretty`, else `medium`) */
|
|
41
|
+
pretty?: string;
|
|
42
|
+
/** `--oneline`: `--pretty=oneline --abbrev-commit` */
|
|
43
|
+
oneline?: boolean;
|
|
44
|
+
/** `--abbrev-commit` / `--no-abbrev-commit` (default `log.abbrevCommit`, false) */
|
|
45
|
+
abbrevCommit?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* `--abbrev=<n>` (default `core.abbrev`, automatic): at least n digits (4 to 40, as git
|
|
48
|
+
* clamps it), in the commits' ids and in the diffs' `index` lines (combined diffs keep the
|
|
49
|
+
* default length, as git's do)
|
|
50
|
+
*/
|
|
51
|
+
abbrev?: number;
|
|
52
|
+
/** `--no-abbrev`: full ids everywhere */
|
|
53
|
+
noAbbrev?: boolean;
|
|
54
|
+
/** `--date=<mode>` (default `log.date`, else `default`) */
|
|
55
|
+
date?: string;
|
|
56
|
+
/**
|
|
57
|
+
* `--decorate[=short|full|auto|no]` / `--no-decorate` (default `log.decorate`, else none,
|
|
58
|
+
* as without a terminal); `true` is `short`
|
|
59
|
+
*/
|
|
60
|
+
decorate?: boolean | "short" | "full" | "auto" | "no";
|
|
61
|
+
/** `--decorate-refs=<pattern>` */
|
|
62
|
+
decorateRefs?: string[];
|
|
63
|
+
/** `--decorate-refs-exclude=<pattern>` */
|
|
64
|
+
decorateRefsExclude?: string[];
|
|
65
|
+
/** `--clear-decorations` */
|
|
66
|
+
clearDecorations?: boolean;
|
|
67
|
+
/** `--graph` */
|
|
68
|
+
graph?: boolean;
|
|
69
|
+
/** `--graph-indent` / `--no-graph-indent` (git 2.5x; default `log.graphIndent`, true) */
|
|
70
|
+
graphIndent?: boolean;
|
|
71
|
+
/** `--graph-lane-limit=<n>` (git 2.5x) */
|
|
72
|
+
graphLaneLimit?: number;
|
|
73
|
+
/** `--topo-order` (`--graph` implies it) */
|
|
74
|
+
topoOrder?: boolean;
|
|
75
|
+
/** `--reverse` */
|
|
76
|
+
reverse?: boolean;
|
|
77
|
+
/** `-p` / `--patch` */
|
|
78
|
+
patch?: boolean;
|
|
79
|
+
/** `-s` / `--no-patch`: no diff output, whatever else asks for it */
|
|
80
|
+
noPatch?: boolean;
|
|
81
|
+
/** `--stat` */
|
|
82
|
+
stat?: boolean;
|
|
83
|
+
/** `--shortstat` */
|
|
84
|
+
shortstat?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* `--summary`: the files created and deleted, renamed and copied (with their similarity),
|
|
87
|
+
* and the mode changes (diff.c's diff_summary)
|
|
88
|
+
*/
|
|
89
|
+
summary?: boolean;
|
|
90
|
+
/** `--numstat` */
|
|
91
|
+
numstat?: boolean;
|
|
92
|
+
/** `--name-only` */
|
|
93
|
+
nameOnly?: boolean;
|
|
94
|
+
/** `--name-status` */
|
|
95
|
+
nameStatus?: boolean;
|
|
96
|
+
/** `-m`: merges' diffs against each parent (`log.diffMerges`, default `separate`) */
|
|
97
|
+
m?: boolean;
|
|
98
|
+
/** `-c`: combined diffs of merges (implies `-p`) */
|
|
99
|
+
c?: boolean;
|
|
100
|
+
/** `--cc`: dense combined diffs of merges (implies `-p`) */
|
|
101
|
+
cc?: boolean;
|
|
102
|
+
/** `--diff-merges=<mode>` */
|
|
103
|
+
diffMerges?: LogDiffMerges;
|
|
104
|
+
/**
|
|
105
|
+
* `--full-diff`: a path-limited log shows the commits' whole diffs (against their parents
|
|
106
|
+
* before `--graph` rewrote them)
|
|
107
|
+
*/
|
|
108
|
+
fullDiff?: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* `--follow`: follow the one path given across renames and copies (default `log.follow`,
|
|
111
|
+
* which needs exactly one plain path; `--follow` throws git's error otherwise)
|
|
112
|
+
*/
|
|
113
|
+
follow?: boolean;
|
|
114
|
+
/** `--root` / `log.showRoot` (default true): a root commit's diff against the empty tree */
|
|
115
|
+
showRoot?: boolean;
|
|
116
|
+
/**
|
|
117
|
+
* `--notes` / `--no-notes` (default: notes shown unless a format is given, or the format
|
|
118
|
+
* has `%N`)
|
|
119
|
+
*/
|
|
120
|
+
notes?: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* `--notes=<ref>` (each one): the notes of these refs shown (`x` is `refs/notes/x`, globs
|
|
123
|
+
* expanded); without `notes: true` (`--notes`) only these, not the default notes ref
|
|
124
|
+
*/
|
|
125
|
+
notesRefs?: string[];
|
|
126
|
+
/** `--use-mailmap` / `--no-mailmap` (default `log.mailmap`, true) */
|
|
127
|
+
mailmap?: boolean;
|
|
128
|
+
/** Options of the diff text (context, algorithm, `--stat=<width>`...) */
|
|
129
|
+
diff?: DiffTextOptions;
|
|
130
|
+
/** Now, in seconds, for relative and human dates (git's GIT_TEST_DATE_NOW) */
|
|
131
|
+
now?: number;
|
|
132
|
+
/** The local zone's offset east of UTC in minutes at a time (default the host's) */
|
|
133
|
+
localTzOffset?: (time: number) => number;
|
|
134
|
+
/** The local zone's name at a time, for `%Z` of `format-local:` (default `Intl`'s) */
|
|
135
|
+
localTzName?: (time: number) => string;
|
|
136
|
+
/** `git format-patch`'s mail settings (with the `email` or `mboxrd` format) */
|
|
137
|
+
mail?: LogMailOptions;
|
|
138
|
+
}
|
|
139
|
+
/** What `git format-patch` adds to the `email` format (log-tree.c, pretty.c). */
|
|
140
|
+
export interface LogMailOptions {
|
|
141
|
+
/** The subject's start (`fmt_output_email_subject`), e.g. `Subject: [PATCH 1/3] ` */
|
|
142
|
+
subject?: (id: ObjectId) => string;
|
|
143
|
+
/** `Message-ID`, `In-Reply-To` and `References` lines after the `From <id>` line */
|
|
144
|
+
threadHeaders?: (id: ObjectId) => string;
|
|
145
|
+
/** Headers after the subject (`format.headers`, `To:`, `Cc:`), each with its LF */
|
|
146
|
+
afterSubject?: string;
|
|
147
|
+
/** `--zero-commit`: an all-zero id on the `From` line */
|
|
148
|
+
zeroCommit?: boolean;
|
|
149
|
+
/** `-k`: the subject kept as it is (its lines not joined) */
|
|
150
|
+
preserveSubject?: boolean;
|
|
151
|
+
/** `--signoff`: this `Signed-off-by: ...` line (with LF) appended, unless already there */
|
|
152
|
+
signoff?: string;
|
|
153
|
+
/** `--from=<ident>`: the `From:` header's ident (the author moves to an in-body From) */
|
|
154
|
+
from?: {
|
|
155
|
+
name: string;
|
|
156
|
+
email: string;
|
|
157
|
+
};
|
|
158
|
+
/** `--force-in-body-from` */
|
|
159
|
+
forceInBodyFrom?: boolean;
|
|
160
|
+
/** `format.encodeEmailHeaders` (default true): RFC 2047 for non-ASCII subjects and names */
|
|
161
|
+
encodeHeaders?: boolean;
|
|
162
|
+
/**
|
|
163
|
+
* The mail's character set (`i18n.logOutputEncoding`, else `i18n.commitEncoding`, else
|
|
164
|
+
* UTF-8): the commit converted to it (kept as stored when it is in it already), named in
|
|
165
|
+
* `Content-Type` and the RFC 2047 words. Conversions are to UTF-8 and ISO-8859-1 only; a
|
|
166
|
+
* commit that cannot be converted is shown as stored, as git shows it when iconv fails.
|
|
167
|
+
*/
|
|
168
|
+
outputEncoding?: string;
|
|
169
|
+
}
|
|
170
|
+
/** A commit the walk shows, with the parents it is shown with (rewritten under `--graph`). */
|
|
171
|
+
export interface LogOutputEntry {
|
|
172
|
+
id: ObjectId;
|
|
173
|
+
commit: Commit;
|
|
174
|
+
parents: ObjectId[];
|
|
175
|
+
/** The parents before `--graph` rewrote them (git's saved parents, for `--full-diff`) */
|
|
176
|
+
savedParents?: ObjectId[];
|
|
177
|
+
}
|
|
178
|
+
/** What the printer reads of the repository (see `LogCommand.callBytes`). */
|
|
179
|
+
export interface LogOutputHost {
|
|
180
|
+
/** A configuration value (the last), undefined when unset */
|
|
181
|
+
config(key: string): string | undefined;
|
|
182
|
+
/** Every value of a configuration key */
|
|
183
|
+
configAll(key: string): string[];
|
|
184
|
+
/** The names configured under `<section>.` (for `pretty.<name>`) */
|
|
185
|
+
configNames(section: string): string[];
|
|
186
|
+
/** An id abbreviated to at least `minLength` digits (default: automatic, `core.abbrev`) */
|
|
187
|
+
abbreviate(id: ObjectId, minLength?: number): Promise<string>;
|
|
188
|
+
/** The commit as stored, decoded as paths decode (header and message) */
|
|
189
|
+
rawCommit(id: ObjectId): Promise<string | undefined>;
|
|
190
|
+
/** The decorations shown (loaded when asked for) */
|
|
191
|
+
decorations(options: {
|
|
192
|
+
decorate: "short" | "full";
|
|
193
|
+
decorateRefs?: string[];
|
|
194
|
+
decorateRefsExclude?: string[];
|
|
195
|
+
clearDecorations?: boolean;
|
|
196
|
+
}): Promise<RefDecorations>;
|
|
197
|
+
/** The notes of a commit in each display notes ref: the ref and the note's text */
|
|
198
|
+
notes(id: ObjectId): Promise<{
|
|
199
|
+
ref: string;
|
|
200
|
+
text: string;
|
|
201
|
+
}[]>;
|
|
202
|
+
/** The mailmap */
|
|
203
|
+
mailmap(): Promise<Mailmap>;
|
|
204
|
+
/**
|
|
205
|
+
* The diff of a commit against a parent (the empty tree for none): undefined bytes when
|
|
206
|
+
* nothing differs; `follow` the path followed, `followPath` the path to follow in the
|
|
207
|
+
* parent, `followChange` set when it was found as a rename or a copy
|
|
208
|
+
*/
|
|
209
|
+
diff(entry: LogOutputEntry, parent: ObjectId | undefined, formats: DiffOutputFormat[], options: {
|
|
210
|
+
statWidth?: number;
|
|
211
|
+
follow?: string;
|
|
212
|
+
fullDiff?: boolean;
|
|
213
|
+
abbrev?: number;
|
|
214
|
+
}): Promise<{
|
|
215
|
+
bytes?: Uint8Array;
|
|
216
|
+
followPath?: string;
|
|
217
|
+
followChange?: ChangeType.RENAME | ChangeType.COPY;
|
|
218
|
+
}>;
|
|
219
|
+
/**
|
|
220
|
+
* The combined diff of a merge (`-c`, `--cc`): the paths that differ from every parent,
|
|
221
|
+
* `names` as `--name-only` / `--name-status` list them (undefined for neither), `patch`
|
|
222
|
+
* the combined patch (when asked); `follow` the one path `--follow` limits it to
|
|
223
|
+
*/
|
|
224
|
+
combinedDiff(entry: LogOutputEntry, options: {
|
|
225
|
+
dense: boolean;
|
|
226
|
+
names?: "name-only" | "name-status";
|
|
227
|
+
patch: boolean;
|
|
228
|
+
follow?: string;
|
|
229
|
+
/** With `follow`: the path each parent has it under (a rename or copy found) */
|
|
230
|
+
parentPaths?: string[];
|
|
231
|
+
/** With `parentPaths`: `R` or `C` for a parent whose path was found as a rename or copy */
|
|
232
|
+
parentStatus?: (string | undefined)[];
|
|
233
|
+
}): Promise<{
|
|
234
|
+
paths: number;
|
|
235
|
+
names: Uint8Array;
|
|
236
|
+
patch: Uint8Array;
|
|
237
|
+
}>;
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* The `From:` header of the email format (pp_user_info): RFC 2047 (unless
|
|
241
|
+
* `format.encodeEmailHeaders` is off) or quoted as needed.
|
|
242
|
+
*/
|
|
243
|
+
export declare function mailFromHeader(name: string, email: string, options?: {
|
|
244
|
+
encodeHeaders?: boolean;
|
|
245
|
+
encoding?: string;
|
|
246
|
+
}): string;
|
|
247
|
+
/** The commit printer: git's rev_info output state over one walk. */
|
|
248
|
+
export declare class LogPrinter {
|
|
249
|
+
private readonly host;
|
|
250
|
+
private readonly options;
|
|
251
|
+
private readonly walk;
|
|
252
|
+
private readonly out;
|
|
253
|
+
private readonly format;
|
|
254
|
+
private readonly dateMode;
|
|
255
|
+
private readonly abbrevCommit;
|
|
256
|
+
private readonly abbrevLength;
|
|
257
|
+
private readonly formats;
|
|
258
|
+
/** git's `revs->diff`: every commit's diff is run (diff formats asked for, `-c`, `--follow`) */
|
|
259
|
+
private readonly allNeedDiff;
|
|
260
|
+
private readonly diffMerges;
|
|
261
|
+
private readonly mergesNeedDiff;
|
|
262
|
+
/** git's `simplify_history` turned off (`-m`, `--diff-merges=separate`) */
|
|
263
|
+
readonly fullHistory: boolean;
|
|
264
|
+
private readonly showRoot;
|
|
265
|
+
private readonly useMailmap;
|
|
266
|
+
private readonly showNotes;
|
|
267
|
+
private readonly decorate;
|
|
268
|
+
private readonly follow;
|
|
269
|
+
private decorations?;
|
|
270
|
+
private mailmap?;
|
|
271
|
+
private graph?;
|
|
272
|
+
private shownOne;
|
|
273
|
+
private missingNewline;
|
|
274
|
+
private shownDashes;
|
|
275
|
+
/** The path `--follow` follows in each commit still to come */
|
|
276
|
+
private readonly followPaths;
|
|
277
|
+
private followPath;
|
|
278
|
+
constructor(host: LogOutputHost, options: LogOutputOptions, walk: {
|
|
279
|
+
interesting: (id: ObjectId) => boolean;
|
|
280
|
+
firstParentOnly: boolean;
|
|
281
|
+
paths: string[];
|
|
282
|
+
});
|
|
283
|
+
/** Whether commits not shown (their diff empty) do not count (`--follow`) */
|
|
284
|
+
get alwaysShowHeader(): boolean;
|
|
285
|
+
/** Prepares what the format reads (decorations, mailmap) and the graph */
|
|
286
|
+
start(): Promise<void>;
|
|
287
|
+
/** Starts the graph over the entries shown */
|
|
288
|
+
useGraph(parentsOf: (id: ObjectId) => readonly ObjectId[]): void;
|
|
289
|
+
private padding;
|
|
290
|
+
private oneline;
|
|
291
|
+
private abbrevId;
|
|
292
|
+
private formatDate;
|
|
293
|
+
private mapped;
|
|
294
|
+
/**
|
|
295
|
+
* One commit (log_tree_commit): its header and message, and its diff; false when it was
|
|
296
|
+
* not shown (`--follow` and nothing of the path changed).
|
|
297
|
+
*/
|
|
298
|
+
showCommit(entry: LogOutputEntry, lookahead: ObjectId[]): Promise<boolean>;
|
|
299
|
+
/** log-tree.c's log_tree_diff: true when it showed the log */
|
|
300
|
+
private logTreeDiff;
|
|
301
|
+
/** get_saved_parents: the parents before rewriting under `--full-diff`, else as shown */
|
|
302
|
+
private diffParents;
|
|
303
|
+
/** The `--abbrev=<n>` of the diffs' `index` lines (revs->diffopt.abbrev) */
|
|
304
|
+
private diffAbbrev;
|
|
305
|
+
private formatIsEmpty;
|
|
306
|
+
/** log-tree.c's log_tree_diff_flush */
|
|
307
|
+
private diffFlush;
|
|
308
|
+
/** combine-diff.c's diff_tree_combined for a merge */
|
|
309
|
+
private combined;
|
|
310
|
+
/** log-tree.c's show_log */
|
|
311
|
+
private showLog;
|
|
312
|
+
/** notes.c's format_display_notes */
|
|
313
|
+
private notesText;
|
|
314
|
+
/** pretty.c's pretty_print_commit */
|
|
315
|
+
private prettyPrint;
|
|
316
|
+
/** pretty.c's pp_user_info */
|
|
317
|
+
private userInfo;
|
|
318
|
+
/** The output so far */
|
|
319
|
+
result(): Uint8Array;
|
|
320
|
+
}
|
|
321
|
+
/** diff-merges.c's func_by_opt */
|
|
322
|
+
export declare function mergesMode(value: string): LogDiffMerges | undefined;
|
|
323
|
+
//# sourceMappingURL=log-output.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log-output.d.ts","sourceRoot":"","sources":["../../src/commands/log-output.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAe,MAAM,uBAAuB,CAAC;AAI3E,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE3E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EAKL,KAAK,cAAc,EAEpB,MAAM,oBAAoB,CAAC;AAG5B,6FAA6F;AAC7F,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,cAAc,GAAG,UAAU,GAAG,UAAU,GAAG,gBAAgB,CAAC;AAEhG,uEAAuE;AACvE,MAAM,WAAW,gBAAgB;IAC/B,yFAAyF;IACzF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sDAAsD;IACtD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,mFAAmF;IACnF,YAAY,CAAC,EAAE,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E,CAAC,EAAE,EAAE,QAAQ,KAAK,OAAO,CAAC;QACvC,eAAe,EAAE,OAAO,CAAC;QACzB,KAAK,EAAE,MAAM,EAAE,CAAC;KACjB,EA4FF;IAED,6EAA6E;IAC7E,IAAI,gBAAgB,IAAI,OAAO,CAE9B;IAED,0EAA0E;IACpE,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAY3B;IAED,8CAA8C;IAC9C,QAAQ,CAAC,SAAS,EAAE,CAAC,EAAE,EAAE,QAAQ,KAAK,SAAS,QAAQ,EAAE,GAAG,IAAI,CAS/D;IAED,OAAO,CAAC,OAAO;IAIf,OAAO,CAAC,OAAO;YAID,QAAQ;IAKtB,OAAO,CAAC,UAAU;IAQlB,OAAO,CAAC,MAAM;IAOd;;;OAGG;IACG,UAAU,CAAC,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CA0B/E;IAED,8DAA8D;YAChD,WAAW;IAkCzB,yFAAyF;IACzF,OAAO,CAAC,WAAW;IAInB,4EAA4E;IAC5E,OAAO,CAAC,UAAU;IAMlB,OAAO,CAAC,aAAa;IAIrB,uCAAuC;YACzB,SAAS;IA4BvB,sDAAsD;YACxC,QAAQ;IAgFtB,4BAA4B;YACd,OAAO;IAoDrB,qCAAqC;YACvB,SAAS;IAevB,qCAAqC;YACvB,WAAW;IAwHzB,8BAA8B;IAC9B,OAAO,CAAC,QAAQ;IA2ChB,wBAAwB;IACxB,MAAM,IAAI,UAAU,CAEnB;CACF;AAqCD,kCAAkC;AAClC,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAqBnE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ObjectId } from "@statewalker/vcs-core";
|
|
2
2
|
import { TransportCommand } from "../transport-command.js";
|
|
3
3
|
/**
|
|
4
4
|
* A remote ref entry.
|
|
@@ -60,6 +60,8 @@ export declare class LsRemoteCommand extends TransportCommand<LsRemoteResult> {
|
|
|
60
60
|
private heads;
|
|
61
61
|
private tags;
|
|
62
62
|
private uploadPack?;
|
|
63
|
+
/** The remote (name or URL) {@link remoteUrl} resolved */
|
|
64
|
+
private remoteName?;
|
|
63
65
|
/**
|
|
64
66
|
* Set the remote to query.
|
|
65
67
|
*
|
|
@@ -93,7 +95,9 @@ export declare class LsRemoteCommand extends TransportCommand<LsRemoteResult> {
|
|
|
93
95
|
*/
|
|
94
96
|
isTags(): boolean;
|
|
95
97
|
/**
|
|
96
|
-
* Set
|
|
98
|
+
* Set the program the remote runs for upload-pack (git's `--upload-pack`, over the
|
|
99
|
+
* `remote.<name>.uploadpack` of the remote listed, given or default): what an ssh connector runs, and
|
|
100
|
+
* what git:// names in its request line.
|
|
97
101
|
*
|
|
98
102
|
* @param uploadPack Path to git-upload-pack on remote
|
|
99
103
|
*/
|
|
@@ -102,7 +106,8 @@ export declare class LsRemoteCommand extends TransportCommand<LsRemoteResult> {
|
|
|
102
106
|
* Execute the ls-remote operation.
|
|
103
107
|
*
|
|
104
108
|
* @returns Refs from the remote repository
|
|
105
|
-
* @throws InvalidRemoteError
|
|
109
|
+
* @throws InvalidRemoteError git's "No remote configured to list refs from." when no remote
|
|
110
|
+
* is given and git's default one has no URL
|
|
106
111
|
*/
|
|
107
112
|
call(): Promise<LsRemoteResult>;
|
|
108
113
|
/**
|
|
@@ -112,11 +117,22 @@ export declare class LsRemoteCommand extends TransportCommand<LsRemoteResult> {
|
|
|
112
117
|
*/
|
|
113
118
|
callAsMap(): Promise<Map<string, ObjectId>>;
|
|
114
119
|
/**
|
|
115
|
-
*
|
|
120
|
+
* The URL a remote resolves to, without contacting it: `git ls-remote --get-url
|
|
121
|
+
* [<remote>]` (the remote's first URL, or the URL given, with `insteadOf` applied). Without
|
|
122
|
+
* a remote, git's `remote_get(NULL)`: the current branch's `branch.<name>.remote` (read as a
|
|
123
|
+
* URL when no such remote has one), else the only configured remote, else `origin`; when
|
|
124
|
+
* that names no remote with a URL, git's "No remote configured to list refs from.".
|
|
116
125
|
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
126
|
+
* @example
|
|
127
|
+
* ```typescript
|
|
128
|
+
* // [url "https://example.com/"] insteadOf = ex:
|
|
129
|
+
* await git.lsRemote().setRemote("ex:repo.git").callGetUrl(); // "https://example.com/repo.git"
|
|
130
|
+
* ```
|
|
131
|
+
*
|
|
132
|
+
* @throws InvalidRemoteError "fatal: No remote configured to list refs from." (exit 128)
|
|
119
133
|
*/
|
|
120
|
-
|
|
134
|
+
callGetUrl(): Promise<string>;
|
|
135
|
+
/** The URL of the remote given, or of git's default remote (see {@link callGetUrl}). */
|
|
136
|
+
private remoteUrl;
|
|
121
137
|
}
|
|
122
138
|
//# sourceMappingURL=ls-remote-command.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ls-remote-command.d.ts","sourceRoot":"","sources":["../../src/commands/ls-remote-command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"ls-remote-command.d.ts","sourceRoot":"","sources":["../../src/commands/ls-remote-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAKrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAG3D;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,kCAAkC;IAClC,QAAQ,EAAE,QAAQ,CAAC;IACnB,gDAAgD;IAChD,cAAc,CAAC,EAAE,QAAQ,CAAC;IAC1B,qCAAqC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6BAA6B;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,2BAA2B;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,kBAAkB;IAClB,IAAI,EAAE,SAAS,EAAE,CAAC;IAClB,wCAAwC;IACxC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBAAa,eAAgB,SAAQ,gBAAgB,CAAC,cAAc,CAAC;IACnE,OAAO,CAAC,MAAM,CAAC,CAAS;IACxB,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,UAAU,CAAC,CAAS;IAC5B,0DAA0D;IAC1D,OAAO,CAAC,UAAU,CAAC,CAAS;IAE5B;;;;;;OAMG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAI9B;IAED;;OAEG;IACH,SAAS,IAAI,MAAM,GAAG,SAAS,CAE9B;IAED;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAI7B;IAED;;OAEG;IACH,OAAO,IAAI,OAAO,CAEjB;IAED;;;;OAIG;IACH,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAI3B;IAED;;OAEG;IACH,MAAM,IAAI,OAAO,CAEhB;IAED;;;;;;OAMG;IACH,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAItC;IAED;;;;;;OAMG;IACG,IAAI,IAAI,OAAO,CAAC,cAAc,CAAC,CAmEpC;IAED;;;;OAIG;IACG,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAOhD;IAED;;;;;;;;;;;;;;OAcG;IACG,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC,CAIlC;IAED,wFAAwF;YAC1E,SAAS;CAyBxB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* git's mailmap (mailmap.c): `.mailmap`, `mailmap.blob` and `mailmap.file`, mapping the
|
|
3
|
+
* names and emails of commits to canonical ones (`%aN`, `%aE`, and `git log`'s headers when
|
|
4
|
+
* `log.mailmap` is on, its default).
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* const map = new Mailmap();
|
|
9
|
+
* map.read("Jane Doe <jane@example.com> <jane@old.example>\n");
|
|
10
|
+
* map.map("jane", "JANE@old.example"); // { name: "Jane Doe", email: "jane@example.com" }
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @module
|
|
14
|
+
*/
|
|
15
|
+
/** A mailmap: entries keyed by email, case-insensitively, as git's string list keeps them. */
|
|
16
|
+
export declare class Mailmap {
|
|
17
|
+
private readonly entries;
|
|
18
|
+
/** Whether it has no entries (git maps nothing then). */
|
|
19
|
+
get empty(): boolean;
|
|
20
|
+
/** The lines of a mailmap file (read_mailmap_string / read_mailmap_file) added. */
|
|
21
|
+
read(text: string): this;
|
|
22
|
+
private readLine;
|
|
23
|
+
/** mailmap.c's add_mapping. */
|
|
24
|
+
private add;
|
|
25
|
+
/** mailmap.c's map_user: the canonical name and email of an identity. */
|
|
26
|
+
map(name: string, email: string): {
|
|
27
|
+
name: string;
|
|
28
|
+
email: string;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=mailmap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mailmap.d.ts","sourceRoot":"","sources":["../../src/commands/mailmap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AA0CH,8FAA8F;AAC9F,qBAAa,OAAO;IAClB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAmC;IAE3D,yDAAyD;IACzD,IAAI,KAAK,IAAI,OAAO,CAEnB;IAED,mFAAmF;IACnF,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAMvB;IAED,OAAO,CAAC,QAAQ;IAchB,+BAA+B;IAC/B,OAAO,CAAC,GAAG;IA6BX,yEAAyE;IACzE,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAShE;CACF"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* git's merge bases in git's order (`repo_get_merge_bases`), over real commits and the
|
|
3
|
+
* virtual commits merge-ort makes of merged merge bases (in memory, never stored).
|
|
4
|
+
*
|
|
5
|
+
* The order matters to merge-ort: with several bases it merges them pairwise, the oldest
|
|
6
|
+
* first, and which base is "Temporary merge branch 1" decides the virtual base's markers.
|
|
7
|
+
* git paints both sides down a queue ordered by committer date (ties in insertion order),
|
|
8
|
+
* collects the commits reached from both in the order they come out, drops the ones reachable
|
|
9
|
+
* from another, and sorts the rest by date (stable).
|
|
10
|
+
*
|
|
11
|
+
* With a commit-graph that has corrected commit dates the queue is ordered by generation
|
|
12
|
+
* first, as git's `compare_commits_by_gen_then_commit_date` (commits outside the graph and
|
|
13
|
+
* virtual ones have generation Infinity), and the redundancy check skips commits whose
|
|
14
|
+
* generation shows they cannot reach the base checked. A graph whose generations cannot be
|
|
15
|
+
* trusted (`CommitGraph.generationsTrusted`: zero levels, a corrupt record, generations not
|
|
16
|
+
* above the parents') gives every commit generation Infinity, as git reads a zero generation.
|
|
17
|
+
*/
|
|
18
|
+
import type { Commits, ObjectId } from "@statewalker/vcs-core";
|
|
19
|
+
import type { CheckedEntry } from "./worktree-overwrite-checks.js";
|
|
20
|
+
/** A commit as the merge-base walk sees it: real (by id) or virtual (merge-ort's). */
|
|
21
|
+
export interface BaseNode {
|
|
22
|
+
/** The id of a real commit; undefined for a virtual one */
|
|
23
|
+
id?: ObjectId;
|
|
24
|
+
/** A key unique among the nodes (the id, or `virtual:<n>`) */
|
|
25
|
+
key: string;
|
|
26
|
+
/** Committer date (git's `commit->date`; 0 for a virtual commit) */
|
|
27
|
+
date: number;
|
|
28
|
+
/** The commit-graph generation (Infinity outside the graph and for a virtual commit) */
|
|
29
|
+
generation: number;
|
|
30
|
+
/** The parents, loaded on demand for a real commit */
|
|
31
|
+
parents(): Promise<BaseNode[]>;
|
|
32
|
+
/** The commit's tree as a flat map */
|
|
33
|
+
tree(): Promise<Map<string, CheckedEntry>>;
|
|
34
|
+
}
|
|
35
|
+
/** What {@link MergeBaseGraph} reads of real commits. */
|
|
36
|
+
export interface MergeBaseSource {
|
|
37
|
+
/**
|
|
38
|
+
* The commit's parents and committer timestamp (and commit-graph generation, Infinity when
|
|
39
|
+
* absent), undefined when missing
|
|
40
|
+
*/
|
|
41
|
+
load(id: ObjectId): Promise<{
|
|
42
|
+
parents: ObjectId[];
|
|
43
|
+
date: number;
|
|
44
|
+
generation?: number;
|
|
45
|
+
} | undefined>;
|
|
46
|
+
/** The flat tree of a commit */
|
|
47
|
+
tree(id: ObjectId): Promise<Map<string, CheckedEntry>>;
|
|
48
|
+
/** Whether generations are corrected commit dates (the queue is then ordered by them) */
|
|
49
|
+
generationOrder?(): Promise<boolean>;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* A source over a commit store: headers from the commit-graph where it has the commit (no
|
|
53
|
+
* commit is read), the queue ordered as git orders it with that graph. The source reads one
|
|
54
|
+
* graph for its whole life (the one loaded at its first read): a graph written while a merge
|
|
55
|
+
* base is computed does not mix its generations with the old one's.
|
|
56
|
+
*/
|
|
57
|
+
export declare function commitsBaseSource(commits: Commits, tree: (id: ObjectId) => Promise<Map<string, CheckedEntry>>): MergeBaseSource;
|
|
58
|
+
/** Real and virtual commits, and git's merge-base computation over them. */
|
|
59
|
+
export declare class MergeBaseGraph {
|
|
60
|
+
private readonly source;
|
|
61
|
+
private readonly nodes;
|
|
62
|
+
private virtuals;
|
|
63
|
+
private byGeneration?;
|
|
64
|
+
constructor(source: MergeBaseSource);
|
|
65
|
+
/** The node of a real commit. */
|
|
66
|
+
commit(id: ObjectId): BaseNode;
|
|
67
|
+
/** A virtual commit (merge-ort's `make_virtual_commit`): date 0, the given parents. */
|
|
68
|
+
virtual(tree: Map<string, CheckedEntry>, parents: BaseNode[]): BaseNode;
|
|
69
|
+
private ready;
|
|
70
|
+
/**
|
|
71
|
+
* git's paint_down_to_common: the commits reached from both `one` and `twos`, in the
|
|
72
|
+
* order the date queue yields them (`flags` is left as the walk painted it).
|
|
73
|
+
*/
|
|
74
|
+
private paintDownToCommon;
|
|
75
|
+
/**
|
|
76
|
+
* Whether `node` is reachable from one of `from` (git's redundancy check). A commit whose
|
|
77
|
+
* generation is below `node`'s (or equal and finite) cannot reach it and is not walked.
|
|
78
|
+
*/
|
|
79
|
+
private reachable;
|
|
80
|
+
/** git's repo_get_merge_bases(one, two), in git's order (newest first). */
|
|
81
|
+
mergeBases(one: BaseNode, two: BaseNode): Promise<BaseNode[]>;
|
|
82
|
+
/** git's repo_get_merge_bases_many(one, twos) (`git merge-base --all one twos...`). */
|
|
83
|
+
mergeBasesMany(one: BaseNode, twos: BaseNode[]): Promise<BaseNode[]>;
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=merge-bases.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge-bases.d.ts","sourceRoot":"","sources":["../../src/commands/merge-bases.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAsB,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEnF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAEnE,sFAAsF;AACtF,MAAM,WAAW,QAAQ;IACvB,2DAA2D;IAC3D,EAAE,CAAC,EAAE,QAAQ,CAAC;IACd,8DAA8D;IAC9D,GAAG,EAAE,MAAM,CAAC;IACZ,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,wFAAwF;IACxF,UAAU,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,OAAO,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC/B,sCAAsC;IACtC,I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