@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
|
@@ -33,12 +33,20 @@ export declare class RevertCommand extends GitCommand<RevertResult> {
|
|
|
33
33
|
private mainlineParent?;
|
|
34
34
|
private strategy;
|
|
35
35
|
private contentStrategy?;
|
|
36
|
+
private strategyGiven;
|
|
37
|
+
private strategyOptions;
|
|
38
|
+
/** Whose behaviour to follow where git 2.43 and 2.5x differ (default: the hooks') */
|
|
39
|
+
private compatibility?;
|
|
36
40
|
private ourCommitName?;
|
|
37
41
|
private reflogPrefix;
|
|
38
42
|
private operation;
|
|
39
43
|
private committer?;
|
|
40
44
|
private edit?;
|
|
45
|
+
/** `-S[<keyid>]` / `--no-gpg-sign` (undefined: `commit.gpgSign`) */
|
|
46
|
+
private sign?;
|
|
41
47
|
private editor?;
|
|
48
|
+
private signoff;
|
|
49
|
+
private reference?;
|
|
42
50
|
/**
|
|
43
51
|
* Add a commit to revert.
|
|
44
52
|
*
|
|
@@ -58,11 +66,28 @@ export declare class RevertCommand extends GitCommand<RevertResult> {
|
|
|
58
66
|
*/
|
|
59
67
|
setMainlineParentNumber(parent: number): this;
|
|
60
68
|
/**
|
|
61
|
-
* Set the merge strategy (
|
|
69
|
+
* Set the merge strategy (`-s`): a revert always runs merge-ort, but a strategy given is
|
|
70
|
+
* saved in `sequencer/opts` for a run of several commits.
|
|
62
71
|
*
|
|
63
72
|
* @param strategy Merge strategy to use
|
|
64
73
|
*/
|
|
65
74
|
setStrategy(strategy: MergeStrategy): this;
|
|
75
|
+
/**
|
|
76
|
+
* The `-X <option>`s (merge-ort's parse_merge_opt: `ours`, `theirs`, `subtree[=<path>]`,
|
|
77
|
+
* `patience`, `diff-algorithm=<name>`, `ignore-space-change`, `ignore-all-space`,
|
|
78
|
+
* `ignore-space-at-eol`, `ignore-cr-at-eol`, `renormalize`, `no-renames`,
|
|
79
|
+
* `find-renames[=<n>]`, `rename-threshold=<n>`); unknown ones are ignored, as the
|
|
80
|
+
* sequencer ignores them.
|
|
81
|
+
*/
|
|
82
|
+
setStrategyOptions(options: readonly string[]): this;
|
|
83
|
+
/**
|
|
84
|
+
* Whose behaviour to follow where git 2.43 and 2.5x differ (a strategy that gives up dies
|
|
85
|
+
* in 2.5x only; 2.43's merge-subtree records no AUTO_MERGE). Default: the hook runner's,
|
|
86
|
+
* else 2.56.
|
|
87
|
+
*/
|
|
88
|
+
setCompatibility(version: "2.43" | "2.56"): this;
|
|
89
|
+
/** Adds one `-X <option>` (see {@link setStrategyOptions}). */
|
|
90
|
+
addStrategyOption(option: string): this;
|
|
66
91
|
/**
|
|
67
92
|
* Get the merge strategy.
|
|
68
93
|
*/
|
|
@@ -118,6 +143,32 @@ export declare class RevertCommand extends GitCommand<RevertResult> {
|
|
|
118
143
|
* plain `git commit` (its editor, every hook), and edits the picks after it.
|
|
119
144
|
*/
|
|
120
145
|
setEdit(edit: boolean): this;
|
|
146
|
+
/**
|
|
147
|
+
* `-S` (true) / `--no-gpg-sign` (false): whether to sign the commits made; undefined (the
|
|
148
|
+
* default) leaves it to `commit.gpgSign`. Each commit is signed through the host's signer
|
|
149
|
+
* (`GitHostEnvironment.signer`) as git's sequencer signs it (try_to_commit's commit_tree, or
|
|
150
|
+
* the `git commit -S<key>` it runs after an edit or a resolved conflict). When it cannot be
|
|
151
|
+
* signed the pick fails as git's does (`error: gpg failed to sign the data:`, `error: failed
|
|
152
|
+
* to write commit object`; 2.43 adds `fatal: revert failed`, exit 128, 2.5x exits 1:
|
|
153
|
+
* {@link SigningFailedError}), left in progress and nothing committed.
|
|
154
|
+
*/
|
|
155
|
+
setSign(sign: boolean | undefined): this;
|
|
156
|
+
/** `-S<keyid>`: sign with this key (see {@link setSign}). */
|
|
157
|
+
setSigningKey(keyId: string): this;
|
|
158
|
+
/**
|
|
159
|
+
* `-s` / `--signoff`: the committer's `Signed-off-by:` added to each message as git's
|
|
160
|
+
* append_signoff adds it (after a blank line unless the message ends with a trailer block,
|
|
161
|
+
* nothing when that block's last line is it already; `trailer.*` configuration applies).
|
|
162
|
+
* The message is then cleaned up as `whitespace` unless `commit.cleanup` says otherwise.
|
|
163
|
+
*/
|
|
164
|
+
setSignoff(signoff: boolean): this;
|
|
165
|
+
/**
|
|
166
|
+
* `--reference` (`--no-reference`: false): the reverted commit is named as
|
|
167
|
+
* `<abbrev> (<subject>, <date>)` and the title is left to the editor as a
|
|
168
|
+
* `# *** SAY WHY WE ARE REVERTING ON THE TITLE LINE ***` comment (committed as it stands
|
|
169
|
+
* without `--edit`). Unset: `revert.reference`.
|
|
170
|
+
*/
|
|
171
|
+
setReference(reference: boolean): this;
|
|
121
172
|
/**
|
|
122
173
|
* The editor of {@link setEdit} (git's `core.editor` / `GIT_EDITOR`): see
|
|
123
174
|
* `CommitCommand.setEditor`. Without one the template is kept as it is (comments stripped).
|
|
@@ -130,6 +181,8 @@ export declare class RevertCommand extends GitCommand<RevertResult> {
|
|
|
130
181
|
*/
|
|
131
182
|
private gitCommit;
|
|
132
183
|
call(): Promise<RevertResult>;
|
|
184
|
+
/** parse_options and verify_opt_compatible: git's refusals before anything is read. */
|
|
185
|
+
private checkOptions;
|
|
133
186
|
/** What the sparse checkout printed while the result was written. */
|
|
134
187
|
private readonly sparseWarnings;
|
|
135
188
|
private run;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"revert-command.d.ts","sourceRoot":"","sources":["../../src/commands/revert-command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"revert-command.d.ts","sourceRoot":"","sources":["../../src/commands/revert-command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAKzD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,KAAK,oBAAoB,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACtF,OAAO,EAAE,KAAK,Y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AqBpB,qEAAqE;IACrE,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAgB;YAEjC,GAAG;CA8ClB"}
|
|
@@ -28,6 +28,13 @@ export interface RevisionArgEntry {
|
|
|
28
28
|
readonly exclude: boolean;
|
|
29
29
|
/** The name it was given by (`a` of `a..b`; undefined for a merge base of `a...b`) */
|
|
30
30
|
readonly name?: string;
|
|
31
|
+
/** The left side of a symmetric difference (`a` of `a...b`, git's SYMMETRIC_LEFT) */
|
|
32
|
+
readonly left?: boolean;
|
|
33
|
+
}
|
|
34
|
+
/** A ref and the object it names (a symbolic ref resolved). */
|
|
35
|
+
export interface RefTip {
|
|
36
|
+
readonly name: string;
|
|
37
|
+
readonly id: ObjectId;
|
|
31
38
|
}
|
|
32
39
|
/** What {@link parseRevisionArgs} needs besides the resolver. */
|
|
33
40
|
export interface RevisionArgOptions {
|
|
@@ -35,13 +42,39 @@ export interface RevisionArgOptions {
|
|
|
35
42
|
mergeBases(a: ObjectId, b: ObjectId): Promise<ObjectId[]>;
|
|
36
43
|
/** Read plain revisions as committishes (git's `REVARG_COMMITTISH`, as `git log` does) */
|
|
37
44
|
committish?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Every ref under `refs/` in name order (byte order), symbolic ones resolved and broken
|
|
47
|
+
* ones left out, for `--all`, `--branches`, `--tags`, `--remotes` and `--glob`; without,
|
|
48
|
+
* those options name nothing
|
|
49
|
+
*/
|
|
50
|
+
refs?(): Promise<RefTip[]>;
|
|
51
|
+
/** What HEAD names (`--all` adds it after the refs); undefined when it names nothing */
|
|
52
|
+
head?(): Promise<ObjectId | undefined>;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* The revisions `--stdin` reads (revision.c's read_revisions_from_stdin): one per line, up
|
|
56
|
+
* to an empty line; `--not`, `--all`, `--branches[=]`, `--tags[=]`, `--remotes[=]`,
|
|
57
|
+
* `--glob=`, `--exclude=` among them (`--not` there flips only the lines after it), `--`
|
|
58
|
+
* then paths, `--end-of-options` makes every later line a revision.
|
|
59
|
+
*/
|
|
60
|
+
export interface StdinRevisions {
|
|
61
|
+
readonly stdin: string;
|
|
38
62
|
}
|
|
63
|
+
/** An argument {@link parseRevisionArgs} reads: a command-line argument, or `--stdin`'s text. */
|
|
64
|
+
export type RevisionArg = string | StdinRevisions;
|
|
39
65
|
/** The arguments read. */
|
|
40
66
|
export interface ParsedRevisionArgs {
|
|
41
67
|
/** In git's pending order */
|
|
42
68
|
readonly entries: RevisionArgEntry[];
|
|
43
69
|
/** What git printed while reading them (`warning:`, `error:`, `hint:` lines) */
|
|
44
70
|
readonly warnings: string[];
|
|
71
|
+
/**
|
|
72
|
+
* git's `rev_input_given`: a revision or a ref option was read, so git does not fall back
|
|
73
|
+
* to HEAD even when they named nothing (`--glob=nothing`)
|
|
74
|
+
*/
|
|
75
|
+
readonly inputGiven?: boolean;
|
|
76
|
+
/** The paths `--stdin` read after its `--` line */
|
|
77
|
+
readonly stdinPaths?: string[];
|
|
45
78
|
}
|
|
46
79
|
/** git's die after an argument that is neither a revision nor a path (`git rev-parse x`). */
|
|
47
80
|
export declare function unknownRevisionMessage(arg: string): string;
|
|
@@ -52,7 +85,7 @@ export declare function unknownRevisionMessage(arg: string): string;
|
|
|
52
85
|
* @throws RevisionError with git's lines for an argument that names nothing, and where the
|
|
53
86
|
* resolver dies (`@{u}` without an upstream)
|
|
54
87
|
*/
|
|
55
|
-
export declare function parseRevisionArgs(resolver: RevisionResolver, args: readonly
|
|
88
|
+
export declare function parseRevisionArgs(resolver: RevisionResolver, args: readonly RevisionArg[], options: RevisionArgOptions): Promise<ParsedRevisionArgs>;
|
|
56
89
|
/**
|
|
57
90
|
* git's `handle_revision_arg_1`: the entries `arg` names appended to `out`; false where git
|
|
58
91
|
* returns -1, else the name git's `verify_non_filename` checks when no `--` follows the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"revision-range.d.ts","sourceRoot":"","sources":["../../src/commands/revision-range.ts"],"names":[],"mappings":"A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MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,cAAc,CAAC;AAElD,0BAA0B;AAC1B,MAAM,WAAW,kBAAkB;IACjC,6BAA6B;IAC7B,QAAQ,CAAC,OAAO,EAAE,gBAAgB,EAAE,CAAC;IACrC,gFAAgF;IAChF,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAC5B;;;OAGG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAC9B,mDAAmD;IACnD,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CAChC;AA8FD,6FAA6F;AAC7F,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAM1D;AAED;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACrC,QAAQ,EAAE,gBAAgB,EAC1B,IAAI,EAAE,SAAS,WAAW,EAAE,EAC5B,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,kBAAkB,CAAC,CA2C7B;AAkDD;;;;;;;GAOG;AACH,wBAAsB,iBAAiB,CACrC,QAAQ,EAAE,gBAAgB,EAC1B,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,kBAAkB,EAC3B,GAAG,EAAE,gBAAgB,EAAE,EACvB,cAAc,EAAE,OAAO,GACtB,OAAO,CAAC,KAAK,GAAG;IAAE,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAwC1C"}
|
|
@@ -137,6 +137,21 @@ export declare class RevisionResolver {
|
|
|
137
137
|
* when it stands for nothing else.
|
|
138
138
|
*/
|
|
139
139
|
interpretBranchName(name: string): Promise<string | undefined>;
|
|
140
|
+
/**
|
|
141
|
+
* git's `repo_interpret_branch_name` over the start of `name`: how many characters it read
|
|
142
|
+
* (`@{-1}` of `@{-1}@{2}`) and the branch they stand for; undefined when it reads none.
|
|
143
|
+
*/
|
|
144
|
+
interpretBranchPrefix(name: string): Promise<{
|
|
145
|
+
used: number;
|
|
146
|
+
value: string;
|
|
147
|
+
} | undefined>;
|
|
148
|
+
/**
|
|
149
|
+
* git's `repo_dwim_log`: the refs whose reflog `name` names by the ref rules (its own, or
|
|
150
|
+
* that of the ref it points to), first found first.
|
|
151
|
+
*/
|
|
152
|
+
dwimLogRefs(name: string): Promise<string[]>;
|
|
153
|
+
/** The time `@{<date>}` selectors are read against (seconds). */
|
|
154
|
+
currentTime(): number;
|
|
140
155
|
/**
|
|
141
156
|
* The ref `@{upstream}` of `branch` names (git's `branch_get_upstream`); the current
|
|
142
157
|
* branch when undefined.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"revision-resolver.d.ts","sourceRoot":"","sources":["../../src/commands/revision-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAS7F,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAS1E,0CAA0C;AAC1C,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE;QACP,IAAI,CAAC,EAAE,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;QAChD,GAAG,CAAC,EAAE,EAAE,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;KACrC,CAAC;IACF,KAAK,EAAE;QACL,GAAG,CAAC,EAAE,EAAE,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;QACpC,QAAQ,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;YAAE,EAAE,EAAE,QAAQ,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,GAAG,SAAS,CAAC,CAAC;KAC/F,CAAC;IACF,K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AAC,YAAY;IAcpB;;;;;;;;OAQG;IACG,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAMzD;IAED,4DAA4D;IAC5D,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAgC;IAE1D,OAAO,CAAC,GAAG;IAMX;;;OAGG;YACW,MAAM;IAMpB,kFAAkF;YACpE,gBAAgB;IAoB9B,gFAAgF;YAClE,iBAAiB;IAgC/B,OAAO,CAAC,YAAY;IAKpB,wFAAwF;IACxF,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,KAAK;CAGd"}
|
|
@@ -5,6 +5,24 @@ import { GitCommand } from "../git-command.js";
|
|
|
5
5
|
export interface RmResult {
|
|
6
6
|
/** Paths that were removed from the index (each once, whatever its stages) */
|
|
7
7
|
removedPaths: string[];
|
|
8
|
+
/**
|
|
9
|
+
* What git prints on its standard output: `rm '<path>'` for each index entry removed (an
|
|
10
|
+
* unmerged path once per stage), before the files go; a dry run too, nothing with
|
|
11
|
+
* {@link RmCommand.setQuiet}
|
|
12
|
+
*/
|
|
13
|
+
output: string[];
|
|
14
|
+
/**
|
|
15
|
+
* The advice git prints on its standard error before anything else (2.5x's
|
|
16
|
+
* `advice.sparseIndexExpanded` hint when a sparse index is expanded), as its lines; an
|
|
17
|
+
* {@link RmFailedError}'s message starts with them
|
|
18
|
+
*/
|
|
19
|
+
advice?: string[];
|
|
20
|
+
/**
|
|
21
|
+
* What git prints on its standard error while it works: the `Migrating git directory of
|
|
22
|
+
* ...` lines of submodules whose `.git` directory was absorbed into the superproject's
|
|
23
|
+
* first (`git rm` of such a submodule, a dry run too)
|
|
24
|
+
*/
|
|
25
|
+
messages?: string[];
|
|
8
26
|
/**
|
|
9
27
|
* What could not be done once the removal was under way, the index written all the same:
|
|
10
28
|
* a file that could not be deleted after another one was (git passes over it silently),
|
|
@@ -41,11 +59,15 @@ export interface RmResult {
|
|
|
41
59
|
*/
|
|
42
60
|
export declare class RmCommand extends GitCommand<RmResult> {
|
|
43
61
|
private filepatterns;
|
|
62
|
+
/** `--pathspec-from-file` */
|
|
63
|
+
private readonly pathspecFile;
|
|
44
64
|
private cached;
|
|
45
65
|
private sparse;
|
|
46
66
|
private recursive;
|
|
47
67
|
private ignoreUnmatch;
|
|
48
68
|
private force;
|
|
69
|
+
private dryRun;
|
|
70
|
+
private quiet;
|
|
49
71
|
private compatibility;
|
|
50
72
|
/**
|
|
51
73
|
* `--sparse`: entries outside the sparse checkout (skip-worktree, or out of the patterns)
|
|
@@ -74,6 +96,17 @@ export declare class RmCommand extends GitCommand<RmResult> {
|
|
|
74
96
|
* among the leading directories. Even forced, nothing is removed through such a link.
|
|
75
97
|
*/
|
|
76
98
|
setForce(force: boolean): this;
|
|
99
|
+
/**
|
|
100
|
+
* `-n` / `--dry-run`: run every check git makes (pathspecs, `.gitmodules` staged,
|
|
101
|
+
* `check_local_mod`) and give the entries that would be removed, changing nothing (what
|
|
102
|
+
* `git submodule deinit` asks with `git rm -qn <path>`).
|
|
103
|
+
*/
|
|
104
|
+
setDryRun(dryRun: boolean): this;
|
|
105
|
+
/**
|
|
106
|
+
* `-q` / `--quiet`: the `rm '<path>'` lines are not given ({@link RmResult.output} stays
|
|
107
|
+
* empty).
|
|
108
|
+
*/
|
|
109
|
+
setQuiet(quiet: boolean): this;
|
|
77
110
|
/**
|
|
78
111
|
* The git version whose behaviour is reproduced where versions differ (default 2.56): the
|
|
79
112
|
* advice's last hint, as `AddCommand.setCompatibility`, and 2.43's pathspec matching, where
|
|
@@ -87,6 +120,21 @@ export declare class RmCommand extends GitCommand<RmResult> {
|
|
|
87
120
|
* @param filepattern Path pattern to remove (with `/` as separator)
|
|
88
121
|
*/
|
|
89
122
|
addFilepattern(filepattern: string): this;
|
|
123
|
+
/**
|
|
124
|
+
* `--pathspec-from-file` (and `--pathspec-file-nul` with `nul`): the pathspec elements of
|
|
125
|
+
* `content`, one per line (a line starting with `"` unquoted as a C string), or separated
|
|
126
|
+
* by NUL with `nul`. As git's `cmd_rm`: refused beside {@link addFilepattern} patterns
|
|
127
|
+
* ("'--pathspec-from-file' and pathspec arguments cannot be used together"); an empty file
|
|
128
|
+
* is "No pathspec was given. Which files should I remove?".
|
|
129
|
+
*
|
|
130
|
+
* @example
|
|
131
|
+
* ```typescript
|
|
132
|
+
* await git.rm().setPathspecFromFile("a.txt\0b.txt\0", true).call();
|
|
133
|
+
* ```
|
|
134
|
+
*
|
|
135
|
+
* @throws InvalidArgumentError "fatal: line is badly quoted: <line>"
|
|
136
|
+
*/
|
|
137
|
+
setPathspecFromFile(content: string | Uint8Array, nul?: boolean): this;
|
|
90
138
|
/**
|
|
91
139
|
* Set whether to only remove from index (keep in working tree).
|
|
92
140
|
*
|
|
@@ -95,8 +143,8 @@ export declare class RmCommand extends GitCommand<RmResult> {
|
|
|
95
143
|
* the removed entries are deleted too and the directories they leave empty pruned (git's
|
|
96
144
|
* `remove_path`); a submodule's directory goes with everything in it where its repository
|
|
97
145
|
* lives in the superproject (a gitfile), its `.gitmodules` section is removed and the
|
|
98
|
-
* file staged again. A submodule holding its own `.git` directory
|
|
99
|
-
*
|
|
146
|
+
* file staged again. A submodule holding its own `.git` directory has it absorbed into the
|
|
147
|
+
* superproject's git directory first (`git submodule absorbgitdirs`), as git does.
|
|
100
148
|
*
|
|
101
149
|
* @param cached true to only remove from index
|
|
102
150
|
*/
|
|
@@ -111,6 +159,26 @@ export declare class RmCommand extends GitCommand<RmResult> {
|
|
|
111
159
|
* @returns Result with list of removed paths
|
|
112
160
|
*/
|
|
113
161
|
call(): Promise<RmResult>;
|
|
162
|
+
/** git's advice printed on standard error before anything else, as its lines. */
|
|
163
|
+
private hint;
|
|
164
|
+
private remove;
|
|
165
|
+
/**
|
|
166
|
+
* builtin/rm.c's `submodules_absorb_gitdir_if_needed`: each submodule removed whose
|
|
167
|
+
* directory is there, not empty, and whose repository (or a nested one's) is a `.git`
|
|
168
|
+
* directory in it gets that absorbed into the superproject's git directory
|
|
169
|
+
* (`absorb_git_dir_into_superproject`); its `Migrating ...` lines go to `messages`. Where
|
|
170
|
+
* git dies there, an {@link RmFailedError} (exit 128, git's last line as its message) is
|
|
171
|
+
* thrown before anything is removed, its result's `messages` holding every line printed
|
|
172
|
+
* before, an earlier submodule's too.
|
|
173
|
+
*/
|
|
174
|
+
private absorbSubmoduleGitDirs;
|
|
175
|
+
/**
|
|
176
|
+
* A sparse index as git's `cmd_rm` sees it: the sparse directories it walks without
|
|
177
|
+
* expanding them (`pathspec_needs_expanded_index` answered no), or whether it expands it.
|
|
178
|
+
*/
|
|
179
|
+
private sparseIndexView;
|
|
180
|
+
/** git 2.5x's `advice.sparseIndexExpanded` hint (`ensure_full_index`), as its lines. */
|
|
181
|
+
private expansionHint;
|
|
114
182
|
/** Whether `.gitmodules` has conflict stages in the index (git's `is_gitmodules_unmerged`). */
|
|
115
183
|
private gitmodulesUnmerged;
|
|
116
184
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rm-command.d.ts","sourceRoot":"","sources":["../../src/commands/rm-command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rm-command.d.ts","sourceRoot":"","sources":["../../src/commands/rm-command.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AA6B/C;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,8EAA8E;IAC9E,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB;;;;OAIG;IACH,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBAAa,SAAU,SAAQ,UAAU,CAAC,QAAQ,CAAC;IACjD,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AAI,CAAgB;YAEd,MAAM;IAuQpB;;;;;;;;OAQG;YACW,sBAAsB;IA8BpC;;;OAGG;YACW,eAAe;IAqB7B,wFAAwF;IACxF,OAAO,CAAC,aAAa;IAKrB,+FAA+F;YACjF,kBAAkB;IAOhC;;;;;;OAMG;YACW,oBAAoB;IAgClC;;;;;OAKG;YACW,aAAa;IA+F3B,4FAA4F;YAC9E,QAAQ;CAKvB"}
|
|
@@ -9,7 +9,9 @@ import { type ObjectId, type PersonIdent } from "@statewalker/vcs-core";
|
|
|
9
9
|
import type { Worktree } from "@statewalker/vcs-working-tree";
|
|
10
10
|
import type { CommandCommits, CommandRefs, CommandTrees } from "../git-command.js";
|
|
11
11
|
import { type HookSession } from "./git-hooks.js";
|
|
12
|
-
import { type MergeWriteContext, type OperationState } from "./merge-support.js";
|
|
12
|
+
import { FlatTreeCache, type MergeWriteContext, type OperationState } from "./merge-support.js";
|
|
13
|
+
import { type OrtConflict } from "./ort-merge.js";
|
|
14
|
+
import type { CheckedEntry } from "./worktree-overwrite-checks.js";
|
|
13
15
|
/** What the sequencer does with each commit. */
|
|
14
16
|
export type PickAction = "pick" | "revert";
|
|
15
17
|
/** What a cherry-pick or revert is asked to do. */
|
|
@@ -62,6 +64,7 @@ export interface SequencerDeps extends MergeWriteContext {
|
|
|
62
64
|
export type PickCommitMode = {
|
|
63
65
|
kind: "pick";
|
|
64
66
|
reflogAction: string;
|
|
67
|
+
allowEmpty?: boolean;
|
|
65
68
|
} | {
|
|
66
69
|
kind: "continue";
|
|
67
70
|
edit: boolean;
|
|
@@ -72,6 +75,16 @@ export interface PickOptions {
|
|
|
72
75
|
noCommit?: boolean;
|
|
73
76
|
mainline?: number;
|
|
74
77
|
favor?: "ours" | "theirs" | "union";
|
|
78
|
+
/**
|
|
79
|
+
* `-s <strategy>` (git's opts->strategy): `ort`/`recursive` (merge-ort, as without one),
|
|
80
|
+
* `resolve` (git-merge-resolve) or `subtree` (git merge-subtree); a revert always runs
|
|
81
|
+
* merge-ort. Saved in `sequencer/opts` (`options.strategy`).
|
|
82
|
+
*/
|
|
83
|
+
strategy?: string;
|
|
84
|
+
/** `-X <option>`s (saved in `sequencer/opts` as `options.strategy-option`) */
|
|
85
|
+
strategyOptions?: string[];
|
|
86
|
+
/** The git version to follow where they differ (default: the hook runner's) */
|
|
87
|
+
compatibility?: "2.43" | "2.56";
|
|
75
88
|
/** The label of HEAD in conflict markers (default `HEAD`) */
|
|
76
89
|
oursLabel?: string;
|
|
77
90
|
/**
|
|
@@ -89,7 +102,44 @@ export interface PickOptions {
|
|
|
89
102
|
* (git's `options.edit`), left out when neither was given.
|
|
90
103
|
*/
|
|
91
104
|
edit?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* `-S[<keyid>]` (true or the key) / `--no-gpg-sign` (false); undefined: `commit.gpgSign`.
|
|
107
|
+
* Saved in `sequencer/opts` (`options.gpg-sign`) for a run of several commits.
|
|
108
|
+
*/
|
|
109
|
+
sign?: boolean | string;
|
|
110
|
+
/** `-x`: `(cherry picked from commit <id>)` appended to a pick's message (record_origin) */
|
|
111
|
+
recordOrigin?: boolean;
|
|
112
|
+
/** `-s` / `--signoff`: the committer's `Signed-off-by:` appended (append_signoff) */
|
|
113
|
+
signoff?: boolean;
|
|
114
|
+
/** `--allow-empty`: a commit empty in itself (its tree its first parent's) is committed */
|
|
115
|
+
allowEmpty?: boolean;
|
|
116
|
+
/** `--allow-empty-message` (saved in `sequencer/opts`; the sequencer commits any message) */
|
|
117
|
+
allowEmptyMessage?: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* `--keep-redundant-commits` / `--empty=keep`: a commit that becomes empty is committed
|
|
120
|
+
* (implies {@link allowEmpty})
|
|
121
|
+
*/
|
|
122
|
+
keepRedundant?: boolean;
|
|
123
|
+
/** `--empty=drop`: a commit that becomes empty is dropped, git's `dropping ...` line printed */
|
|
124
|
+
dropRedundant?: boolean;
|
|
125
|
+
/** `--ff`: a commit whose parent is HEAD is fast-forwarded to, not picked */
|
|
126
|
+
allowFf?: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* `revert --reference` (or `revert.reference`): the reverted commit named as
|
|
129
|
+
* `<abbrev> (<subject>, <date>)` under a `*** SAY WHY ...` comment for the title
|
|
130
|
+
*/
|
|
131
|
+
reference?: boolean;
|
|
92
132
|
}
|
|
133
|
+
/**
|
|
134
|
+
* builtin/revert.c's verify_opt_compatible: the `fatal:` line refusing an option that cannot
|
|
135
|
+
* go with `--continue`/`--skip`/`--abort`/`--quit` or with `--ff`, as git checks them; undefined
|
|
136
|
+
* when the options go together.
|
|
137
|
+
*/
|
|
138
|
+
export declare function pickOptionsConflict(action: PickAction, operation: SequencerOperation, options: PickOptions & {
|
|
139
|
+
emptyGiven?: boolean;
|
|
140
|
+
},
|
|
141
|
+
/** git 2.43 lets `--keep-redundant-commits` and `--empty` go with the operations */
|
|
142
|
+
compatibility?: "2.43" | "2.56"): string | undefined;
|
|
93
143
|
/** git's sequencer for `cherry-pick` / `revert`. */
|
|
94
144
|
export declare class PickSequencer {
|
|
95
145
|
private readonly deps;
|
|
@@ -102,7 +152,20 @@ export declare class PickSequencer {
|
|
|
102
152
|
private readonly abbreviator;
|
|
103
153
|
/** `--edit` / `--no-edit` (git's opts->edit, unset: undefined), read back from the opts */
|
|
104
154
|
private edit;
|
|
155
|
+
/** What the commits are signed with (git's opts->gpg_sign), read back from the opts */
|
|
156
|
+
private sign;
|
|
157
|
+
/** The flags of the run (given, or read back from `sequencer/opts`) */
|
|
158
|
+
private readonly flags;
|
|
159
|
+
/** commit.cleanup (git's default_msg_cleanup with explicit_cleanup), or saved in the opts */
|
|
160
|
+
private cleanup;
|
|
161
|
+
/** `-s` (git's opts->strategy), or saved in the opts */
|
|
162
|
+
private strategy;
|
|
163
|
+
/** `-X` options (git's opts->xopts), or saved in the opts */
|
|
164
|
+
private xopts;
|
|
105
165
|
constructor(deps: SequencerDeps, options: PickOptions);
|
|
166
|
+
/** The git version to follow where they differ */
|
|
167
|
+
private get compatibility();
|
|
168
|
+
private config;
|
|
106
169
|
private get name();
|
|
107
170
|
private fail;
|
|
108
171
|
/** `git cherry-pick <commits>` / `git revert <commits>`. */
|
|
@@ -114,15 +177,28 @@ export declare class PickSequencer {
|
|
|
114
177
|
private resolvePick;
|
|
115
178
|
/** Picks `todo` in order; `sequenced`: a `sequencer/` directory tracks the progress. */
|
|
116
179
|
private run;
|
|
180
|
+
/** The merge of a pick: {@link mergePickChange} with this run's strategy and options. */
|
|
181
|
+
private mergePick;
|
|
117
182
|
/** One commit's change merged into HEAD (do_pick_commit). */
|
|
118
183
|
private pickOne;
|
|
184
|
+
/**
|
|
185
|
+
* fast_forward_to: the index and worktree switched from HEAD's tree to the commit's
|
|
186
|
+
* (checkout_fast_forward, a two-way switch refusing over local changes), then HEAD moved
|
|
187
|
+
* there with the reflog line `<action>: fast-forward`.
|
|
188
|
+
*/
|
|
189
|
+
private fastForward;
|
|
119
190
|
/** `--continue`: the resolved conflict committed, then the rest picked. */
|
|
120
191
|
continue(): Promise<PickOutcome>;
|
|
121
192
|
/** `--skip`: the stopped commit dropped (`reset --merge HEAD`), the rest picked. */
|
|
122
193
|
skip(): Promise<PickOutcome>;
|
|
123
194
|
/** `--abort`: `reset --merge` to where the operation started, its state removed. */
|
|
124
195
|
abort(): Promise<PickOutcome>;
|
|
125
|
-
/**
|
|
196
|
+
/**
|
|
197
|
+
* `--quit` (builtin/revert.c): sequencer_remove_state (`sequencer/` removed), then
|
|
198
|
+
* remove_branch_state (CHERRY_PICK_HEAD, REVERT_HEAD, AUTO_MERGE, SQUASH_MSG, MERGE_MSG,
|
|
199
|
+
* MERGE_HEAD, MERGE_MODE, MERGE_RR go, a MERGE_AUTOSTASH is kept on `refs/stash`); the
|
|
200
|
+
* index, the worktree, HEAD and ORIG_HEAD are kept. Nothing in progress is no error.
|
|
201
|
+
*/
|
|
126
202
|
quit(): Promise<PickOutcome>;
|
|
127
203
|
/**
|
|
128
204
|
* The refs of the `git reset --merge <target>` git runs (its index and worktree reset
|
|
@@ -132,13 +208,22 @@ export declare class PickSequencer {
|
|
|
132
208
|
*/
|
|
133
209
|
private resetRefs;
|
|
134
210
|
/**
|
|
135
|
-
* read_populate_opts: `options.edit` of `sequencer/opts` (git
|
|
136
|
-
* value wins), the `--edit` / `--no-edit` the run
|
|
211
|
+
* read_populate_opts: `options.edit` and `options.gpg-sign` of `sequencer/opts` (git
|
|
212
|
+
* config's syntax, the last value wins), the `--edit` / `--no-edit` and `-S` the run
|
|
213
|
+
* started with.
|
|
137
214
|
*/
|
|
138
215
|
private readSavedOptions;
|
|
139
216
|
private removeState;
|
|
140
|
-
/**
|
|
217
|
+
/**
|
|
218
|
+
* git's message for the commit a pick or revert makes (do_pick_commit's ctx->message): a
|
|
219
|
+
* pick's message from its subject on, with `-x`'s `(cherry picked from commit <id>)` (after a
|
|
220
|
+
* blank line unless the message ends with a trailer block); a revert's `Revert "<subject>"`
|
|
221
|
+
* (`Reapply "..."` for a revert of a revert, `--reference`'s comment and `<abbrev> (<subject>,
|
|
222
|
+
* <date>)`); then `-s`'s sign-off (append_signoff).
|
|
223
|
+
*/
|
|
141
224
|
private messageFor;
|
|
225
|
+
/** sequencer_format_revert_message. */
|
|
226
|
+
private revertMessage;
|
|
142
227
|
/**
|
|
143
228
|
* The committer of the commit a pick is about to make: the one given, else resolved as
|
|
144
229
|
* git's `git_committer_info`. The clock is read again first, as git's `try_to_commit`
|
|
@@ -151,6 +236,19 @@ export declare class PickSequencer {
|
|
|
151
236
|
*/
|
|
152
237
|
private revertAuthor;
|
|
153
238
|
private commit;
|
|
239
|
+
/**
|
|
240
|
+
* try_to_commit's cleanup: whitespace for `-s`/`-x` unless commit.cleanup is set, else
|
|
241
|
+
* commit.cleanup's (`scissors` is whitespace without an editor), else none.
|
|
242
|
+
*/
|
|
243
|
+
private commitCleanup;
|
|
244
|
+
/**
|
|
245
|
+
* try_to_commit's commit_tree signing `commit` for the run's key (git's opts->gpg_sign),
|
|
246
|
+
* the signing program in the worktree top. When it cannot be signed: gpg's error and
|
|
247
|
+
* `error: failed to write commit object`, then in git 2.43 `fatal: <action> failed` (exit
|
|
248
|
+
* 128); 2.5x returns after the error (exit 1). The pick stays in progress
|
|
249
|
+
* (CHERRY_PICK_HEAD, MERGE_MSG), as git leaves it.
|
|
250
|
+
*/
|
|
251
|
+
private signed;
|
|
154
252
|
/** HEAD (its branch, when attached) moved to `id`, with `message` in the reflogs. */
|
|
155
253
|
private moveHead;
|
|
156
254
|
/**
|
|
@@ -159,6 +257,8 @@ export declare class PickSequencer {
|
|
|
159
257
|
* git 2.43 `fatal: <action> failed` (exit 128); 2.5x returns after the error (exit 1).
|
|
160
258
|
*/
|
|
161
259
|
private headLockedError;
|
|
260
|
+
/** HEAD's commit, undefined while HEAD's branch is unborn. */
|
|
261
|
+
private headIfBorn;
|
|
162
262
|
private headId;
|
|
163
263
|
/** `sequencer/todo`: `pick <abbrev> <subject>` lines. */
|
|
164
264
|
private writeTodo;
|
|
@@ -188,4 +288,85 @@ export declare function expandCommitIds(deps: {
|
|
|
188
288
|
refs: CommandRefs;
|
|
189
289
|
state: OperationState;
|
|
190
290
|
}, ids: string[]): Promise<ObjectId[]>;
|
|
291
|
+
/** What {@link mergePickChange} reads and writes with. */
|
|
292
|
+
export interface PickMergeContext {
|
|
293
|
+
workingCopy: SequencerDeps["workingCopy"];
|
|
294
|
+
worktree?: Worktree;
|
|
295
|
+
staging: SequencerDeps["staging"];
|
|
296
|
+
blobs: SequencerDeps["blobs"];
|
|
297
|
+
trees: CommandTrees;
|
|
298
|
+
commits: CommandCommits;
|
|
299
|
+
flats: FlatTreeCache;
|
|
300
|
+
abbreviate: (id: ObjectId) => Promise<string>;
|
|
301
|
+
}
|
|
302
|
+
/** The pick {@link mergePickChange} merges. */
|
|
303
|
+
export interface PickMergeArgs {
|
|
304
|
+
action: PickAction;
|
|
305
|
+
headId: ObjectId | undefined;
|
|
306
|
+
/** HEAD's tree (undefined: the empty tree of an unborn branch) */
|
|
307
|
+
headTreeId: ObjectId | undefined;
|
|
308
|
+
base: ObjectId | undefined;
|
|
309
|
+
theirs: ObjectId | undefined;
|
|
310
|
+
baseLabel: string;
|
|
311
|
+
theirsLabel: string;
|
|
312
|
+
pickId: ObjectId;
|
|
313
|
+
parentId: ObjectId | undefined;
|
|
314
|
+
/** `-s` (undefined: merge-ort) */
|
|
315
|
+
strategy: string | undefined;
|
|
316
|
+
/** `-X` options */
|
|
317
|
+
xopts: readonly string[];
|
|
318
|
+
/** HEAD's label in merge-ort's markers */
|
|
319
|
+
oursLabel: string;
|
|
320
|
+
/** `-X ours` / `-X theirs` / union given apart from the options */
|
|
321
|
+
favor?: "ours" | "theirs" | "union";
|
|
322
|
+
/** The git version whose behaviour to follow where they differ (default 2.56) */
|
|
323
|
+
compatibility?: "2.43" | "2.56";
|
|
324
|
+
}
|
|
325
|
+
/** What {@link mergePickChange} found: the result to switch to, or git's failure. */
|
|
326
|
+
export type PickMergeResult = {
|
|
327
|
+
treeId: ObjectId;
|
|
328
|
+
conflicts: OrtConflict[];
|
|
329
|
+
/** The paths the conflicts are about (merge-ort's keys; a file moved aside's own path) */
|
|
330
|
+
conflictPaths: string[];
|
|
331
|
+
clean: boolean;
|
|
332
|
+
/** What the strategy printed (merge-ort's messages, git-merge-resolve's stdout) */
|
|
333
|
+
messages: string[];
|
|
334
|
+
/** Whether to record AUTO_MERGE (merge-ort's result tree) */
|
|
335
|
+
autoMerge: boolean;
|
|
336
|
+
/** Whether the strategy ran as git's child command (resolve, subtree) */
|
|
337
|
+
external: boolean;
|
|
338
|
+
/** What git-merge-one-file printed on stderr */
|
|
339
|
+
errors?: string[];
|
|
340
|
+
/** The switch to make, when it is not HEAD's tree to `treeId` */
|
|
341
|
+
delta?: {
|
|
342
|
+
from: Map<string, CheckedEntry>;
|
|
343
|
+
to: Map<string, CheckedEntry>;
|
|
344
|
+
};
|
|
345
|
+
/** What was printed before a refused switch */
|
|
346
|
+
refusedOutput?: string[];
|
|
347
|
+
} | {
|
|
348
|
+
failed: string;
|
|
349
|
+
/** The strategy gave up (exit 2): the pick fails as do_pick_commit's res -1 */
|
|
350
|
+
strategyFailed?: boolean;
|
|
351
|
+
output?: string[];
|
|
352
|
+
};
|
|
353
|
+
/**
|
|
354
|
+
* The merge of a pick (do_pick_commit): merge-ort (do_recursive_merge, with the `-X`
|
|
355
|
+
* options) unless `-s` names another strategy; `subtree` is git merge-subtree (merge-ort
|
|
356
|
+
* with the shift, the commits' full ids as labels), `resolve` git-merge-resolve
|
|
357
|
+
* (`read-tree -m --aggressive` and git-merge-one-file). Nothing is written but blobs and
|
|
358
|
+
* trees: the caller switches to the result.
|
|
359
|
+
*/
|
|
360
|
+
export declare function mergePickChange(ctx: PickMergeContext, p: PickMergeArgs): Promise<PickMergeResult>;
|
|
361
|
+
/**
|
|
362
|
+
* config.c's write_pair: a value as `git config` writes it (quoted when it starts or ends
|
|
363
|
+
* with a space or holds `;`, `#` or CR; `\n`, `\t`, `"` and `\` escaped).
|
|
364
|
+
*/
|
|
365
|
+
export declare function configValueText(value: string): string;
|
|
366
|
+
/**
|
|
367
|
+
* config.c's parse_value of the text after a variable's `=` on one line: blanks around it
|
|
368
|
+
* dropped, `"..."` keeping them, escapes undone, an unquoted `;` or `#` starting a comment;
|
|
369
|
+
* undefined where git refuses the line.
|
|
370
|
+
*/
|
|
371
|
+
export declare function parseConfigValueText(text: string): string | undefined;
|
|
191
372
|
//# sourceMappingURL=sequencer-pick.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sequencer-pick.d.ts","sourceRoot":"","sources":["../../src/commands/sequencer-pick.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAEL,KAAK,QAAQ,EAEb,KAAK,WAAW,EACjB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAO9D,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAE,MA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