@statewalker/vcs-commands 0.7.0 → 0.9.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/dist/commands/add-command.d.ts +70 -0
- package/dist/commands/add-command.d.ts.map +1 -1
- package/dist/commands/add-patch/add-patch.d.ts +7 -0
- package/dist/commands/add-patch/add-patch.d.ts.map +1 -1
- package/dist/commands/add-patch/patch-backend.d.ts.map +1 -1
- package/dist/commands/am/am-command.d.ts +102 -1
- package/dist/commands/am/am-command.d.ts.map +1 -1
- package/dist/commands/am/index.d.ts +1 -0
- package/dist/commands/am/index.d.ts.map +1 -1
- package/dist/commands/am/mailsplit.d.ts +88 -0
- package/dist/commands/am/mailsplit.d.ts.map +1 -0
- package/dist/commands/apply/apply-command.d.ts +2 -0
- package/dist/commands/apply/apply-command.d.ts.map +1 -1
- package/dist/commands/apply/apply-engine.d.ts.map +1 -1
- package/dist/commands/apply/apply-parse.d.ts +7 -0
- package/dist/commands/apply/apply-parse.d.ts.map +1 -1
- package/dist/commands/apply/index.d.ts +1 -1
- package/dist/commands/apply/index.d.ts.map +1 -1
- package/dist/commands/bisect/bisect-command.d.ts +2 -0
- package/dist/commands/bisect/bisect-command.d.ts.map +1 -1
- package/dist/commands/blame-command.d.ts +303 -8
- package/dist/commands/blame-command.d.ts.map +1 -1
- package/dist/commands/blame-ignore.d.ts +48 -0
- package/dist/commands/blame-ignore.d.ts.map +1 -0
- package/dist/commands/branch-command.d.ts +148 -18
- package/dist/commands/branch-command.d.ts.map +1 -1
- package/dist/commands/branch-info-command.d.ts +55 -0
- package/dist/commands/branch-info-command.d.ts.map +1 -0
- package/dist/commands/branch-tracking.d.ts +106 -17
- package/dist/commands/branch-tracking.d.ts.map +1 -1
- package/dist/commands/branch-upstream-command.d.ts +83 -0
- package/dist/commands/branch-upstream-command.d.ts.map +1 -0
- package/dist/commands/check-mailmap-command.d.ts +49 -0
- package/dist/commands/check-mailmap-command.d.ts.map +1 -0
- package/dist/commands/checkout-command.d.ts +26 -3
- package/dist/commands/checkout-command.d.ts.map +1 -1
- package/dist/commands/checkout-paths.d.ts +4 -0
- package/dist/commands/checkout-paths.d.ts.map +1 -1
- package/dist/commands/cherry-command.d.ts +61 -0
- package/dist/commands/cherry-command.d.ts.map +1 -0
- package/dist/commands/cherry-pick-command.d.ts +82 -1
- package/dist/commands/cherry-pick-command.d.ts.map +1 -1
- package/dist/commands/clean-command.d.ts +44 -0
- package/dist/commands/clean-command.d.ts.map +1 -1
- package/dist/commands/clean-interactive.d.ts +56 -0
- package/dist/commands/clean-interactive.d.ts.map +1 -0
- package/dist/commands/clone-command.d.ts +116 -2
- package/dist/commands/clone-command.d.ts.map +1 -1
- package/dist/commands/commit-command.d.ts +239 -5
- package/dist/commands/commit-command.d.ts.map +1 -1
- package/dist/commands/commit-reuse.d.ts +33 -0
- package/dist/commands/commit-reuse.d.ts.map +1 -0
- package/dist/commands/config-command.d.ts +236 -0
- package/dist/commands/config-command.d.ts.map +1 -0
- package/dist/commands/config-value-types.d.ts +91 -0
- package/dist/commands/config-value-types.d.ts.map +1 -0
- package/dist/commands/core-config.d.ts +20 -0
- package/dist/commands/core-config.d.ts.map +1 -1
- package/dist/commands/describe-command.d.ts +71 -64
- package/dist/commands/describe-command.d.ts.map +1 -1
- package/dist/commands/diff-color-config.d.ts +73 -0
- package/dist/commands/diff-color-config.d.ts.map +1 -0
- package/dist/commands/diff-command.d.ts +369 -10
- package/dist/commands/diff-command.d.ts.map +1 -1
- package/dist/commands/fetch-command.d.ts +80 -0
- package/dist/commands/fetch-command.d.ts.map +1 -1
- package/dist/commands/fetch-multiple-command.d.ts +193 -0
- package/dist/commands/fetch-multiple-command.d.ts.map +1 -0
- package/dist/commands/fmt-merge-msg-command.d.ts +124 -0
- package/dist/commands/fmt-merge-msg-command.d.ts.map +1 -0
- package/dist/commands/fork-point.d.ts +38 -0
- package/dist/commands/fork-point.d.ts.map +1 -0
- package/dist/commands/format-patch-command.d.ts +69 -3
- package/dist/commands/format-patch-command.d.ts.map +1 -1
- package/dist/commands/fsck/fetch-fsck.d.ts +51 -0
- package/dist/commands/fsck/fetch-fsck.d.ts.map +1 -1
- package/dist/commands/gc-command.d.ts +8 -0
- package/dist/commands/gc-command.d.ts.map +1 -1
- package/dist/commands/git-describe.d.ts +81 -4
- package/dist/commands/git-describe.d.ts.map +1 -1
- package/dist/commands/git-hooks.d.ts +50 -1
- package/dist/commands/git-hooks.d.ts.map +1 -1
- package/dist/commands/grep/grep-command.d.ts +210 -0
- package/dist/commands/grep/grep-command.d.ts.map +1 -0
- package/dist/commands/grep/grep-engine.d.ts +218 -0
- package/dist/commands/grep/grep-engine.d.ts.map +1 -0
- package/dist/commands/grep/index.d.ts +3 -0
- package/dist/commands/grep/index.d.ts.map +1 -0
- package/dist/commands/index-adder.d.ts +13 -2
- package/dist/commands/index-adder.d.ts.map +1 -1
- package/dist/commands/index.d.ts +38 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +5 -3
- package/dist/commands/init-command.d.ts +89 -0
- package/dist/commands/init-command.d.ts.map +1 -1
- package/dist/commands/interpret-trailers-command.d.ts +90 -0
- package/dist/commands/interpret-trailers-command.d.ts.map +1 -0
- package/dist/commands/line-log.d.ts +161 -0
- package/dist/commands/line-log.d.ts.map +1 -0
- package/dist/commands/local-transport.d.ts +36 -5
- package/dist/commands/local-transport.d.ts.map +1 -1
- package/dist/commands/log-command.d.ts +527 -13
- package/dist/commands/log-command.d.ts.map +1 -1
- package/dist/commands/log-graph.d.ts +30 -3
- package/dist/commands/log-graph.d.ts.map +1 -1
- package/dist/commands/log-output.d.ts +199 -6
- package/dist/commands/log-output.d.ts.map +1 -1
- package/dist/commands/ls-remote-command.d.ts +2 -0
- package/dist/commands/ls-remote-command.d.ts.map +1 -1
- package/dist/commands/mailmap.d.ts +53 -0
- package/dist/commands/mailmap.d.ts.map +1 -1
- package/dist/commands/merge-base-command.d.ts +60 -0
- package/dist/commands/merge-base-command.d.ts.map +1 -0
- package/dist/commands/merge-bases.d.ts +23 -0
- package/dist/commands/merge-bases.d.ts.map +1 -1
- package/dist/commands/merge-command.d.ts +147 -10
- package/dist/commands/merge-command.d.ts.map +1 -1
- package/dist/commands/merge-drivers.d.ts +2 -0
- package/dist/commands/merge-drivers.d.ts.map +1 -1
- package/dist/commands/merge-strategy-options.d.ts +69 -0
- package/dist/commands/merge-strategy-options.d.ts.map +1 -0
- package/dist/commands/merge-support.d.ts +10 -0
- package/dist/commands/merge-support.d.ts.map +1 -1
- package/dist/commands/message-cleanup.d.ts +2 -0
- package/dist/commands/message-cleanup.d.ts.map +1 -1
- package/dist/commands/mv-command.d.ts +4 -0
- package/dist/commands/mv-command.d.ts.map +1 -1
- package/dist/commands/name-rev-command.d.ts +65 -0
- package/dist/commands/name-rev-command.d.ts.map +1 -0
- package/dist/commands/name-rev.d.ts +136 -0
- package/dist/commands/name-rev.d.ts.map +1 -0
- package/dist/commands/notes-command.d.ts.map +1 -1
- package/dist/commands/octopus-merge.d.ts +26 -1
- package/dist/commands/octopus-merge.d.ts.map +1 -1
- package/dist/commands/ort-merge.d.ts +16 -0
- package/dist/commands/ort-merge.d.ts.map +1 -1
- package/dist/commands/ort-recursive.d.ts.map +1 -1
- package/dist/commands/patch-id.d.ts +58 -0
- package/dist/commands/patch-id.d.ts.map +1 -1
- package/dist/commands/pathspec-file.d.ts +39 -0
- package/dist/commands/pathspec-file.d.ts.map +1 -0
- package/dist/commands/pathspec.d.ts +3 -0
- package/dist/commands/pathspec.d.ts.map +1 -1
- package/dist/commands/pretty-format.d.ts +43 -3
- package/dist/commands/pretty-format.d.ts.map +1 -1
- package/dist/commands/promisor-remote.d.ts.map +1 -1
- package/dist/commands/pull-command.d.ts +186 -32
- package/dist/commands/pull-command.d.ts.map +1 -1
- package/dist/commands/push-command.d.ts +225 -9
- package/dist/commands/push-command.d.ts.map +1 -1
- package/dist/commands/range-diff/index.d.ts +4 -0
- package/dist/commands/range-diff/index.d.ts.map +1 -0
- package/dist/commands/range-diff/linear-assignment.d.ts +27 -0
- package/dist/commands/range-diff/linear-assignment.d.ts.map +1 -0
- package/dist/commands/range-diff/range-diff-command.d.ts +121 -0
- package/dist/commands/range-diff/range-diff-command.d.ts.map +1 -0
- package/dist/commands/range-diff/range-diff.d.ts +106 -0
- package/dist/commands/range-diff/range-diff.d.ts.map +1 -0
- package/dist/commands/read-tree-command.d.ts +20 -0
- package/dist/commands/read-tree-command.d.ts.map +1 -1
- package/dist/commands/rebase-command.d.ts +189 -8
- package/dist/commands/rebase-command.d.ts.map +1 -1
- package/dist/commands/ref-filter/for-each-ref-command.d.ts +121 -0
- package/dist/commands/ref-filter/for-each-ref-command.d.ts.map +1 -0
- package/dist/commands/ref-filter/index.d.ts +8 -0
- package/dist/commands/ref-filter/index.d.ts.map +1 -0
- package/dist/commands/ref-filter/ref-atoms.d.ts +88 -0
- package/dist/commands/ref-filter/ref-atoms.d.ts.map +1 -0
- package/dist/commands/ref-filter/ref-filter.d.ts +178 -0
- package/dist/commands/ref-filter/ref-filter.d.ts.map +1 -0
- package/dist/commands/ref-filter/ref-format.d.ts +222 -0
- package/dist/commands/ref-filter/ref-format.d.ts.map +1 -0
- package/dist/commands/ref-filter/ref-listing-command.d.ts +56 -0
- package/dist/commands/ref-filter/ref-listing-command.d.ts.map +1 -0
- package/dist/commands/ref-filter/ref-quote.d.ts +20 -0
- package/dist/commands/ref-filter/ref-quote.d.ts.map +1 -0
- package/dist/commands/ref-filter/version-compare.d.ts +20 -0
- package/dist/commands/ref-filter/version-compare.d.ts.map +1 -0
- package/dist/commands/reflog-command.d.ts +120 -0
- package/dist/commands/reflog-command.d.ts.map +1 -1
- package/dist/commands/reflog-walk.d.ts +72 -0
- package/dist/commands/reflog-walk.d.ts.map +1 -0
- package/dist/commands/remerge-diff.d.ts +59 -0
- package/dist/commands/remerge-diff.d.ts.map +1 -0
- package/dist/commands/remote-command.d.ts +179 -29
- package/dist/commands/remote-command.d.ts.map +1 -1
- package/dist/commands/remote-show-command.d.ts +204 -0
- package/dist/commands/remote-show-command.d.ts.map +1 -0
- package/dist/commands/remote-transport.d.ts +7 -1
- package/dist/commands/remote-transport.d.ts.map +1 -1
- package/dist/commands/reset-command.d.ts +21 -4
- package/dist/commands/reset-command.d.ts.map +1 -1
- package/dist/commands/restore-command.d.ts +9 -3
- package/dist/commands/restore-command.d.ts.map +1 -1
- package/dist/commands/rev-filter/commit-filter.d.ts +95 -0
- package/dist/commands/rev-filter/commit-filter.d.ts.map +1 -0
- package/dist/commands/rev-filter/commit-grep.d.ts +91 -0
- package/dist/commands/rev-filter/commit-grep.d.ts.map +1 -0
- package/dist/commands/rev-filter/index.d.ts +3 -0
- package/dist/commands/rev-filter/index.d.ts.map +1 -0
- package/dist/commands/rev-list-command.d.ts +226 -2
- package/dist/commands/rev-list-command.d.ts.map +1 -1
- package/dist/commands/revert-command.d.ts +54 -1
- package/dist/commands/revert-command.d.ts.map +1 -1
- package/dist/commands/revision-range.d.ts +34 -1
- package/dist/commands/revision-range.d.ts.map +1 -1
- package/dist/commands/revision-resolver.d.ts +15 -0
- package/dist/commands/revision-resolver.d.ts.map +1 -1
- package/dist/commands/rm-command.d.ts +70 -2
- package/dist/commands/rm-command.d.ts.map +1 -1
- package/dist/commands/sequencer-pick.d.ts +186 -5
- package/dist/commands/sequencer-pick.d.ts.map +1 -1
- package/dist/commands/sequencer-support.d.ts +12 -1
- package/dist/commands/sequencer-support.d.ts.map +1 -1
- package/dist/commands/serve-repository.d.ts +7 -0
- package/dist/commands/serve-repository.d.ts.map +1 -1
- package/dist/commands/shortlog-command.d.ts +109 -0
- package/dist/commands/shortlog-command.d.ts.map +1 -0
- package/dist/commands/shortlog.d.ts +151 -0
- package/dist/commands/shortlog.d.ts.map +1 -0
- package/dist/commands/show-command.d.ts +130 -0
- package/dist/commands/show-command.d.ts.map +1 -0
- package/dist/commands/show-commit.d.ts +11 -0
- package/dist/commands/show-commit.d.ts.map +1 -0
- package/dist/commands/signature-check.d.ts +164 -0
- package/dist/commands/signature-check.d.ts.map +1 -0
- package/dist/commands/signing.d.ts +160 -0
- package/dist/commands/signing.d.ts.map +1 -0
- package/dist/commands/sparse-checkout-command.d.ts.map +1 -1
- package/dist/commands/sparse-index-view.d.ts +45 -0
- package/dist/commands/sparse-index-view.d.ts.map +1 -0
- package/dist/commands/ssh-signer.d.ts +29 -0
- package/dist/commands/ssh-signer.d.ts.map +1 -0
- package/dist/commands/ssh-verifier.d.ts +42 -0
- package/dist/commands/ssh-verifier.d.ts.map +1 -0
- package/dist/commands/stash-apply-command.d.ts +5 -0
- package/dist/commands/stash-apply-command.d.ts.map +1 -1
- package/dist/commands/stash-branch-command.d.ts +34 -0
- package/dist/commands/stash-branch-command.d.ts.map +1 -0
- package/dist/commands/stash-create-command.d.ts +17 -0
- package/dist/commands/stash-create-command.d.ts.map +1 -1
- package/dist/commands/stash-info.d.ts +93 -0
- package/dist/commands/stash-info.d.ts.map +1 -0
- package/dist/commands/stash-list-command.d.ts +16 -0
- package/dist/commands/stash-list-command.d.ts.map +1 -1
- package/dist/commands/stash-pop-command.d.ts +39 -0
- package/dist/commands/stash-pop-command.d.ts.map +1 -0
- package/dist/commands/stash-show-command.d.ts +48 -0
- package/dist/commands/stash-show-command.d.ts.map +1 -0
- package/dist/commands/stash-store-command.d.ts +29 -0
- package/dist/commands/stash-store-command.d.ts.map +1 -0
- package/dist/commands/stash-working-tree.d.ts.map +1 -1
- package/dist/commands/status-command.d.ts +31 -2
- package/dist/commands/status-command.d.ts.map +1 -1
- package/dist/commands/status-header.d.ts +5 -0
- package/dist/commands/status-header.d.ts.map +1 -1
- package/dist/commands/submodule-add-command.d.ts +89 -0
- package/dist/commands/submodule-add-command.d.ts.map +1 -0
- package/dist/commands/submodule-auth.d.ts +90 -0
- package/dist/commands/submodule-auth.d.ts.map +1 -0
- package/dist/commands/submodule-commands.d.ts +463 -0
- package/dist/commands/submodule-commands.d.ts.map +1 -0
- package/dist/commands/submodule-fetch.d.ts +149 -0
- package/dist/commands/submodule-fetch.d.ts.map +1 -0
- package/dist/commands/submodule-model.d.ts +296 -0
- package/dist/commands/submodule-model.d.ts.map +1 -0
- package/dist/commands/submodule-unpack.d.ts +120 -0
- package/dist/commands/submodule-unpack.d.ts.map +1 -0
- package/dist/commands/submodule-update-command.d.ts +206 -0
- package/dist/commands/submodule-update-command.d.ts.map +1 -0
- package/dist/commands/subtree-shift.d.ts +27 -0
- package/dist/commands/subtree-shift.d.ts.map +1 -0
- package/dist/commands/switch-command.d.ts +3 -0
- package/dist/commands/switch-command.d.ts.map +1 -1
- package/dist/commands/tag-command.d.ts +259 -10
- package/dist/commands/tag-command.d.ts.map +1 -1
- package/dist/commands/trailers.d.ts +218 -17
- package/dist/commands/trailers.d.ts.map +1 -1
- package/dist/commands/tree-restore.d.ts +7 -0
- package/dist/commands/tree-restore.d.ts.map +1 -1
- package/dist/commands/verify-command.d.ts +92 -0
- package/dist/commands/verify-command.d.ts.map +1 -0
- package/dist/commands/worktree-add-command.d.ts +79 -7
- package/dist/commands/worktree-add-command.d.ts.map +1 -1
- package/dist/commands/worktree-overwrite-checks.d.ts +2 -0
- package/dist/commands/worktree-overwrite-checks.d.ts.map +1 -1
- package/dist/commands/worktree-path-rules.d.ts +66 -0
- package/dist/commands/worktree-path-rules.d.ts.map +1 -0
- package/dist/commands/worktree-remove-command.d.ts +10 -3
- package/dist/commands/worktree-remove-command.d.ts.map +1 -1
- package/dist/commands/worktree-repair-command.d.ts +15 -2
- package/dist/commands/worktree-repair-command.d.ts.map +1 -1
- package/dist/commands/worktree-support.d.ts +5 -0
- package/dist/commands/worktree-support.d.ts.map +1 -1
- package/dist/{commands-DIJ91NnD.js → commands-CNvli5bl.js} +49442 -54941
- package/dist/errors/checkout-errors.d.ts +19 -0
- package/dist/errors/checkout-errors.d.ts.map +1 -1
- package/dist/errors/command-errors.d.ts +25 -0
- package/dist/errors/command-errors.d.ts.map +1 -1
- package/dist/errors/index.js +85 -3
- package/dist/errors/ref-errors.d.ts +19 -0
- package/dist/errors/ref-errors.d.ts.map +1 -1
- package/dist/errors/worktree-errors.d.ts +6 -1
- package/dist/errors/worktree-errors.d.ts.map +1 -1
- package/dist/fsck-CPeDh9fh.js +5138 -0
- package/dist/git-command.d.ts +58 -2
- package/dist/git-command.d.ts.map +1 -1
- package/dist/git.d.ts +363 -1
- package/dist/git.d.ts.map +1 -1
- package/dist/guarded-transport-command.d.ts +82 -0
- package/dist/guarded-transport-command.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -5
- package/dist/remote-config/index.d.ts +1 -1
- package/dist/remote-config/index.d.ts.map +1 -1
- package/dist/remote-config/remote-config-store.d.ts +55 -0
- package/dist/remote-config/remote-config-store.d.ts.map +1 -1
- package/dist/remote-transport-CCmBadm-.js +1606 -0
- package/dist/rename/detect-renames.d.ts +20 -0
- package/dist/rename/detect-renames.d.ts.map +1 -1
- package/dist/rename/diffcore-break.d.ts +51 -0
- package/dist/rename/diffcore-break.d.ts.map +1 -0
- package/dist/rename/index.d.ts +1 -0
- package/dist/rename/index.d.ts.map +1 -1
- package/dist/results/blame-format.d.ts +62 -1
- package/dist/results/blame-format.d.ts.map +1 -1
- package/dist/results/clone-result.d.ts +9 -0
- package/dist/results/clone-result.d.ts.map +1 -1
- package/dist/results/combined-diff.d.ts +3 -0
- package/dist/results/combined-diff.d.ts.map +1 -1
- package/dist/results/diff-check.d.ts +38 -0
- package/dist/results/diff-check.d.ts.map +1 -0
- package/dist/results/diff-color.d.ts +135 -0
- package/dist/results/diff-color.d.ts.map +1 -0
- package/dist/results/diff-dirstat.d.ts +36 -0
- package/dist/results/diff-dirstat.d.ts.map +1 -0
- package/dist/results/diff-entry.d.ts +10 -0
- package/dist/results/diff-entry.d.ts.map +1 -1
- package/dist/results/diff-formatter.d.ts.map +1 -1
- package/dist/results/diff-output.d.ts +103 -1
- package/dist/results/diff-output.d.ts.map +1 -1
- package/dist/results/diff-pickaxe.d.ts +67 -0
- package/dist/results/diff-pickaxe.d.ts.map +1 -0
- package/dist/results/diff-words.d.ts +55 -0
- package/dist/results/diff-words.d.ts.map +1 -0
- package/dist/results/fetch-result.d.ts +12 -1
- package/dist/results/fetch-result.d.ts.map +1 -1
- package/dist/results/index.d.ts +6 -0
- package/dist/results/index.d.ts.map +1 -1
- package/dist/results/index.js +2 -2
- package/dist/results/init-result.d.ts +8 -1
- package/dist/results/init-result.d.ts.map +1 -1
- package/dist/results/line-range-hunks.d.ts +27 -0
- package/dist/results/line-range-hunks.d.ts.map +1 -0
- package/dist/results/merge-result.d.ts +8 -1
- package/dist/results/merge-result.d.ts.map +1 -1
- package/dist/results/pull-result.d.ts +11 -0
- package/dist/results/pull-result.d.ts.map +1 -1
- package/dist/results/push-result.d.ts +12 -0
- package/dist/results/push-result.d.ts.map +1 -1
- package/dist/results/rebase-result.d.ts +2 -0
- package/dist/results/rebase-result.d.ts.map +1 -1
- package/dist/results/stash-result.d.ts +6 -0
- package/dist/results/stash-result.d.ts.map +1 -1
- package/dist/results/status-result.d.ts +1 -1
- package/dist/results/status-result.d.ts.map +1 -1
- package/dist/results-BDuEgdLU.js +46847 -0
- package/dist/transport-command.d.ts +14 -0
- package/dist/transport-command.d.ts.map +1 -1
- package/dist/whitespace/index.d.ts +2 -0
- package/dist/whitespace/index.d.ts.map +1 -0
- package/dist/whitespace/whitespace-rule.d.ts +94 -0
- package/dist/whitespace/whitespace-rule.d.ts.map +1 -0
- package/package.json +12 -12
- package/src/commands/add-command.ts +293 -17
- package/src/commands/add-patch/add-patch.ts +8 -0
- package/src/commands/add-patch/patch-backend.ts +20 -2
- package/src/commands/am/am-command.ts +400 -46
- package/src/commands/am/index.ts +1 -0
- package/src/commands/am/mailsplit.ts +326 -0
- package/src/commands/apply/apply-command.ts +58 -15
- package/src/commands/apply/apply-engine.ts +1 -1
- package/src/commands/apply/apply-parse.ts +17 -8
- package/src/commands/apply/index.ts +8 -1
- package/src/commands/bisect/bisect-command.ts +18 -5
- package/src/commands/blame-command.ts +1450 -51
- package/src/commands/blame-ignore.ts +307 -0
- package/src/commands/branch-command.ts +528 -53
- package/src/commands/branch-info-command.ts +150 -0
- package/src/commands/branch-tracking.ts +335 -60
- package/src/commands/branch-upstream-command.ts +218 -0
- package/src/commands/check-mailmap-command.ts +129 -0
- package/src/commands/checkout-command.ts +166 -55
- package/src/commands/checkout-paths.ts +28 -0
- package/src/commands/cherry-command.ts +187 -0
- package/src/commands/cherry-pick-command.ts +185 -1
- package/src/commands/clean-command.ts +126 -15
- package/src/commands/clean-interactive.ts +522 -0
- package/src/commands/clone-command.ts +598 -45
- package/src/commands/commit-command.ts +925 -74
- package/src/commands/commit-reuse.ts +94 -0
- package/src/commands/config-command.ts +1256 -0
- package/src/commands/config-value-types.ts +358 -0
- package/src/commands/core-config.ts +40 -0
- package/src/commands/describe-command.ts +341 -254
- package/src/commands/diff-color-config.ts +274 -0
- package/src/commands/diff-command.ts +1619 -99
- package/src/commands/fetch-command.ts +495 -14
- package/src/commands/fetch-multiple-command.ts +665 -0
- package/src/commands/fmt-merge-msg-command.ts +715 -0
- package/src/commands/fork-point.ts +63 -0
- package/src/commands/format-patch-command.ts +496 -116
- package/src/commands/fsck/fetch-fsck.ts +172 -18
- package/src/commands/gc-command.ts +31 -1
- package/src/commands/git-describe.ts +460 -201
- package/src/commands/git-hooks.ts +123 -3
- package/src/commands/grep/grep-command.ts +1077 -0
- package/src/commands/grep/grep-engine.ts +1024 -0
- package/src/commands/grep/index.ts +2 -0
- package/src/commands/index-adder.ts +46 -7
- package/src/commands/index.ts +43 -0
- package/src/commands/init-command.ts +603 -49
- package/src/commands/interpret-trailers-command.ts +256 -0
- package/src/commands/line-log.ts +931 -0
- package/src/commands/local-transport.ts +109 -10
- package/src/commands/log-command.ts +2599 -326
- package/src/commands/log-graph.ts +129 -29
- package/src/commands/log-output.ts +449 -27
- package/src/commands/ls-remote-command.ts +5 -0
- package/src/commands/mailmap.ts +155 -0
- package/src/commands/merge-base-command.ts +170 -0
- package/src/commands/merge-bases.ts +63 -8
- package/src/commands/merge-command.ts +601 -95
- package/src/commands/merge-drivers.ts +3 -0
- package/src/commands/merge-strategy-options.ts +224 -0
- package/src/commands/merge-support.ts +115 -22
- package/src/commands/message-cleanup.ts +1 -1
- package/src/commands/mv-command.ts +6 -3
- package/src/commands/name-rev-command.ts +184 -0
- package/src/commands/name-rev.ts +762 -0
- package/src/commands/notes-command.ts +11 -1
- package/src/commands/octopus-merge.ts +35 -11
- package/src/commands/ort-merge.ts +41 -7
- package/src/commands/ort-recursive.ts +40 -2
- package/src/commands/patch-id.ts +109 -0
- package/src/commands/pathspec-file.ts +72 -0
- package/src/commands/pathspec.ts +14 -2
- package/src/commands/pretty-format.ts +103 -19
- package/src/commands/promisor-remote.ts +10 -1
- package/src/commands/pull-command.ts +734 -221
- package/src/commands/push-command.ts +1035 -68
- package/src/commands/range-diff/index.ts +3 -0
- package/src/commands/range-diff/linear-assignment.ts +203 -0
- package/src/commands/range-diff/range-diff-command.ts +433 -0
- package/src/commands/range-diff/range-diff.ts +617 -0
- package/src/commands/read-tree-command.ts +102 -4
- package/src/commands/rebase-command.ts +1074 -194
- package/src/commands/ref-filter/for-each-ref-command.ts +298 -0
- package/src/commands/ref-filter/index.ts +7 -0
- package/src/commands/ref-filter/ref-atoms.ts +581 -0
- package/src/commands/ref-filter/ref-filter.ts +651 -0
- package/src/commands/ref-filter/ref-format.ts +1070 -0
- package/src/commands/ref-filter/ref-listing-command.ts +421 -0
- package/src/commands/ref-filter/ref-quote.ts +69 -0
- package/src/commands/ref-filter/version-compare.ts +177 -0
- package/src/commands/reflog-command.ts +492 -2
- package/src/commands/reflog-walk.ts +234 -0
- package/src/commands/remerge-diff.ts +241 -0
- package/src/commands/remote-command.ts +537 -69
- package/src/commands/remote-show-command.ts +836 -0
- package/src/commands/remote-transport.ts +9 -1
- package/src/commands/reset-command.ts +114 -34
- package/src/commands/restore-command.ts +27 -41
- package/src/commands/rev-filter/commit-filter.ts +159 -0
- package/src/commands/rev-filter/commit-grep.ts +444 -0
- package/src/commands/rev-filter/index.ts +2 -0
- package/src/commands/rev-list-command.ts +578 -15
- package/src/commands/revert-command.ts +123 -1
- package/src/commands/revision-range.ts +207 -5
- package/src/commands/revision-resolver.ts +23 -8
- package/src/commands/rm-command.ts +282 -21
- package/src/commands/sequencer-pick.ts +818 -111
- package/src/commands/sequencer-support.ts +184 -4
- package/src/commands/serve-repository.ts +18 -3
- package/src/commands/shortlog-command.ts +354 -0
- package/src/commands/shortlog.ts +361 -0
- package/src/commands/show-command.ts +491 -0
- package/src/commands/show-commit.ts +24 -0
- package/src/commands/signature-check.ts +657 -0
- package/src/commands/signing.ts +385 -0
- package/src/commands/sparse-checkout-command.ts +2 -9
- package/src/commands/sparse-checkout-support.ts +2 -2
- package/src/commands/sparse-index-view.ts +135 -0
- package/src/commands/ssh-signer.ts +199 -0
- package/src/commands/ssh-verifier.ts +523 -0
- package/src/commands/stash-apply-command.ts +16 -4
- package/src/commands/stash-branch-command.ts +88 -0
- package/src/commands/stash-create-command.ts +28 -0
- package/src/commands/stash-info.ts +243 -0
- package/src/commands/stash-list-command.ts +33 -0
- package/src/commands/stash-pop-command.ts +83 -0
- package/src/commands/stash-show-command.ts +141 -0
- package/src/commands/stash-store-command.ts +82 -0
- package/src/commands/stash-working-tree.ts +2 -2
- package/src/commands/status-command.ts +120 -27
- package/src/commands/status-format.ts +1 -1
- package/src/commands/status-header.ts +41 -7
- package/src/commands/submodule-add-command.ts +509 -0
- package/src/commands/submodule-auth.ts +276 -0
- package/src/commands/submodule-commands.ts +1835 -0
- package/src/commands/submodule-fetch.ts +789 -0
- package/src/commands/submodule-model.ts +938 -0
- package/src/commands/submodule-unpack.ts +265 -0
- package/src/commands/submodule-update-command.ts +1126 -0
- package/src/commands/subtree-shift.ts +215 -0
- package/src/commands/switch-command.ts +12 -1
- package/src/commands/tag-command.ts +876 -64
- package/src/commands/trailers.ts +837 -100
- package/src/commands/tree-restore.ts +44 -11
- package/src/commands/verify-command.ts +235 -0
- package/src/commands/worktree-add-command.ts +268 -24
- package/src/commands/worktree-overwrite-checks.ts +5 -0
- package/src/commands/worktree-path-rules.ts +183 -0
- package/src/commands/worktree-remove-command.ts +39 -5
- package/src/commands/worktree-repair-command.ts +52 -5
- package/src/commands/worktree-support.ts +22 -1
- package/src/errors/checkout-errors.ts +29 -0
- package/src/errors/command-errors.ts +37 -1
- package/src/errors/ref-errors.ts +23 -0
- package/src/errors/worktree-errors.ts +8 -1
- package/src/git-command.ts +153 -2
- package/src/git.ts +550 -1
- package/src/guarded-transport-command.ts +171 -0
- package/src/index.ts +1 -0
- package/src/remote-config/index.ts +2 -0
- package/src/remote-config/remote-config-store.ts +101 -0
- package/src/rename/detect-renames.ts +42 -8
- package/src/rename/diffcore-break.ts +166 -0
- package/src/rename/index.ts +1 -0
- package/src/results/blame-format.ts +268 -43
- package/src/results/clone-result.ts +6 -0
- package/src/results/combined-diff.ts +38 -18
- package/src/results/diff-check.ts +185 -0
- package/src/results/diff-color.ts +868 -0
- package/src/results/diff-dirstat.ts +117 -0
- package/src/results/diff-entry.ts +12 -0
- package/src/results/diff-formatter.ts +1 -0
- package/src/results/diff-output.ts +322 -32
- package/src/results/diff-pickaxe.ts +304 -0
- package/src/results/diff-words.ts +395 -0
- package/src/results/fetch-result.ts +12 -1
- package/src/results/index.ts +6 -0
- package/src/results/init-result.ts +10 -1
- package/src/results/line-range-hunks.ts +126 -0
- package/src/results/merge-result.ts +9 -0
- package/src/results/pull-result.ts +7 -0
- package/src/results/push-result.ts +12 -0
- package/src/results/rebase-result.ts +3 -0
- package/src/results/stash-result.ts +7 -0
- package/src/results/status-result.ts +2 -2
- package/src/transport-command.ts +34 -3
- package/src/whitespace/index.ts +1 -0
- package/src/{commands/apply/whitespace.ts → whitespace/whitespace-rule.ts} +173 -23
- package/dist/commands/apply/whitespace.d.ts +0 -58
- package/dist/commands/apply/whitespace.d.ts.map +0 -1
- package/dist/git-command-BGiOJ8Zk.js +0 -7246
- package/dist/results-WVlBhVb1.js +0 -2935
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"push-command.d.ts","sourceRoot":"","sources":["../../src/commands/push-command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"push-command.d.ts","sourceRoot":"","sources":["../../src/commands/push-command.ts"],"names":[],"mappings":"AAqCA,OAAO,EAAE,KAAK,UAAU,EAAoC,MAAM,2BAA2B,CAAC;AAC9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AA2D3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,qBAAa,WAAY,SAAQ,gBAAgB,CAAC,UAAU,CAAC;IAC3D,iFAAiF;IACjF,OAAO,CAAC,MAAM,CAAY;IAC1B,OAAO,CAAC,WAAW,CAAS;IAC5B,mFAAmF;IACnF,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAgB;IAChC,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,MAAM,CAAS;IACvB,6DAA6D;IAC7D,OAAO,CAAC,MAAM,CAAC,CAAuB;IACtC,OAAO,CAAC,QAAQ,CAAS;IACzB,gEAAgE;IAChE,OAAO,CAAC,iBAAiB,CAAC,CAAwB;IAClD,wFAAwF;IACxF,OAAO,CAAC,uBAAuB,CAAS;IAExC;;;;;;;;;;OAUG;IACH,oBAAoB,CAAC,IAAI,EAAE,qBAAqB,GAAG,OAAO,GAAG,IAAI,CAMhE;IAED,wFAAwF;IACxF,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAI/C;IAED,qDAAqD;IACrD,WAAW,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAInC;IACD,OAAO,CAAC,IAAI,CAAQ;IACpB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,C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AO,CAAC,WAAW;IAKnB;;;OAGG;IACH,OAAO,CAAC,WAAW;IAMnB;;;;;;;;;;;;;;;;;;;OAmBG;YACW,aAAa;IAgH3B,uFAAuF;IACvF,OAAO,CAAC,aAAa;IAyBrB;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;CAyB1B;AAwBD;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAAG,WAAW,GAAG,MAAM,GAAG,IAAI,CAAC;AAE1E;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,GAAG,SAAS,GACxB,qBAAqB,CAOvB;AAED,2FAA2F;AAC3F,wBAAgB,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAQzD;AAED,oFAAoF;AACpF,wBAAgB,aAAa,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAOzD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/range-diff/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* git's linear-assignment.c: the Jonker-Volgenant shortest augmenting path solver of the
|
|
3
|
+
* linear assignment problem (Jonker, R., & Volgenant, A. (1987). A shortest augmenting path
|
|
4
|
+
* algorithm for dense and sparse linear assignment problems. Computing, 38(4), 325-340),
|
|
5
|
+
* step for step as git runs it, so that ties end in git's pairing.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* // two columns, two rows: column 0 costs 1 in row 0 and 2 in row 1
|
|
10
|
+
* const { columnToRow } = computeAssignment(2, 2, [1, 5, 2, 1]);
|
|
11
|
+
* // columnToRow: [0, 1]
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
/** The pairing found: the row of each column and the column of each row. */
|
|
15
|
+
export interface Assignment {
|
|
16
|
+
columnToRow: Int32Array;
|
|
17
|
+
rowToColumn: Int32Array;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* `compute_assignment`: the assignment of columns to rows of least total cost. `cost` is the
|
|
21
|
+
* cost matrix, the cost of assigning column `j` to row `i` at `cost[j + columnCount * i]`.
|
|
22
|
+
* With fewer than two columns every column and row is paired with 0, as git leaves them.
|
|
23
|
+
*
|
|
24
|
+
* @throws Error where git hits its `BUG("negative j")`
|
|
25
|
+
*/
|
|
26
|
+
export declare function computeAssignment(columnCount: number, rowCount: number, cost: ArrayLike<number>): Assignment;
|
|
27
|
+
//# sourceMappingURL=linear-assignment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linear-assignment.d.ts","sourceRoot":"","sources":["../../../src/commands/range-diff/linear-assignment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAKH,4EAA4E;AAC5E,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,UAAU,CAAC;IACxB,WAAW,EAAE,UAAU,CAAC;CACzB;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,GACtB,UAAU,CAwKZ"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `git range-diff` (builtin/range-diff.c and range-diff.c): two versions of a patch series
|
|
3
|
+
* compared commit by commit.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```typescript
|
|
7
|
+
* // git range-diff main..topic main..topic-v2
|
|
8
|
+
* const text = await git.rangeDiff().addArgument("main..topic").addArgument("main..topic-v2").callText();
|
|
9
|
+
* // "1: 4de457d = 1: a4b3333 s/5/A/\n2: fccce22 ! 2: f51d370 s/4/A/\n @@ ..."
|
|
10
|
+
* // git range-diff topic...topic-v2, and git range-diff main topic topic-v2, the same
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* The arguments are git's: `<base> <old-tip> <new-tip>`, `<old-range> <new-range>` or
|
|
14
|
+
* `<old-tip>...<new-tip>` (either side defaulting to HEAD), each form recognized as git
|
|
15
|
+
* recognizes it, a `--` among them saying which one is meant; what follows the ranges (paths
|
|
16
|
+
* after `--`) goes to the `git log` that reads each range.
|
|
17
|
+
*/
|
|
18
|
+
import { GitCommand } from "../../git-command.js";
|
|
19
|
+
import type { LogOutputOptions } from "../log-output.js";
|
|
20
|
+
/** `--notes`, `--notes=<ref>` and `--no-notes` as given: true, the ref, false. */
|
|
21
|
+
export type RangeDiffNotesOption = boolean | string;
|
|
22
|
+
/**
|
|
23
|
+
* What the `git log` reading a range is told of notes (`--show-notes-by-default` and the
|
|
24
|
+
* notes options after it, revision.c's display_notes_opt).
|
|
25
|
+
*/
|
|
26
|
+
export declare function rangeDiffNotesOptions(given: readonly RangeDiffNotesOption[]): Pick<LogOutputOptions, "notes" | "notesRefs">;
|
|
27
|
+
/** What reads the patches of a range and prints the pairs (shared with format-patch). */
|
|
28
|
+
export interface RangeDiffRun {
|
|
29
|
+
creationFactor: number;
|
|
30
|
+
/** `--notes`... passed to the log reading each range */
|
|
31
|
+
notes: readonly RangeDiffNotesOption[];
|
|
32
|
+
/** More arguments of that log (paths after `--`) */
|
|
33
|
+
logArgs?: readonly string[];
|
|
34
|
+
dualColor: boolean;
|
|
35
|
+
/** The color of the output (`--color`): undefined reads the configuration */
|
|
36
|
+
color?: boolean;
|
|
37
|
+
leftOnly?: boolean;
|
|
38
|
+
rightOnly?: boolean;
|
|
39
|
+
patch?: boolean;
|
|
40
|
+
stat?: boolean;
|
|
41
|
+
noPatch?: boolean;
|
|
42
|
+
/** `--abbrev=<n>` (undefined: the default length) */
|
|
43
|
+
abbrev?: number;
|
|
44
|
+
/** `--max-memory`: the largest cost matrix in bytes (default 4 GiB) */
|
|
45
|
+
maxMemory?: bigint;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* The base of commands printing range-diffs (`show_range_diff`): `git range-diff` and
|
|
49
|
+
* format-patch's `--range-diff`.
|
|
50
|
+
*/
|
|
51
|
+
export declare abstract class RangeDiffBase<T> extends GitCommand<T> {
|
|
52
|
+
/** `show_range_diff`: the output for two ranges, as bytes. */
|
|
53
|
+
protected showRangeDiff(range1: string, range2: string, run: RangeDiffRun): Promise<Uint8Array>;
|
|
54
|
+
private readPatches;
|
|
55
|
+
/** `find_unique_abbrev(oid, abbrev)` */
|
|
56
|
+
private shortId;
|
|
57
|
+
/** `pp_commit_easy(CMIT_FMT_ONELINE)` as a binary string. */
|
|
58
|
+
private subjectOf;
|
|
59
|
+
/** `is_range_diff_range`: a revision argument with both a positive and a negative side. */
|
|
60
|
+
protected isRangeDiffRange(arg: string): Promise<boolean>;
|
|
61
|
+
/** `repo_get_oid_committish` succeeds */
|
|
62
|
+
protected isCommittish(arg: string): Promise<boolean>;
|
|
63
|
+
}
|
|
64
|
+
/** `git range-diff`. */
|
|
65
|
+
export declare class RangeDiffCommand extends RangeDiffBase<Uint8Array> {
|
|
66
|
+
private readonly args;
|
|
67
|
+
private creationFactor;
|
|
68
|
+
/** `--no-dual-color` (1), `--dual-color` (0), neither (-1) */
|
|
69
|
+
private simpleColor;
|
|
70
|
+
private color?;
|
|
71
|
+
private leftOnly;
|
|
72
|
+
private rightOnly;
|
|
73
|
+
private readonly notes;
|
|
74
|
+
private noPatch;
|
|
75
|
+
private stat;
|
|
76
|
+
private patch;
|
|
77
|
+
private abbrev?;
|
|
78
|
+
private maxMemory?;
|
|
79
|
+
/**
|
|
80
|
+
* A positional argument as git takes it: a range, a commit, `--`, or what follows the
|
|
81
|
+
* ranges (paths after `--`).
|
|
82
|
+
*/
|
|
83
|
+
addArgument(arg: string): this;
|
|
84
|
+
/** A path the ranges' logs are limited to (after a `--`, added when not there yet). */
|
|
85
|
+
addPath(path: string): this;
|
|
86
|
+
/** `--creation-factor=<percent>` (default 60). */
|
|
87
|
+
setCreationFactor(factor: number): this;
|
|
88
|
+
/** `--dual-color` (true: also forces colors) / `--no-dual-color` (false). */
|
|
89
|
+
setDualColor(dual: boolean): this;
|
|
90
|
+
/** `--color` / `--no-color` (unset: `color.diff`/`color.ui`, `auto` is none). */
|
|
91
|
+
setColor(color: boolean): this;
|
|
92
|
+
/** `--left-only`: only what concerns the first range. */
|
|
93
|
+
setLeftOnly(value: boolean): this;
|
|
94
|
+
/** `--right-only`: only what concerns the second range. */
|
|
95
|
+
setRightOnly(value: boolean): this;
|
|
96
|
+
/** `--notes` (true), `--notes=<ref>`, `--no-notes` (false), in order. */
|
|
97
|
+
addNotes(value: RangeDiffNotesOption): this;
|
|
98
|
+
/** `-s` / `--no-patch`: only the pairs. */
|
|
99
|
+
setNoPatch(value: boolean): this;
|
|
100
|
+
/** `--stat`: the diffstat of each changed pair's patches. */
|
|
101
|
+
setStat(value: boolean): this;
|
|
102
|
+
/** `-p`: the patches' diff too (with `--stat`). */
|
|
103
|
+
setPatch(value: boolean): this;
|
|
104
|
+
/** `--abbrev[=<n>]` of the commit ids (true: the default length). */
|
|
105
|
+
setAbbrev(abbrev: number | true): this;
|
|
106
|
+
/**
|
|
107
|
+
* `--max-memory=<size>` (git 2.52): the largest cost matrix built, in bytes or with a `k`,
|
|
108
|
+
* `m` or `g` unit (default 4 GiB, which ours applies whatever the version). A value git
|
|
109
|
+
* refuses fails the call with its `invalid max-memory value` and the usage (exit 129).
|
|
110
|
+
*/
|
|
111
|
+
setMaxMemory(size: string | number | bigint): this;
|
|
112
|
+
/** The output as bytes. */
|
|
113
|
+
call(): Promise<Uint8Array>;
|
|
114
|
+
/** {@link call} as bytes. */
|
|
115
|
+
callBytes(): Promise<Uint8Array>;
|
|
116
|
+
/** {@link call} as text (UTF-8). */
|
|
117
|
+
callText(): Promise<string>;
|
|
118
|
+
/** cmd_range_diff's reading of the arguments. */
|
|
119
|
+
private ranges;
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=range-diff-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"range-diff-command.d.ts","sourceRoot":"","sources":["../../../src/commands/range-diff/range-diff-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGlD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAwBzD,kFAAkF;AAClF,MAAM,MAAM,oBAAoB,GAAG,OAAO,GAAG,MAAM,CAAC;AAEpD;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,SAAS,oBAAoB,EAAE,GACrC,IAAI,CAAC,gBAAgB,EAAE,OAAO,GAAG,WAAW,CAAC,CAuB/C;AAED,yFAAyF;AACzF,MAAM,WAAW,YAAY;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,wDAAwD;IACxD,KAAK,EAAE,SAAS,oBAAoB,EAAE,CAAC;IACvC,oDAAoD;IACpD,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,SAAS,EAAE,OAAO,CAAC;IACnB,6EAA6E;IAC7E,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,qDAAqD;IACrD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,8BAAsB,aAAa,CAAC,CAAC,CAAE,SAAQ,UAAU,CAAC,CAAC,CAAC;IAC1D,8DAA8D;IAC9D,UAAgB,aAAa,CAC3B,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zD,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAIhC;IAED,2DAA2D;IAC3D,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAIjC;IAED,yEAAyE;IACzE,QAAQ,CAAC,KAAK,EAAE,oBAAoB,GAAG,IAAI,CAI1C;IAED,2CAA2C;IAC3C,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAI/B;IAED,6DAA6D;IAC7D,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAI5B;IAED,mDAAmD;IACnD,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAI7B;IAED,qEAAqE;IACrE,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAIrC;IAED;;;;OAIG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAIjD;IAED,2BAA2B;IACrB,IAAI,IAAI,OAAO,CAAC,UAAU,CAAC,CA2BhC;IAED,6BAA6B;IAC7B,SAAS,IAAI,OAAO,CAAC,UAAU,CAAC,CAE/B;IAED,oCAAoC;IAC9B,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC,CAEhC;IAED,iDAAiD;YACnC,MAAM;CAkDrB"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* git's range-diff.c: the commits of two ranges read as patches (`read_patches`, from the
|
|
3
|
+
* output of a `git log -p` with range-diff's own options), paired first by identical diffs
|
|
4
|
+
* (`find_exact_matches`), then by the cheapest assignment of the others (`get_correspondences`:
|
|
5
|
+
* the size of the diff between two patches, against the cost of creating a patch scaled by
|
|
6
|
+
* the creation factor, solved by {@link computeAssignment}), and shown in the order of the
|
|
7
|
+
* second range with the diff of each pair's patches (`output`). Patches are binary strings
|
|
8
|
+
* (one character per byte), so the output is git's byte for byte.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* const a = readRangeDiffPatches(latin1LogOfRange1);
|
|
13
|
+
* const b = readRangeDiffPatches(latin1LogOfRange2);
|
|
14
|
+
* findExactMatches(a, b);
|
|
15
|
+
* getCorrespondences(a, b, 60);
|
|
16
|
+
* const out = await writeRangeDiff(a, b, { abbrev, subject, dualColor: true });
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
import type { ObjectId } from "@statewalker/vcs-core";
|
|
20
|
+
import type { DiffColors } from "../../results/diff-color.js";
|
|
21
|
+
/** range-diff.h's RANGE_DIFF_CREATION_FACTOR_DEFAULT */
|
|
22
|
+
export declare const RANGE_DIFF_CREATION_FACTOR_DEFAULT = 60;
|
|
23
|
+
/** range-diff.h's CREATION_FACTOR_FOR_THE_SAME_SERIES (format-patch from 2.46 on) */
|
|
24
|
+
export declare const CREATION_FACTOR_FOR_THE_SAME_SERIES = 999;
|
|
25
|
+
/**
|
|
26
|
+
* range-diff.h's RANGE_DIFF_MAX_MEMORY_DEFAULT on 64-bit hosts: the largest cost matrix
|
|
27
|
+
* (`4 * n * n` bytes) range-diff builds, 4 GiB. git 2.52 added it with `--max-memory`;
|
|
28
|
+
* ours applies it whatever the version, so that a huge pair of ranges is refused rather than
|
|
29
|
+
* trying to allocate gigabytes.
|
|
30
|
+
*/
|
|
31
|
+
export declare const RANGE_DIFF_MAX_MEMORY_DEFAULT: bigint;
|
|
32
|
+
/**
|
|
33
|
+
* builtin/range-diff.c's `parse_max_memory` (`git_parse_unsigned` up to SIZE_MAX): a number
|
|
34
|
+
* (decimal, `0x` hex or `0` octal, as strtoumax reads it) with an optional `k`, `m` or `g`
|
|
35
|
+
* unit (any case); undefined for what git refuses (`invalid max-memory value`).
|
|
36
|
+
*/
|
|
37
|
+
export declare function parseRangeDiffMaxMemory(value: string): bigint | undefined;
|
|
38
|
+
/** strbuf.c's `humanise_bytes` (not compact): `4.00 GiB`, `1.50 MiB`, `12 bytes`. */
|
|
39
|
+
export declare function humaniseBytes(bytes: bigint): string;
|
|
40
|
+
/** Thrown where range-diff dies over the cost matrix's size (exit 128). */
|
|
41
|
+
export declare class RangeDiffMemoryError extends Error {
|
|
42
|
+
}
|
|
43
|
+
/** One commit of a range as range-diff holds it (`struct patch_util`). */
|
|
44
|
+
export interface RangeDiffPatch {
|
|
45
|
+
oid: ObjectId;
|
|
46
|
+
/** The whole patch: the metadata, message and diff sections */
|
|
47
|
+
patch: string;
|
|
48
|
+
/** Where the diff starts in {@link patch} (0 when the commit changes nothing) */
|
|
49
|
+
diffOffset: number;
|
|
50
|
+
/** The lines of the diff part */
|
|
51
|
+
diffsize: number;
|
|
52
|
+
/** Its position in its range */
|
|
53
|
+
i: number;
|
|
54
|
+
/** The position of the matching patch in the other range, or -1 */
|
|
55
|
+
matching: number;
|
|
56
|
+
shown: boolean;
|
|
57
|
+
}
|
|
58
|
+
/** Thrown where range-diff's reading fails (`error(...)`; the command then exits 1). */
|
|
59
|
+
export declare class RangeDiffError extends Error {
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* `read_patches`: the patches of a `git log --no-color -p --reverse --date-order
|
|
63
|
+
* --decorate=no --no-prefix --submodule=short --no-abbrev-commit --pretty=medium` output
|
|
64
|
+
* (as a binary string, ordinary `+`/`-`/` ` indicators), each commit's section headers
|
|
65
|
+
* (` ## Metadata ##`, ` ## Commit message ##`, ` ## Notes ##`, ` ## <file> ##`) and hunk
|
|
66
|
+
* lines rewritten as git rewrites them.
|
|
67
|
+
*/
|
|
68
|
+
export declare function readRangeDiffPatches(log: string, includeMerges?: boolean): RangeDiffPatch[];
|
|
69
|
+
/**
|
|
70
|
+
* `find_exact_matches`: the patches whose diffs are identical paired (several identical ones
|
|
71
|
+
* in `a`: the last one first, as git's hashmap returns them).
|
|
72
|
+
*/
|
|
73
|
+
export declare function findExactMatches(a: RangeDiffPatch[], b: RangeDiffPatch[]): void;
|
|
74
|
+
/**
|
|
75
|
+
* `get_correspondences`: the patches not matched exactly paired by the least total cost (the
|
|
76
|
+
* size of the diff between two patches; creating or dropping a patch costs its size times
|
|
77
|
+
* `creationFactor` percent).
|
|
78
|
+
*/
|
|
79
|
+
export declare function getCorrespondences(a: RangeDiffPatch[], b: RangeDiffPatch[], creationFactor: number, maxMemory?: bigint): void;
|
|
80
|
+
/** What {@link writeRangeDiff} prints with. */
|
|
81
|
+
export interface RangeDiffOutputOptions {
|
|
82
|
+
/** The palette, or none for no colors */
|
|
83
|
+
colors?: DiffColors;
|
|
84
|
+
/** `dual_color_diffed_diffs` (default true): the outer and inner signs colored apart */
|
|
85
|
+
dualColor?: boolean;
|
|
86
|
+
leftOnly?: boolean;
|
|
87
|
+
rightOnly?: boolean;
|
|
88
|
+
/** `-p`: each pair's diff of patches, also with {@link stat} (shown by default without it) */
|
|
89
|
+
patch?: boolean;
|
|
90
|
+
/** `--stat`: the diffstat of each pair's patches */
|
|
91
|
+
stat?: boolean;
|
|
92
|
+
/** `-s`/`--no-patch`: only the pairs' headers */
|
|
93
|
+
noPatch?: boolean;
|
|
94
|
+
/** A commit id as `find_unique_abbrev` shortens it */
|
|
95
|
+
abbrev(id: ObjectId): Promise<string>;
|
|
96
|
+
/** A commit's oneline subject, as a binary string */
|
|
97
|
+
subject(id: ObjectId): Promise<string>;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* `output`: the pairs in the order of the second range, each dropped patch of the first
|
|
101
|
+
* once its predecessors were shown, each pair's header (`n: <id> = n: <id> <subject>`, `!`
|
|
102
|
+
* when the patches differ, `<`/`>` for a patch on one side only) and the diff of its
|
|
103
|
+
* patches, four spaces in. The result is a binary string.
|
|
104
|
+
*/
|
|
105
|
+
export declare function writeRangeDiff(a: RangeDiffPatch[], b: RangeDiffPatch[], options: RangeDiffOutputOptions): Promise<string>;
|
|
106
|
+
//# sourceMappingURL=range-diff.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"range-diff.d.ts","sourceRoot":"","sources":["../../../src/commands/range-diff/range-diff.ts"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B,CAAC,EAAE,cAAc,EAAE,EACnB,cAAc,EAAE,MAAM,EACtB,SAAS,GAAE,MAAsC,GAChD,IAAI,CAyCN;AAED,+CAA+C;AAC/C,MAAM,WAAW,sBAAsB;IACrC,yCAAyC;IACzC,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,wFAAwF;IACxF,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,8FAA8F;IAC9F,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,oDAAoD;IACpD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,iDAAiD;IACjD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sDAAsD;IACtD,MAAM,CAAC,EAAE,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACtC,qDAAqD;IACrD,OAAO,CAAC,EAAE,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACxC;AAYD;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,CAAC,EAAE,cAAc,EAAE,EACnB,CAAC,EAAE,cAAc,EAAE,EACnB,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,MAAM,CAAC,CAwEjB"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `git read-tree` (builtin/read-tree.c over unpack-trees.c): read trees into the index,
|
|
3
|
+
* merging them with it (`-m`: one-, two- and three-way), optionally updating the worktree.
|
|
4
|
+
*/
|
|
1
5
|
import { GitCommand } from "../git-command.js";
|
|
2
6
|
/** Result of {@link ReadTreeCommand}. */
|
|
3
7
|
export interface ReadTreeResult {
|
|
@@ -40,6 +44,9 @@ export declare class ReadTreeCommand extends GitCommand<ReadTreeResult> {
|
|
|
40
44
|
private trivial;
|
|
41
45
|
private aggressive;
|
|
42
46
|
private skipSparseCheckout;
|
|
47
|
+
private recurseSubmodules?;
|
|
48
|
+
private dryRun;
|
|
49
|
+
private superPrefix;
|
|
43
50
|
/** A tree-ish to read (up to eight). */
|
|
44
51
|
addTree(treeish: string): this;
|
|
45
52
|
/** `-m`: merge the trees with the index (one-, two- or three-way by their number). */
|
|
@@ -63,9 +70,22 @@ export declare class ReadTreeCommand extends GitCommand<ReadTreeResult> {
|
|
|
63
70
|
* which an update shorter than two seconds never prints; nothing is reported here.
|
|
64
71
|
*/
|
|
65
72
|
setVerbose(_verbose: boolean): this;
|
|
73
|
+
/**
|
|
74
|
+
* `--[no-]recurse-submodules` (default `submodule.recurse`): the active submodules' worktrees
|
|
75
|
+
* are checked and moved with the superproject's (unpack-trees' `check_submodule_move_head`,
|
|
76
|
+
* entry.c's `submodule_move_head`).
|
|
77
|
+
*/
|
|
78
|
+
setRecurseSubmodules(recurse: boolean): this;
|
|
79
|
+
/** `-n` / `--dry-run`: everything checked, neither the index nor the worktree written. */
|
|
80
|
+
setDryRun(dryRun: boolean): this;
|
|
81
|
+
/** @internal git's `--super-prefix`: the submodule's path in its superproject, in messages. */
|
|
82
|
+
setSuperPrefix(prefix: string): this;
|
|
66
83
|
/** `--no-sparse-checkout`: the sparse-checkout patterns are not applied. */
|
|
67
84
|
setSkipSparseCheckout(skip: boolean): this;
|
|
68
85
|
call(): Promise<ReadTreeResult>;
|
|
86
|
+
private callChecked;
|
|
87
|
+
/** {@link call}, collecting the trees it reads into `read`. */
|
|
88
|
+
private callOnce;
|
|
69
89
|
/** `cache_tree_update(WRITE_TREE_SILENT | WRITE_TREE_REPAIR)` of the index as it is. */
|
|
70
90
|
private repairedCacheTree;
|
|
71
91
|
private entryList;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-tree-command.d.ts","sourceRoot":"","sources":["../../src/commands/read-tree-command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"read-tree-command.d.ts","sourceRoot":"","sources":["../../src/commands/read-tree-command.ts"],"names":[],"mappings":"AAAA;;;GAGG;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,EAAE,OAAO,GAAG,IAAI,CAIjC;IAED,0FAA0F;IAC1F,aAAa,CAAC,UAAU,EAAE,OAAO,GAAG,IAAI,CAIvC;IAED;;;OAGG;IACH,UAAU,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAGlC;IAED;;;;OAIG;IACH,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAI3C;IAED,0FAA0F;IAC1F,SAAS,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAI/B;IAED,+FAA+F;IAC/F,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAGnC;IAED,4EAA4E;IAC5E,qBAAqB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAIzC;IAEK,IAAI,IAAI,OAAO,CAAC,cAAc,CAAC,CAYpC;IAED,OAAO,CAAC,WAAW;IAanB,+DAA+D;YACjD,QAAQ;IAoJtB,wFAAwF;YAC1E,iBAAiB;YAajB,SAAS;IAQvB;;;;;;OAMG;YACW,gBAAgB;IAkC9B;;;;;;;;;;;OAWG;YACW,SAAS;IAwHvB,wFAAwF;YAC1E,WAAW;IAQzB,2FAA2F;YAC7E,UAAU;IAqBxB;;;;;;;;;;;;OAYG;YACW,aAAa;CA2O5B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ObjectId, type PersonIdent } from "@statewalker/vcs-core";
|
|
2
2
|
import { GitCommand } from "../git-command.js";
|
|
3
|
-
import {
|
|
3
|
+
import { ContentMergeStrategy, MergeStrategy } from "../results/merge-result.js";
|
|
4
4
|
import type { RebaseResult, RebaseTodoLine } from "../results/rebase-result.js";
|
|
5
5
|
/**
|
|
6
6
|
* Rebase operation types.
|
|
@@ -17,7 +17,17 @@ export declare enum RebaseOperation {
|
|
|
17
17
|
/** Process steps (for interactive rebase) */
|
|
18
18
|
PROCESS_STEPS = "process-steps",
|
|
19
19
|
/** `--edit-todo`: the rest of the todo list edited (the interactive handler's editTodo) */
|
|
20
|
-
EDIT_TODO = "edit-todo"
|
|
20
|
+
EDIT_TODO = "edit-todo",
|
|
21
|
+
/**
|
|
22
|
+
* `--quit`: the rebase forgotten (its state directory removed, its autostash kept on
|
|
23
|
+
* `refs/stash`), HEAD, the index and the worktree left as they are
|
|
24
|
+
*/
|
|
25
|
+
QUIT = "quit",
|
|
26
|
+
/**
|
|
27
|
+
* `--show-current-patch`: `git show REBASE_HEAD` (merge backend) or `git am
|
|
28
|
+
* --show-current-patch` (apply backend), in {@link RebaseResult.currentPatch}
|
|
29
|
+
*/
|
|
30
|
+
SHOW_CURRENT_PATCH = "show-current-patch"
|
|
21
31
|
}
|
|
22
32
|
/**
|
|
23
33
|
* Handler for interactive rebase (`git rebase -i`): it plays the editors git runs.
|
|
@@ -83,9 +93,16 @@ export declare class RebaseCommand extends GitCommand<RebaseResult> {
|
|
|
83
93
|
private upstreamCommit?;
|
|
84
94
|
private upstreamCommitName?;
|
|
85
95
|
private strategy;
|
|
96
|
+
private strategyGiven;
|
|
86
97
|
private contentStrategy?;
|
|
98
|
+
/** `-X <option>`s */
|
|
99
|
+
private strategyOptions;
|
|
100
|
+
/** The run's `-s` and `-X` (rebase-merge/strategy, strategy_opts), once read */
|
|
101
|
+
private runStrategyState?;
|
|
87
102
|
private preserveMerges;
|
|
88
103
|
private interactiveHandler?;
|
|
104
|
+
/** Whose messages to give where git 2.43 and 2.5x differ (default: the hooks') */
|
|
105
|
+
private compatibility?;
|
|
89
106
|
private committer?;
|
|
90
107
|
/** `--committer-date-is-author-date` (kept in `rebase-merge/cdate_is_adate`) */
|
|
91
108
|
private committerDateIsAuthorDate;
|
|
@@ -93,8 +110,24 @@ export declare class RebaseCommand extends GitCommand<RebaseResult> {
|
|
|
93
110
|
private ignoreDate;
|
|
94
111
|
/** `--signoff` (kept in `rebase-merge/signoff`) */
|
|
95
112
|
private signoff;
|
|
113
|
+
/** `--force-rebase` (REBASE_FORCE) */
|
|
114
|
+
private forceRebase;
|
|
115
|
+
/** `-S[<keyid>]` / `--no-gpg-sign` (undefined: `commit.gpgSign`; kept in `gpg_sign_opt`) */
|
|
116
|
+
private sign?;
|
|
117
|
+
/** What this run signs with (git's opts->gpg_sign), once known */
|
|
118
|
+
private runSign?;
|
|
96
119
|
private autoStash?;
|
|
97
|
-
private reapplyCherryPicks
|
|
120
|
+
private reapplyCherryPicks?;
|
|
121
|
+
/** `--onto <newbase>` as given (`A...B` included) */
|
|
122
|
+
private ontoName?;
|
|
123
|
+
/** The `<branch>` argument: switched to before the rebase */
|
|
124
|
+
private branchArg?;
|
|
125
|
+
/** `--keep-base` */
|
|
126
|
+
private keepBase;
|
|
127
|
+
/** `--[no-]fork-point`; undefined: git's default (on for an implicit upstream) */
|
|
128
|
+
private forkPoint?;
|
|
129
|
+
/** The onto name of the rebase running (git's `onto_name`), for the reflog */
|
|
130
|
+
private runOntoName?;
|
|
98
131
|
/** `--rebase-merges` (undefined: `rebase.rebaseMerges`) */
|
|
99
132
|
private rebaseMerges?;
|
|
100
133
|
/** `--rebase-merges=rebase-cousins` */
|
|
@@ -126,6 +159,19 @@ export declare class RebaseCommand extends GitCommand<RebaseResult> {
|
|
|
126
159
|
/** `--root`: every commit of the branch rebased (onto the upstream given, else a new root) */
|
|
127
160
|
private root;
|
|
128
161
|
private noVerify;
|
|
162
|
+
/** `--trailer` arguments (kept in `rebase-merge/trailer`, one per line) */
|
|
163
|
+
private trailerArgs;
|
|
164
|
+
/**
|
|
165
|
+
* `--trailer <token>[(=|:)<value>]` (git 2.46+): each rebased commit's message gets the
|
|
166
|
+
* trailer as `git interpret-trailers --no-divider --trailer` adds it (`trailer.*`
|
|
167
|
+
* configuration applies; a fixup or squash none, a `fixup -C` the message it takes). Like
|
|
168
|
+
* git, it implies `--force-rebase` and is kept in `rebase-merge/trailer` for `--continue`;
|
|
169
|
+
* an empty argument or one without a key is refused before anything is done, and under
|
|
170
|
+
* 2.43 compatibility the option itself (`error: unknown option \`trailer'`, exit 129).
|
|
171
|
+
* git's apply backend refuses it (`--trailer requires the merge backend`); ours has only
|
|
172
|
+
* the merge backend.
|
|
173
|
+
*/
|
|
174
|
+
addTrailer(trailer: string): this;
|
|
129
175
|
/** `--no-verify`: the pre-rebase hook does not run. */
|
|
130
176
|
setNoVerify(noVerify: boolean): this;
|
|
131
177
|
/** The command after the one running (git's peek_command), for record_in_rewritten */
|
|
@@ -150,6 +196,34 @@ export declare class RebaseCommand extends GitCommand<RebaseResult> {
|
|
|
150
196
|
* an upstream names, or git's "fatal: invalid upstream '<name>'" (exit 128).
|
|
151
197
|
*/
|
|
152
198
|
private resolveUpstream;
|
|
199
|
+
/**
|
|
200
|
+
* `--onto <newbase>`: the commits of `<upstream>..HEAD` go onto `newbase` instead of onto
|
|
201
|
+
* the upstream. Any revision, or `A...B` for the one merge base of A and B (either side
|
|
202
|
+
* empty is HEAD): git's `fatal: '<A...B>': need exactly one merge base` when there are
|
|
203
|
+
* none or several, `fatal: Does not point to a valid commit '<newbase>'` when it names no
|
|
204
|
+
* commit. With {@link setRoot} it is `--root --onto <newbase>`.
|
|
205
|
+
*/
|
|
206
|
+
setOnto(newbase: string): this;
|
|
207
|
+
/**
|
|
208
|
+
* The `<branch>` argument: `git rebase <upstream> <branch>` switches to it first (a local
|
|
209
|
+
* branch, which then moves; or any commit, rebased on a detached HEAD), as
|
|
210
|
+
* `git switch <branch>` would; a branch another worktree has checked out is refused.
|
|
211
|
+
*/
|
|
212
|
+
setBranch(branch: string): this;
|
|
213
|
+
/**
|
|
214
|
+
* `--keep-base`: onto the merge base of the upstream and the branch (`<upstream>...<branch>`),
|
|
215
|
+
* so the commits stay where they are while the upstream's are left out. Implies
|
|
216
|
+
* `--no-fork-point` and `--reapply-cherry-picks` unless set; refused with `--onto` and
|
|
217
|
+
* `--root`.
|
|
218
|
+
*/
|
|
219
|
+
setKeepBase(keepBase: boolean): this;
|
|
220
|
+
/**
|
|
221
|
+
* `--fork-point` / `--no-fork-point`: leave out the commits the upstream's reflog shows
|
|
222
|
+
* were once on it (git's get_fork_point: the one merge base of the branch and the values
|
|
223
|
+
* the upstream's reflog records, when it is one of them). Default: on when no upstream is
|
|
224
|
+
* given (the branch's `@{upstream}`), unless `rebase.forkPoint` is false; off otherwise.
|
|
225
|
+
*/
|
|
226
|
+
setForkPoint(forkPoint: boolean): this;
|
|
153
227
|
/**
|
|
154
228
|
* Set the upstream name for messages.
|
|
155
229
|
*
|
|
@@ -163,17 +237,37 @@ export declare class RebaseCommand extends GitCommand<RebaseResult> {
|
|
|
163
237
|
*
|
|
164
238
|
* @param operation Rebase operation
|
|
165
239
|
*/
|
|
240
|
+
/**
|
|
241
|
+
* Whose messages to give where git 2.43 and 2.5x differ (`fatal: No rebase in progress?`
|
|
242
|
+
* in 2.43, `fatal: no rebase in progress` in 2.5x). Default: the hook runner's
|
|
243
|
+
* compatibility, else 2.56.
|
|
244
|
+
*/
|
|
245
|
+
setCompatibility(version: "2.43" | "2.56"): this;
|
|
166
246
|
setOperation(operation: RebaseOperation): this;
|
|
167
247
|
/**
|
|
168
248
|
* Get the current operation.
|
|
169
249
|
*/
|
|
170
250
|
getOperation(): RebaseOperation;
|
|
171
251
|
/**
|
|
172
|
-
* Set the merge strategy (
|
|
252
|
+
* Set the merge strategy (`-s`): merge-ort (RECURSIVE, ORT), RESOLVE (git-merge-resolve)
|
|
253
|
+
* or SUBTREE (git merge-subtree) for each pick; kept in `rebase-merge/strategy`.
|
|
173
254
|
*
|
|
174
255
|
* @param strategy Merge strategy
|
|
175
256
|
*/
|
|
176
257
|
setStrategy(strategy: MergeStrategy): this;
|
|
258
|
+
/**
|
|
259
|
+
* The `-X <option>`s of each pick (see `MergeCommand.setStrategyOptions`), kept in
|
|
260
|
+
* `rebase-merge/strategy_opts`; with no `-s`, the strategy is `ort` (builtin/rebase.c).
|
|
261
|
+
*/
|
|
262
|
+
setStrategyOptions(options: readonly string[]): this;
|
|
263
|
+
/** Adds one `-X <option>` (see {@link setStrategyOptions}). */
|
|
264
|
+
addStrategyOption(option: string): this;
|
|
265
|
+
/** The `-X` options as given: `-X ours`/`-X theirs` of the content strategy first. */
|
|
266
|
+
private givenStrategyOptions;
|
|
267
|
+
/** The run's `-s` (`ort` when only `-X` was given) as builtin/rebase.c settles it. */
|
|
268
|
+
private givenStrategyName;
|
|
269
|
+
/** The run's `-s` and `-X`: read back from `rebase-merge/` (read_strategy_opts), else given. */
|
|
270
|
+
private runStrategy;
|
|
177
271
|
/**
|
|
178
272
|
* Get the merge strategy.
|
|
179
273
|
*/
|
|
@@ -250,6 +344,37 @@ export declare class RebaseCommand extends GitCommand<RebaseResult> {
|
|
|
250
344
|
* without `--signoff`).
|
|
251
345
|
*/
|
|
252
346
|
setSignoff(value: boolean): this;
|
|
347
|
+
/**
|
|
348
|
+
* `-S` (true) / `--no-gpg-sign` (false): whether to sign the commits the rebase makes;
|
|
349
|
+
* undefined (the default) leaves it to `commit.gpgSign`. Kept in
|
|
350
|
+
* `rebase-merge/gpg_sign_opt` for `--continue`. Every commit the rebase writes is signed
|
|
351
|
+
* through the host's signer (`GitHostEnvironment.signer`) as git's sequencer signs it; when
|
|
352
|
+
* it cannot be signed the step fails as git's does (`error: gpg failed to sign the data:`,
|
|
353
|
+
* `error: failed to write commit object`) and the rebase stops there (2.5x: `Could not
|
|
354
|
+
* apply ...`, the pick to commit; 2.43: the pick rescheduled), the branch untouched.
|
|
355
|
+
* Picks kept as they are (fast-forwarded) sign nothing, as in git.
|
|
356
|
+
*/
|
|
357
|
+
setSign(sign: boolean | undefined): this;
|
|
358
|
+
/** `-S<keyid>`: sign with this key (see {@link setSign}). */
|
|
359
|
+
setSigningKey(keyId: string): this;
|
|
360
|
+
/**
|
|
361
|
+
* The key this run's commits are signed with: the one it started with, else (a
|
|
362
|
+
* `--continue`) `rebase-merge/gpg_sign_opt` over `commit.gpgSign` (read_populate_opts).
|
|
363
|
+
*/
|
|
364
|
+
private signRequest;
|
|
365
|
+
/**
|
|
366
|
+
* commit_tree's signing of a commit the rebase makes, with this run's key (git's
|
|
367
|
+
* opts->gpg_sign), the signing program in the worktree top. When it cannot be signed:
|
|
368
|
+
* {@link SigningFailedError} with gpg's lines alone; the step says what follows.
|
|
369
|
+
*/
|
|
370
|
+
private signedRebaseCommit;
|
|
371
|
+
/** sequencer.c's gpg_sign_opt_quoted: `'-S<key>'` (shell-quoted) when the run signs, else "". */
|
|
372
|
+
private gpgSignOptQuoted;
|
|
373
|
+
/**
|
|
374
|
+
* try_to_commit failing to sign a pick or a fixup: 2.43 reschedules the command (its
|
|
375
|
+
* `error:` lines, the rescheduled advice), 2.5x stops as after a conflict.
|
|
376
|
+
*/
|
|
377
|
+
private signingStop;
|
|
253
378
|
/**
|
|
254
379
|
* `--exec <command>` (`-x`): an `exec <command>` line after each pick (after its fixup and
|
|
255
380
|
* squash chain) and each merge; implies an interactive list (no fast-forward shortcut) and
|
|
@@ -291,6 +416,13 @@ export declare class RebaseCommand extends GitCommand<RebaseResult> {
|
|
|
291
416
|
* interactive rebase.
|
|
292
417
|
*/
|
|
293
418
|
setAutosquash(value: boolean): this;
|
|
419
|
+
/**
|
|
420
|
+
* `--force-rebase` (`-f`, `--no-ff`): every commit is picked again, even one whose parent is
|
|
421
|
+
* already where the rebase puts it (git's REBASE_FORCE: no allow_ff, no up-to-date
|
|
422
|
+
* shortcut, `Current branch <name> is up to date, rebase forced.`). Like git, a `--continue`
|
|
423
|
+
* does not remember it.
|
|
424
|
+
*/
|
|
425
|
+
setForceRebase(value: boolean): this;
|
|
294
426
|
/**
|
|
295
427
|
* `--root`: all the commits of the branch are rebased, its root commit too. With an
|
|
296
428
|
* upstream set ({@link setUpstream}) that is `--root --onto <upstream>`; without one the
|
|
@@ -302,6 +434,27 @@ export declare class RebaseCommand extends GitCommand<RebaseResult> {
|
|
|
302
434
|
private run;
|
|
303
435
|
private context;
|
|
304
436
|
private inProgress;
|
|
437
|
+
/**
|
|
438
|
+
* cmd_rebase's checks of the options among themselves; the fork-point setting as git
|
|
439
|
+
* settles it then (1 on, 0 off, -1 the default: on for an implicit upstream).
|
|
440
|
+
*/
|
|
441
|
+
private checkBeginOptions;
|
|
442
|
+
/**
|
|
443
|
+
* cmd_rebase's names and commits: the upstream (given, else the branch's `@{upstream}`),
|
|
444
|
+
* the branch rebased (the `<branch>` argument, else HEAD's), onto (`--onto`, `A...B`,
|
|
445
|
+
* `--keep-base`, `--root`'s squash-onto), the fork point and the branch base (the one
|
|
446
|
+
* merge base of onto and the branch, which can_fast_forward reads).
|
|
447
|
+
*/
|
|
448
|
+
private settleBegin;
|
|
449
|
+
/**
|
|
450
|
+
* branch_get_upstream for `git rebase` without an upstream: the current branch's
|
|
451
|
+
* `@{upstream}`, else error_on_missing_default_upstream's advice (stdout, exit 1).
|
|
452
|
+
*/
|
|
453
|
+
private defaultUpstream;
|
|
454
|
+
/** What git prints while it reads `name` (an ambiguous refname's warning). */
|
|
455
|
+
private nameWarnings;
|
|
456
|
+
/** repo_get_oid_mb: the one merge base of `A...B` (either side empty is HEAD). */
|
|
457
|
+
private mergeBaseOfDots;
|
|
305
458
|
private begin;
|
|
306
459
|
/** Picks what is left in `git-rebase-todo`, then finishes the rebase (git's pick_commits). */
|
|
307
460
|
private processTodo;
|
|
@@ -409,6 +562,22 @@ export declare class RebaseCommand extends GitCommand<RebaseResult> {
|
|
|
409
562
|
* options and --signoff imply (`cdate_is_adate`, `ignore_date`, `signoff` in the state).
|
|
410
563
|
*/
|
|
411
564
|
private allowFastForward;
|
|
565
|
+
/** The trailer configuration `--trailer` and `--signoff` apply (`trailer.*`). */
|
|
566
|
+
private trailerConfig;
|
|
567
|
+
/**
|
|
568
|
+
* do_pick_commit's message of a pick: `--signoff`'s trailer, then the `--trailer`s
|
|
569
|
+
* (amend_strbuf_with_trailers) kept in `rebase-merge/trailer`.
|
|
570
|
+
*/
|
|
571
|
+
private pickedMessageOf;
|
|
572
|
+
/** amend_strbuf_with_trailers with the run's `--trailer`s (read_trailers), if any. */
|
|
573
|
+
private withTrailers;
|
|
574
|
+
/** read_trailers: the lines of `rebase-merge/trailer` (none without the file). */
|
|
575
|
+
private runTrailers;
|
|
576
|
+
/**
|
|
577
|
+
* print_advice's hints at a conflicting pick (`advice.mergeConflict`, 2.45+: off drops
|
|
578
|
+
* them, unset adds how to turn them off; 2.43 always gives them as they are).
|
|
579
|
+
*/
|
|
580
|
+
private mergeConflictAdvice;
|
|
412
581
|
/** append_signoff's `Signed-off-by: <committer name> <email>` line. */
|
|
413
582
|
private signoffLine;
|
|
414
583
|
/** The labels' refs (`refs-to-delete`) removed, as git's sequencer_remove_state does. */
|
|
@@ -436,6 +605,12 @@ export declare class RebaseCommand extends GitCommand<RebaseResult> {
|
|
|
436
605
|
private commitStagedChanges;
|
|
437
606
|
/** `git rebase --skip`: the stopped pick dropped (`reset --hard`), then as `--continue`. */
|
|
438
607
|
private skip;
|
|
608
|
+
/**
|
|
609
|
+
* `git rebase --quit` and `--show-current-patch` (builtin/rebase.c's ACTION_QUIT and
|
|
610
|
+
* ACTION_SHOW_CURRENT_PATCH): the backend found as cmd_rebase finds it (`rebase-apply/`
|
|
611
|
+
* first, `rebase-apply/applying` being git am's), refused when no rebase is in progress.
|
|
612
|
+
*/
|
|
613
|
+
private quitOrShow;
|
|
439
614
|
/** `git rebase --abort`: back to the original branch and commit (`reset --hard`). */
|
|
440
615
|
private abort;
|
|
441
616
|
/**
|
|
@@ -607,10 +782,16 @@ export declare class RebaseCommand extends GitCommand<RebaseResult> {
|
|
|
607
782
|
/** A commit, read once for the walks that pick the todo list. */
|
|
608
783
|
private loadCommit;
|
|
609
784
|
/**
|
|
610
|
-
* builtin/rebase.c's
|
|
611
|
-
*
|
|
612
|
-
*
|
|
613
|
-
|
|
785
|
+
* builtin/rebase.c's checkout_up_to_date: the `<branch>` argument checked out when there
|
|
786
|
+
* is nothing to rebase (reset_working_tree: the worktree switched from HEAD, the branch
|
|
787
|
+
* and HEAD logged `rebase: checkout <branch>`, the post-checkout hook run).
|
|
788
|
+
*/
|
|
789
|
+
private checkoutUpToDate;
|
|
790
|
+
/**
|
|
791
|
+
* builtin/rebase.c's can_fast_forward: the branch's one merge base with onto is onto
|
|
792
|
+
* (`branchBase`), the fork point (if any) is that base too, the upstream (none with
|
|
793
|
+
* --root) and the branch have one merge base, onto, and the first-parent line from the
|
|
794
|
+
* branch down to onto has no merge (is_linear_history).
|
|
614
795
|
*/
|
|
615
796
|
private canFastForward;
|
|
616
797
|
private isAncestor;
|