@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
|
@@ -1,42 +1,50 @@
|
|
|
1
|
+
import type { ObjectId, PersonIdent } from "@statewalker/vcs-core";
|
|
1
2
|
import { GitCommand } from "../git-command.js";
|
|
2
3
|
import { ContentMergeStrategy, FastForwardMode, type MergeResult, MergeStrategy } from "../results/merge-result.js";
|
|
4
|
+
import { type CleanupMode } from "./message-cleanup.js";
|
|
5
|
+
/** What `git merge` is asked to do. */
|
|
6
|
+
export declare enum MergeOperation {
|
|
7
|
+
/** Merge the included commit (`git merge <commit>`) */
|
|
8
|
+
MERGE = "merge",
|
|
9
|
+
/** Give up the merge in progress (`git merge --abort`) */
|
|
10
|
+
ABORT = "abort",
|
|
11
|
+
/** Commit the resolved merge in progress (`git merge --continue`) */
|
|
12
|
+
CONTINUE = "continue",
|
|
13
|
+
/**
|
|
14
|
+
* Forget the merge in progress, leaving the index and the worktree as they are
|
|
15
|
+
* (`git merge --quit`); its autostash is kept on `refs/stash`.
|
|
16
|
+
*/
|
|
17
|
+
QUIT = "quit"
|
|
18
|
+
}
|
|
19
|
+
/** git's refusal of a merge of histories with no common commit. */
|
|
20
|
+
export declare const UNRELATED_HISTORIES_MESSAGE = "fatal: refusing to merge unrelated histories";
|
|
21
|
+
/** git's refusal while the index has unmerged entries. */
|
|
22
|
+
export declare const UNMERGED_FILES_MESSAGE: (action: "Merging" | "Committing") => string;
|
|
3
23
|
/**
|
|
4
24
|
* Merge branches.
|
|
5
25
|
*
|
|
6
|
-
* Equivalent to `git merge
|
|
26
|
+
* Equivalent to `git merge`: a fast-forward, or git's merge-ort, written to the index and
|
|
27
|
+
* the working tree as git writes them. Before anything is written the merge is refused, with
|
|
28
|
+
* git's messages, where it would overwrite local changes or untracked files (or the index
|
|
29
|
+
* holds staged changes, or unmerged entries, or a merge is already in progress). A merge
|
|
30
|
+
* with conflicts leaves the files with git's conflict markers (`merge.conflictStyle`), the
|
|
31
|
+
* conflicts staged at stages 1-3, and git's state (`MERGE_HEAD`, `MERGE_MSG`, `MERGE_MODE`,
|
|
32
|
+
* `ORIG_HEAD`, `AUTO_MERGE`), so native git can `--continue` or `--abort` it and the other
|
|
33
|
+
* way round (`setOperation`).
|
|
7
34
|
*
|
|
8
|
-
*
|
|
35
|
+
* The result's `output` holds what git prints (`Auto-merging f`, `CONFLICT (...)`, ...)
|
|
36
|
+
* without the diffstat; a refused merge has status FAILED and git's error in `message`.
|
|
9
37
|
*
|
|
10
38
|
* @example
|
|
11
39
|
* ```typescript
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* .call();
|
|
40
|
+
* const result = await git.merge().include("feature-branch").call();
|
|
41
|
+
* if (result.status === MergeStatus.CONFLICTING) {
|
|
42
|
+
* // resolve, `git add`, then
|
|
43
|
+
* await git.merge().setOperation(MergeOperation.CONTINUE).call();
|
|
44
|
+
* }
|
|
16
45
|
*
|
|
17
46
|
* // Force merge commit (no fast-forward)
|
|
18
|
-
*
|
|
19
|
-
* .include("feature-branch")
|
|
20
|
-
* .setFastForwardMode(FastForwardMode.NO_FF)
|
|
21
|
-
* .call();
|
|
22
|
-
*
|
|
23
|
-
* // Fail if fast-forward not possible
|
|
24
|
-
* const result = await git.merge()
|
|
25
|
-
* .include("feature-branch")
|
|
26
|
-
* .setFastForwardMode(FastForwardMode.FF_ONLY)
|
|
27
|
-
* .call();
|
|
28
|
-
*
|
|
29
|
-
* // Use "ours" strategy (keep our tree, ignore theirs)
|
|
30
|
-
* const result = await git.merge()
|
|
31
|
-
* .include("feature-branch")
|
|
32
|
-
* .setStrategy(MergeStrategy.OURS)
|
|
33
|
-
* .call();
|
|
34
|
-
*
|
|
35
|
-
* // Use "theirs" strategy (replace our tree with theirs)
|
|
36
|
-
* const result = await git.merge()
|
|
37
|
-
* .include("feature-branch")
|
|
38
|
-
* .setStrategy(MergeStrategy.THEIRS)
|
|
39
|
-
* .call();
|
|
47
|
+
* await git.merge().include("feature").setFastForwardMode(FastForwardMode.NO_FF).call();
|
|
40
48
|
* ```
|
|
41
49
|
*/
|
|
42
50
|
export declare class MergeCommand extends GitCommand<MergeResult> {
|
|
@@ -47,7 +55,28 @@ export declare class MergeCommand extends GitCommand<MergeResult> {
|
|
|
47
55
|
private squash;
|
|
48
56
|
private commit;
|
|
49
57
|
private message?;
|
|
58
|
+
private cleanupMode?;
|
|
59
|
+
private inProcess;
|
|
60
|
+
private noVerify;
|
|
61
|
+
/**
|
|
62
|
+
* `--no-verify`: the `pre-merge-commit` and `commit-msg` hooks do not run
|
|
63
|
+
* (`prepare-commit-msg` and `post-merge` still do).
|
|
64
|
+
*/
|
|
65
|
+
setNoVerify(noVerify: boolean): this;
|
|
66
|
+
/**
|
|
67
|
+
* A merge another command makes in process (a rebase's `merge`), which reads no `git
|
|
68
|
+
* merge` configuration of its own (`git_merge_config`).
|
|
69
|
+
*
|
|
70
|
+
* @internal
|
|
71
|
+
*/
|
|
72
|
+
setInProcess(inProcess: boolean): this;
|
|
50
73
|
private bigFileThreshold;
|
|
74
|
+
private operation;
|
|
75
|
+
private author?;
|
|
76
|
+
private committer?;
|
|
77
|
+
private autoStash?;
|
|
78
|
+
private renormalize?;
|
|
79
|
+
private allowUnrelated;
|
|
51
80
|
/**
|
|
52
81
|
* Add a commit/branch to merge.
|
|
53
82
|
*
|
|
@@ -67,23 +96,18 @@ export declare class MergeCommand extends GitCommand<MergeResult> {
|
|
|
67
96
|
/**
|
|
68
97
|
* Set merge strategy.
|
|
69
98
|
*
|
|
70
|
-
* - RECURSIVE (default):
|
|
99
|
+
* - RECURSIVE (default): git's merge-ort
|
|
71
100
|
* - OURS: Keep our tree, ignore their changes (creates merge commit)
|
|
72
101
|
* - THEIRS: Replace our tree with theirs (creates merge commit)
|
|
73
|
-
* - RESOLVE:
|
|
102
|
+
* - RESOLVE: as RECURSIVE
|
|
74
103
|
*
|
|
75
104
|
* @param strategy Merge strategy
|
|
76
105
|
*/
|
|
77
106
|
setStrategy(strategy: MergeStrategy): this;
|
|
78
107
|
/**
|
|
79
|
-
* Set content merge strategy for handling file-level conflicts
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
* - THEIRS: Take their version for conflicts
|
|
83
|
-
* - UNION: Concatenate both sides (ours first, then theirs)
|
|
84
|
-
*
|
|
85
|
-
* When set, conflicts are resolved automatically using this strategy
|
|
86
|
-
* instead of producing conflict markers.
|
|
108
|
+
* Set content merge strategy for handling file-level conflicts (git's `-X ours`,
|
|
109
|
+
* `-X theirs`, `merge=union`): conflicting hunks are resolved to that side instead of
|
|
110
|
+
* producing conflict markers.
|
|
87
111
|
*
|
|
88
112
|
* @param contentStrategy Content merge strategy
|
|
89
113
|
*/
|
|
@@ -93,32 +117,82 @@ export declare class MergeCommand extends GitCommand<MergeResult> {
|
|
|
93
117
|
* `core.bigFileThreshold`, default 50 MiB).
|
|
94
118
|
*
|
|
95
119
|
* A binary file (over the threshold, or a NUL byte in its first 8000 bytes) is
|
|
96
|
-
* never content-merged
|
|
97
|
-
*
|
|
120
|
+
* never content-merged: as git does, OURS and THEIRS take that side's file whole, and
|
|
121
|
+
* otherwise ours stays with a conflict.
|
|
98
122
|
*
|
|
99
123
|
* @param threshold Size in bytes
|
|
100
124
|
*/
|
|
101
125
|
setBigFileThreshold(threshold: number): this;
|
|
102
126
|
/**
|
|
103
|
-
* Set squash mode
|
|
104
|
-
*
|
|
105
|
-
* When true, changes are staged but not committed, and HEAD is not updated.
|
|
127
|
+
* Set squash mode (`git merge --squash`): the merge's result is written to the index and
|
|
128
|
+
* the worktree with `SQUASH_MSG`, and HEAD is not updated.
|
|
106
129
|
*
|
|
107
130
|
* @param squash Whether to squash
|
|
108
131
|
*/
|
|
109
132
|
setSquash(squash: boolean): this;
|
|
110
133
|
/**
|
|
111
|
-
* Set whether to commit after merge
|
|
134
|
+
* Set whether to commit after merge (`--no-commit` when false: the merge stops before
|
|
135
|
+
* committing, with `MERGE_HEAD` and `MERGE_MSG` written for a later commit).
|
|
112
136
|
*
|
|
113
137
|
* @param commit Whether to commit (default: true)
|
|
114
138
|
*/
|
|
115
139
|
setCommit(commit: boolean): this;
|
|
116
140
|
/**
|
|
117
|
-
* Set the merge commit message
|
|
141
|
+
* Set the merge commit message (default git's: `Merge branch 'feature'`), as git's
|
|
142
|
+
* `merge -m` takes it: cleaned up as a commit message (`whitespace`, which ends the last
|
|
143
|
+
* line, unless {@link setCleanupMode} or `commit.cleanup` says otherwise; `verbatim`
|
|
144
|
+
* stores it as given, without a newline added, unlike `commit -m`).
|
|
118
145
|
*
|
|
119
146
|
* @param message Commit message
|
|
120
147
|
*/
|
|
121
148
|
setMessage(message: string): this;
|
|
149
|
+
/**
|
|
150
|
+
* Add a paragraph to the message, as each further `-m` of `git merge` does: joined to
|
|
151
|
+
* the message so far by a blank line (`-m a -m b` is `"a\n\nb"` before its cleanup).
|
|
152
|
+
* The first call is {@link setMessage}.
|
|
153
|
+
*
|
|
154
|
+
* @param message One paragraph of the merge commit message
|
|
155
|
+
*/
|
|
156
|
+
addMessage(message: string): this;
|
|
157
|
+
/**
|
|
158
|
+
* How the merge commit's message is cleaned up (git's `merge --cleanup=<mode>`; default
|
|
159
|
+
* `commit.cleanup`, else `whitespace`, as without an editor).
|
|
160
|
+
*/
|
|
161
|
+
setCleanupMode(mode: CleanupMode): this;
|
|
162
|
+
/**
|
|
163
|
+
* Merge (default), or `--abort` / `--continue` the merge in progress.
|
|
164
|
+
*
|
|
165
|
+
* @param operation What to do
|
|
166
|
+
*/
|
|
167
|
+
setOperation(operation: MergeOperation): this;
|
|
168
|
+
/**
|
|
169
|
+
* Merge content as if checked out and checked in afresh (`-X renormalize`,
|
|
170
|
+
* `-X no-renormalize`; default `merge.renormalize`, false): a side whose change is only a
|
|
171
|
+
* change of line endings or filters does not conflict.
|
|
172
|
+
*/
|
|
173
|
+
setRenormalize(renormalize: boolean): this;
|
|
174
|
+
/**
|
|
175
|
+
* Stash local changes away before the merge and apply them after it (`--autostash`;
|
|
176
|
+
* default `merge.autoStash`, false). A merge that stops (conflicts, `--no-commit`) keeps
|
|
177
|
+
* them in MERGE_AUTOSTASH until it is continued or aborted.
|
|
178
|
+
*/
|
|
179
|
+
setAutoStash(autoStash: boolean): this;
|
|
180
|
+
/**
|
|
181
|
+
* Merge histories that share no commit (`--allow-unrelated-histories`): refused by
|
|
182
|
+
* default with git's "refusing to merge unrelated histories". A two-head merge then
|
|
183
|
+
* merges against the empty tree.
|
|
184
|
+
*/
|
|
185
|
+
setAllowUnrelatedHistories(allow: boolean): this;
|
|
186
|
+
/**
|
|
187
|
+
* The author of the merge commit (default: resolved as git resolves it, from
|
|
188
|
+
* `GIT_AUTHOR_*`, `author.*`, `user.*`).
|
|
189
|
+
*/
|
|
190
|
+
setAuthor(author: PersonIdent): this;
|
|
191
|
+
/**
|
|
192
|
+
* The committer of the merge commit (default: resolved as git resolves it, from
|
|
193
|
+
* `GIT_COMMITTER_*`, `committer.*`, `user.*`).
|
|
194
|
+
*/
|
|
195
|
+
setCommitter(committer: PersonIdent): this;
|
|
122
196
|
/**
|
|
123
197
|
* Execute the merge.
|
|
124
198
|
*
|
|
@@ -126,57 +200,118 @@ export declare class MergeCommand extends GitCommand<MergeResult> {
|
|
|
126
200
|
*/
|
|
127
201
|
call(): Promise<MergeResult>;
|
|
128
202
|
/**
|
|
129
|
-
*
|
|
203
|
+
* git pull's `pull_into_void` on an unborn branch: `checkout_fast_forward` from the empty
|
|
204
|
+
* tree to `mergeHead` (a two-way switch, so a staged change the commit does not touch is
|
|
205
|
+
* kept, one it would overwrite refuses the pull), then HEAD's branch created at it with the
|
|
206
|
+
* reflog line `initial pull`. Used by {@link PullCommand}; a one-shot call like
|
|
207
|
+
* {@link call}.
|
|
130
208
|
*/
|
|
131
|
-
|
|
209
|
+
callIntoVoid(mergeHead: ObjectId): Promise<MergeResult>;
|
|
210
|
+
/** What the sparse checkout printed while the result was written (see MergeResult.warnings). */
|
|
211
|
+
private readonly sparseWarnings;
|
|
212
|
+
private run;
|
|
132
213
|
/**
|
|
133
|
-
*
|
|
214
|
+
* git's fast-forward setting as the strategy leaves it: `ours` (NO_FAST_FORWARD) always
|
|
215
|
+
* makes a merge commit, whatever was asked.
|
|
134
216
|
*/
|
|
135
|
-
private
|
|
217
|
+
private ffMode;
|
|
218
|
+
/** git's get_octopus_merge_bases: the merge bases of HEAD and every head, folded. */
|
|
219
|
+
private octopusBases;
|
|
136
220
|
/**
|
|
137
|
-
*
|
|
221
|
+
* The merge between git's `create_autostash_ref` and `apply_autostash_ref`
|
|
222
|
+
* (`merge.autoStash`): local changes stashed away first, applied again once the merge is
|
|
223
|
+
* done, kept in MERGE_AUTOSTASH while it stops for the user.
|
|
138
224
|
*/
|
|
139
|
-
private
|
|
225
|
+
private withAutostash;
|
|
226
|
+
/** Applies MERGE_AUTOSTASH back, if there is one. */
|
|
227
|
+
private popAutostash;
|
|
140
228
|
/**
|
|
141
|
-
* Perform
|
|
142
|
-
*
|
|
143
|
-
* Returns merged entries and conflicts.
|
|
229
|
+
* Perform a fast-forward merge (git's checkout_fast_forward: a two-way switch).
|
|
144
230
|
*/
|
|
145
|
-
private
|
|
231
|
+
private doFastForward;
|
|
146
232
|
/**
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
* @returns Merged tree entry if successful, undefined if content merge not applicable
|
|
233
|
+
* Perform a three-way merge (git's merge-ort).
|
|
150
234
|
*/
|
|
151
|
-
private
|
|
235
|
+
private doMerge;
|
|
152
236
|
/**
|
|
153
|
-
*
|
|
154
|
-
*
|
|
237
|
+
* A merge of several heads: git-merge-octopus (the heads merged one after the other) or,
|
|
238
|
+
* with strategy `ours`, git-merge-ours (HEAD's tree); written when it merged or left
|
|
239
|
+
* conflicts with the last head, nothing written when it gave up. As git's merge for any
|
|
240
|
+
* strategy: committed, or stopped before the commit (`--no-commit`), or squashed
|
|
241
|
+
* (`SQUASH_MSG`, HEAD left alone).
|
|
155
242
|
*/
|
|
156
|
-
private
|
|
243
|
+
private doOctopus;
|
|
244
|
+
/** git's fmt-merge-msg title for several heads: `Merge branches 'a', 'b' and tag 'v1'`. */
|
|
245
|
+
private octopusMessage;
|
|
246
|
+
/** The heads MERGE_HEAD names (one per line: several for an octopus). */
|
|
247
|
+
private mergeHeads;
|
|
248
|
+
/** `git merge --continue`: commits the resolved merge with MERGE_MSG. */
|
|
249
|
+
private continueMerge;
|
|
250
|
+
/** `git merge --abort`: `git reset --merge`, the merge's state removed. */
|
|
251
|
+
private abort;
|
|
157
252
|
/**
|
|
158
|
-
*
|
|
253
|
+
* A failed strategy leaves AUTO_MERGE as git leaves it: git's merge restores the local
|
|
254
|
+
* changes it saved (`restore_state`, a stash of them applied by merge-ort), so AUTO_MERGE
|
|
255
|
+
* ends up the tree of the index and the tracked files' worktree content, and is absent
|
|
256
|
+
* when there was nothing to save. Returns the warning lines the reset printed (each ending
|
|
257
|
+
* with a newline).
|
|
159
258
|
*/
|
|
160
|
-
private
|
|
259
|
+
private restoreStateQuirk;
|
|
161
260
|
/**
|
|
162
|
-
*
|
|
261
|
+
* restore_state's `reset --hard` over a file the index marks assume-unchanged: `stash
|
|
262
|
+
* create` did not save its change (the flag hides it), and the reset writes it again from
|
|
263
|
+
* the index when it no longer matches (oneway_merge compares with CE_MATCH_IGNORE_VALID),
|
|
264
|
+
* so the local change is lost, as in git. The entry keeps its flag and takes the new stat.
|
|
265
|
+
* With `cacheTree` (the index is that tree's), the index is written with its cache-tree.
|
|
163
266
|
*/
|
|
164
|
-
private
|
|
267
|
+
private resetAssumeUnchanged;
|
|
268
|
+
private context;
|
|
165
269
|
/**
|
|
166
|
-
*
|
|
270
|
+
* MERGE_MSG's text before any conflicts hint (git's `write_merge_state`): the message as
|
|
271
|
+
* given with a newline added, always (`-m "x\n"` gives `x` and a blank line), or git's
|
|
272
|
+
* default message (already one line ended).
|
|
167
273
|
*/
|
|
168
|
-
private
|
|
274
|
+
private stateMessage;
|
|
275
|
+
/** git's merge exports GIT_REFLOG_ACTION before it writes a ref (see reflogActionValue). */
|
|
276
|
+
protected refTransactionHookEnv(): Record<string, string> | undefined;
|
|
277
|
+
/** `GIT_REFLOG_ACTION` as git's merge exports it (`merge <names>`, `pull` for a pull). */
|
|
278
|
+
private reflogActionValue;
|
|
169
279
|
/**
|
|
170
|
-
*
|
|
280
|
+
* prepare_to_commit of git's merge, around the hooks: `pre-merge-commit` (not with
|
|
281
|
+
* --no-verify; the index read again after it), then MERGE_HEAD and MERGE_MSG written,
|
|
282
|
+
* `prepare-commit-msg` (`merge`) and `commit-msg` (not with --no-verify) over MERGE_MSG,
|
|
283
|
+
* whose text, cleaned up, is the commit's. A refusing hook stops the merge before its
|
|
284
|
+
* commit, its state written (abort_commit); `refused` is git's message then. Without
|
|
285
|
+
* hooks: the message cleaned up.
|
|
171
286
|
*/
|
|
172
|
-
private
|
|
287
|
+
private mergeCommitHooks;
|
|
288
|
+
/** MERGE_HEAD, MERGE_MSG and MERGE_MODE of a merge stopped before its commit. */
|
|
289
|
+
private writeMergeState;
|
|
290
|
+
private strategyName;
|
|
291
|
+
/** git's `cleanup_message` of a merge commit's message (prepare_to_commit, no editor). */
|
|
292
|
+
private cleanup;
|
|
293
|
+
private storeCommit;
|
|
173
294
|
/**
|
|
174
|
-
*
|
|
295
|
+
* HEAD (its branch, when attached) moved to `id`, logged as git's merge logs it:
|
|
296
|
+
* `<action>: <outcome>`, the action being `merge <names as given>` (`pull` for a pull);
|
|
297
|
+
* or with `message` as it is.
|
|
175
298
|
*/
|
|
176
|
-
private
|
|
299
|
+
private updateHead;
|
|
300
|
+
/** How git's merge message names what is merged: `branch 'x'`, `tag 'v1'`, ... */
|
|
301
|
+
private describeMergeSource;
|
|
302
|
+
/** git's default merge message: `Merge branch 'x'` (`into <branch>` off main/master). */
|
|
303
|
+
private defaultMessage;
|
|
304
|
+
/**
|
|
305
|
+
* Check if commitA is an ancestor of commitB.
|
|
306
|
+
*/
|
|
307
|
+
private isAncestor;
|
|
177
308
|
/**
|
|
178
|
-
*
|
|
309
|
+
* The commit a head to merge names (git's `get_merge_parent`, `peel_to_type` commit): a
|
|
310
|
+
* tree or a blob is `error: <name>: expected commit type, but the object dereferences to
|
|
311
|
+
* tree type` and `merge: <name> - not something we can merge`.
|
|
179
312
|
*/
|
|
180
|
-
private
|
|
313
|
+
private mergeHeadOf;
|
|
181
314
|
}
|
|
315
|
+
/** The content strategy as merge-ort's favor (`-X ours`, `-X theirs`, union). */
|
|
316
|
+
export declare function favorOf(strategy: ContentMergeStrategy | undefined): "ours" | "theirs" | "union" | undefined;
|
|
182
317
|
//# sourceMappingURL=merge-command.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merge-command.d.ts","sourceRoot":"","sources":["../../src/commands/merge-command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"merge-command.d.ts","sourceRoot":"","sources":["../../src/commands/merge-command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAU,QAAQ,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAuB3E,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,KAAK,WAAW,EAEhB,aAAa,EACd,MAAM,4BAA4B,CAAC;AAmBpC,OAAO,EACL,KAAK,WAAW,EAIjB,MAAM,sBAAsB,CAAC;AAuB9B,uCAAuC;AACvC,oBAAY,cAAc;IACxB,uDAAuD;IACvD,KAAK,UAAU;IACf,0DAA0D;IAC1D,KAAK,UAAU;IACf,qEAAqE;IACrE,QAAQ,aAAa;IACrB;;;OAGG;IACH,IAAI,SAAS;CACd;AAED,mEAAmE;AACnE,eAAO,MAAM,2BAA2B,iDAAiD,CAAC;AAE1F,0DAA0D;AAC1D,eAAO,MAAM,sBAAsB,WAAY,SAAS,GAAG,YAAY,WAMzD,CAAC;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBAAa,YAAa,SAAQ,UAAU,CAAC,WAAW,CAAC;IACvD,OAAO,CAAC,QAAQ,CAAgB;IAChC,OAAO,CAAC,eAAe,CAAsB;IAC7C,OAAO,CAAC,QAAQ,CAA2B;IAC3C,OAAO,CAAC,eAAe,CAAC,CAAuB;IAC/C,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,OAAO,CAAC,WAAW,CAAC,CAAc;IAClC,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,QA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AAC,OAAO;YAKD,WAAW;IASzB;;;;OAIG;YACW,UAAU;IAqBxB,kFAAkF;YACpE,mBAAmB;IAYjC,yFAAyF;YAC3E,cAAc;IAO5B;;OAEG;YACW,UAAU;IAKxB;;;;OAIG;YACW,WAAW;CAc1B;AAoBD,iFAAiF;AACjF,wBAAgB,OAAO,CACrB,QAAQ,EAAE,oBAAoB,GAAG,SAAS,GACzC,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAWzC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The settings `merge`, `cherry-pick`, `revert`, `rebase` and `pull` read from the
|
|
3
|
+
* working copy's configuration, as git reads them.
|
|
4
|
+
*/
|
|
5
|
+
import { type ConflictStyle } from "@statewalker/vcs-utils";
|
|
6
|
+
import type { WorkingCopy } from "@statewalker/vcs-working-tree";
|
|
7
|
+
/** A configuration value (`section.name` or `section.sub.name`), undefined when unset. */
|
|
8
|
+
export declare function configValue(workingCopy: WorkingCopy, key: string): string | undefined;
|
|
9
|
+
/** A git boolean setting, `fallback` when unset or not a boolean. */
|
|
10
|
+
export declare function configBool(workingCopy: WorkingCopy, key: string, fallback: boolean): boolean;
|
|
11
|
+
/** `merge.conflictStyle`: `merge` (default), `diff3` or `zdiff3`. */
|
|
12
|
+
export declare function conflictStyleOf(workingCopy: WorkingCopy): ConflictStyle;
|
|
13
|
+
//# sourceMappingURL=merge-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge-config.d.ts","sourceRoot":"","sources":["../../src/commands/merge-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,aAAa,EAAgB,MAAM,wBAAwB,CAAC;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAIjE,0FAA0F;AAC1F,wBAAgB,WAAW,CAAC,WAAW,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAErF;AAED,qEAAqE;AACrE,wBAAgB,UAAU,CAAC,WAAW,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAE5F;AAED,qEAAqE;AACrE,wBAAgB,eAAe,CAAC,WAAW,EAAE,WAAW,GAAG,aAAa,CAGvE"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Merge drivers (git's `merge` attribute and `merge.<driver>.*`): the builtin `text`,
|
|
3
|
+
* `binary` and `union` drivers are merge-ort's own; a host registers its drivers as callbacks
|
|
4
|
+
* (git runs `merge.<driver>.driver` as a shell command, which is not portable), much as it
|
|
5
|
+
* registers filter drivers.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* installMergeDrivers(workingCopy, {
|
|
10
|
+
* // `*.json merge=keep-ours` in .gitattributes
|
|
11
|
+
* "keep-ours": createMergeDriver(async ({ ours }) => ({ content: ours, conflict: false })),
|
|
12
|
+
* });
|
|
13
|
+
* await git.merge().include("feature").call();
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
import { type ConflictStyle, type LineMergeOptions } from "@statewalker/vcs-utils";
|
|
17
|
+
import type { WorkingCopy, Worktree } from "@statewalker/vcs-working-tree";
|
|
18
|
+
import type { MergeAttributes, OrtMergeOptions } from "./ort-merge.js";
|
|
19
|
+
/** A `merge` attribute: set, unset, a driver name, or unspecified. */
|
|
20
|
+
export type MergeAttributeValue = true | false | string | undefined;
|
|
21
|
+
/** What a merge driver gets (git's `%O`, `%A`, `%B`, `%L`, `%P`, `%S`, `%X`, `%Y`). */
|
|
22
|
+
export interface MergeDriverInput {
|
|
23
|
+
/** The path being merged */
|
|
24
|
+
path: string;
|
|
25
|
+
/** The merge base's content (empty when there is none) */
|
|
26
|
+
base: Uint8Array;
|
|
27
|
+
/** Our content */
|
|
28
|
+
ours: Uint8Array;
|
|
29
|
+
/** Their content */
|
|
30
|
+
theirs: Uint8Array;
|
|
31
|
+
/** The base's name (`%S`), ours (`%X`), theirs (`%Y`) */
|
|
32
|
+
baseLabel: string;
|
|
33
|
+
oursLabel: string;
|
|
34
|
+
theirsLabel: string;
|
|
35
|
+
/** The conflict marker length to use (`%L`) */
|
|
36
|
+
markerSize: number;
|
|
37
|
+
}
|
|
38
|
+
/** What a merge driver gives back: the merged content, and whether it holds conflicts. */
|
|
39
|
+
export interface MergeDriverResult {
|
|
40
|
+
content: Uint8Array;
|
|
41
|
+
conflict: boolean;
|
|
42
|
+
}
|
|
43
|
+
/** A merge driver a host registers. */
|
|
44
|
+
export interface MergeDriver {
|
|
45
|
+
merge(input: MergeDriverInput): Promise<MergeDriverResult>;
|
|
46
|
+
/**
|
|
47
|
+
* The driver used for the merges of merge bases that build a virtual base
|
|
48
|
+
* (`merge.<driver>.recursive`); the configuration's value wins when it has one
|
|
49
|
+
*/
|
|
50
|
+
recursive?: string;
|
|
51
|
+
}
|
|
52
|
+
/** Merge drivers by name. */
|
|
53
|
+
export type MergeDriverRegistry = ReadonlyMap<string, MergeDriver> | Record<string, MergeDriver>;
|
|
54
|
+
/** A merge driver from a callback. */
|
|
55
|
+
export declare function createMergeDriver(merge: (input: MergeDriverInput) => Promise<MergeDriverResult>, options?: {
|
|
56
|
+
recursive?: string;
|
|
57
|
+
}): MergeDriver;
|
|
58
|
+
/** The driver registered under `name`, if any. */
|
|
59
|
+
export declare function lookupMergeDriver(registry: MergeDriverRegistry | undefined, name: string): MergeDriver | undefined;
|
|
60
|
+
/** Registers the merge drivers the merges of `workingCopy` use. */
|
|
61
|
+
export declare function installMergeDrivers(workingCopy: WorkingCopy, drivers: MergeDriverRegistry): void;
|
|
62
|
+
/** The merge drivers registered for `workingCopy`. */
|
|
63
|
+
export declare function mergeDriversOf(workingCopy: WorkingCopy): MergeDriverRegistry | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* The driver for a path's `merge` attribute (git's `find_ll_merge_driver`): `text` when set
|
|
66
|
+
* (or unspecified without `merge.default`), `binary` when unset, else the named driver: a
|
|
67
|
+
* registered one, a builtin (`text`, `binary`, `union`), or `text` for an unknown name.
|
|
68
|
+
*/
|
|
69
|
+
export declare function findMergeDriver(attr: MergeAttributeValue, drivers: MergeDriverRegistry | undefined, defaultDriver?: string): {
|
|
70
|
+
name: string;
|
|
71
|
+
custom?: MergeDriver;
|
|
72
|
+
};
|
|
73
|
+
/** The three versions of a path {@link lowLevelMerge} merges, with their marker labels. */
|
|
74
|
+
export interface LowLevelMergeInput {
|
|
75
|
+
path: string;
|
|
76
|
+
base: Uint8Array;
|
|
77
|
+
ours: Uint8Array;
|
|
78
|
+
theirs: Uint8Array;
|
|
79
|
+
baseLabel: string;
|
|
80
|
+
oursLabel: string;
|
|
81
|
+
theirsLabel: string;
|
|
82
|
+
}
|
|
83
|
+
/** How {@link lowLevelMerge} merges (git's `ll_merge_options` and the path's attributes). */
|
|
84
|
+
export interface LowLevelMergeOptions {
|
|
85
|
+
/** The path's `merge` and `conflict-marker-size` attributes */
|
|
86
|
+
attributes?: MergeAttributes;
|
|
87
|
+
/** Registered drivers, `merge.default`, `merge.<driver>.recursive` */
|
|
88
|
+
drivers?: MergeDriverRegistry;
|
|
89
|
+
defaultDriver?: string;
|
|
90
|
+
recursiveDriver?: (name: string) => string | undefined;
|
|
91
|
+
/** A merge of merge bases (`virtual_ancestor`): the recursive driver, the base on binary */
|
|
92
|
+
virtualAncestor?: boolean;
|
|
93
|
+
/** `-X ours` / `-X theirs` / `-X union` (ignored for a merge of merge bases) */
|
|
94
|
+
favor?: "ours" | "theirs" | "union";
|
|
95
|
+
style?: ConflictStyle;
|
|
96
|
+
/** Added to the marker size (merge-ort's nested conflicts) */
|
|
97
|
+
extraMarkerSize?: number;
|
|
98
|
+
/** Files above this size are binary (core.bigFileThreshold; default 512 MiB) */
|
|
99
|
+
bigFileThreshold?: number;
|
|
100
|
+
/** The diff algorithm: merge-ort's histogram, `checkout -m`'s myers */
|
|
101
|
+
algorithm?: LineMergeOptions["algorithm"];
|
|
102
|
+
}
|
|
103
|
+
/** What {@link lowLevelMerge} gives: `binary` is git's `LL_MERGE_BINARY_CONFLICT`. */
|
|
104
|
+
export interface LowLevelMergeResult {
|
|
105
|
+
status: "ok" | "conflict" | "binary";
|
|
106
|
+
content: Uint8Array;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* git's `ll_merge`: the driver of the path's `merge` attribute (text, binary, union or a
|
|
110
|
+
* registered one) with the `conflict-marker-size` markers; binary content (or a `binary`
|
|
111
|
+
* driver) keeps ours as a binary conflict, the base in a merge of merge bases.
|
|
112
|
+
*/
|
|
113
|
+
export declare function lowLevelMerge(input: LowLevelMergeInput, options?: LowLevelMergeOptions): Promise<LowLevelMergeResult>;
|
|
114
|
+
/**
|
|
115
|
+
* The settings of a merge from the configuration and the worktree: `merge.renames`,
|
|
116
|
+
* `merge.directoryRenames`, `merge.renameLimit`, `merge.renormalize`, `merge.default`,
|
|
117
|
+
* `merge.<driver>.recursive`, the `merge` / `conflict-marker-size` attributes as merge-ort
|
|
118
|
+
* reads them (the worktree's `.gitattributes`, as git reads them with no index of its own),
|
|
119
|
+
* and the registered drivers.
|
|
120
|
+
*/
|
|
121
|
+
export declare function ortConfigOptions(workingCopy: WorkingCopy, worktree: Worktree | undefined, overrides?: {
|
|
122
|
+
renormalize?: boolean;
|
|
123
|
+
/**
|
|
124
|
+
* Read the attributes as `ll_merge` reads them for a path of the index (`checkout -m`):
|
|
125
|
+
* the worktree's `.gitattributes`, then the index's (merge-ort's attribute index is
|
|
126
|
+
* none)
|
|
127
|
+
*/
|
|
128
|
+
indexAttributes?: boolean;
|
|
129
|
+
}): Partial<OrtMergeOptions>;
|
|
130
|
+
//# sourceMappingURL=merge-drivers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge-drivers.d.ts","sourceRoot":"","sources":["../../src/commands/merge-drivers.ts"],"names":[],"mappings":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