@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,33 +1,81 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* trailer,
|
|
5
|
-
*
|
|
2
|
+
* git's trailer engine (trailer.c): finding the trailer block of a message, formatting it
|
|
3
|
+
* (`%(trailers)` of a pretty format), adding and editing trailers (`git interpret-trailers`,
|
|
4
|
+
* the `--trailer` of commit, tag, merge, rebase and cherry-pick) with the `trailer.*`
|
|
5
|
+
* configuration, and sequencer.c's sign-off (`append_signoff`).
|
|
6
|
+
*
|
|
7
|
+
* The block is the last paragraph when every line of it is a trailer, or when it has a
|
|
8
|
+
* git-generated one (`Signed-off-by: `, `(cherry picked from commit `) or a configured one
|
|
9
|
+
* and at least a quarter of its lines are trailers, continuation lines folded in.
|
|
6
10
|
*
|
|
7
11
|
* @example
|
|
8
12
|
* ```typescript
|
|
9
13
|
* const message = "Fix\n\nBody.\n\nSigned-off-by: A <a@b>\nAcked-by: C <c@d>\n";
|
|
10
14
|
* formatTrailersOf(message, { onlyTrailers: true, valueOnly: true, separator: ", " });
|
|
11
15
|
* // "A <a@b>, C <c@d>"
|
|
16
|
+
*
|
|
17
|
+
* const { output } = await interpretTrailers("Fix\n", { trailers: ["Reviewed-by: R <r@x>"] });
|
|
18
|
+
* // "Fix\n\nReviewed-by: R <r@x>\n"
|
|
12
19
|
* ```
|
|
13
20
|
*
|
|
14
21
|
* @module
|
|
15
22
|
*/
|
|
16
23
|
import type { WorkingCopy } from "@statewalker/vcs-working-tree";
|
|
17
|
-
/**
|
|
24
|
+
/** Where a new trailer goes (`--where`, `trailer.where`, `trailer.<key>.where`). */
|
|
25
|
+
export type TrailerWhere = "end" | "after" | "before" | "start";
|
|
26
|
+
/** What to do when a trailer of the key exists (`--if-exists`, `trailer.ifexists`). */
|
|
27
|
+
export type TrailerIfExists = "addIfDifferentNeighbor" | "addIfDifferent" | "add" | "replace" | "doNothing";
|
|
28
|
+
/** What to do when no trailer of the key exists (`--if-missing`, `trailer.ifmissing`). */
|
|
29
|
+
export type TrailerIfMissing = "add" | "doNothing";
|
|
30
|
+
/** One `trailer.<name>.*` section (git's `conf_info`). */
|
|
31
|
+
export interface TrailerItemConfig {
|
|
32
|
+
/** `<name>`, the key alias (`--trailer <name>=<value>`) */
|
|
33
|
+
name: string;
|
|
34
|
+
/** `trailer.<name>.key`: the key written for the trailer */
|
|
35
|
+
key?: string;
|
|
36
|
+
/**
|
|
37
|
+
* `trailer.<name>.command` (deprecated): a shell command, its first `$ARG` replaced by the
|
|
38
|
+
* value, whose output is the value; also adds the trailer to every message
|
|
39
|
+
*/
|
|
40
|
+
command?: string;
|
|
41
|
+
/** `trailer.<name>.cmd`: a shell command given the value as `$1`, whose output is the value */
|
|
42
|
+
cmd?: string;
|
|
43
|
+
/** `trailer.<name>.where` (default `trailer.where`) */
|
|
44
|
+
where?: TrailerWhere;
|
|
45
|
+
/** `trailer.<name>.ifexists` (default `trailer.ifexists`) */
|
|
46
|
+
ifExists?: TrailerIfExists;
|
|
47
|
+
/** `trailer.<name>.ifmissing` (default `trailer.ifmissing`) */
|
|
48
|
+
ifMissing?: TrailerIfMissing;
|
|
49
|
+
}
|
|
50
|
+
/** The configuration trailers are read and written with (`trailer.*`, `core.commentChar`). */
|
|
18
51
|
export interface TrailerConfig {
|
|
19
52
|
/** `trailer.separators`: the characters that end a trailer's key (default `:`) */
|
|
20
53
|
separators?: string;
|
|
21
54
|
/** `core.commentChar` / `core.commentString` (default `#`) */
|
|
22
55
|
commentString?: string;
|
|
56
|
+
/** `trailer.where` (default `end`) */
|
|
57
|
+
where?: TrailerWhere;
|
|
58
|
+
/** `trailer.ifexists` (default `addIfDifferentNeighbor`) */
|
|
59
|
+
ifExists?: TrailerIfExists;
|
|
60
|
+
/** `trailer.ifmissing` (default `add`) */
|
|
61
|
+
ifMissing?: TrailerIfMissing;
|
|
62
|
+
/**
|
|
63
|
+
* The `trailer.<name>.*` sections in the configuration's order (names without case): a
|
|
64
|
+
* trailer whose key starts a name (or its `key`) is recognized, and shown with the `key`
|
|
65
|
+
*/
|
|
66
|
+
items?: readonly TrailerItemConfig[];
|
|
67
|
+
/**
|
|
68
|
+
* git's warnings reading the configuration (`warning: unknown value 'x' for key
|
|
69
|
+
* 'trailer.where'`, `warning: more than one trailer.a.key`), each a line
|
|
70
|
+
*/
|
|
71
|
+
warnings?: readonly string[];
|
|
23
72
|
/**
|
|
24
|
-
* The
|
|
25
|
-
* a
|
|
73
|
+
* The git version whose behaviour to follow where versions differ (default `2.56`): git
|
|
74
|
+
* 2.43 takes `https://x` for a trailer (2.45+ refuses a `://` right after the key), its
|
|
75
|
+
* `--trim-empty` also drops the non-trailer lines of a block that are empty, and its
|
|
76
|
+
* `interpret-trailers` reads an input without a final line end as it is (2.44+ completes it)
|
|
26
77
|
*/
|
|
27
|
-
|
|
28
|
-
name: string;
|
|
29
|
-
key?: string;
|
|
30
|
-
}[];
|
|
78
|
+
compatibility?: "2.43" | "2.56";
|
|
31
79
|
}
|
|
32
80
|
/** What git's process_trailer_options carries for formatting trailers. */
|
|
33
81
|
export interface TrailerFormatOptions {
|
|
@@ -46,13 +94,166 @@ export interface TrailerFormatOptions {
|
|
|
46
94
|
/** Only the trailers with one of these keys, matched without case (`key=`) */
|
|
47
95
|
keys?: readonly string[];
|
|
48
96
|
}
|
|
49
|
-
/**
|
|
97
|
+
/** A trailer to add (`--trailer <key>[(=|:)<value>]`) and how, over the configuration. */
|
|
98
|
+
export interface NewTrailer {
|
|
99
|
+
/** `<key>`, `<key>:<value>`, `<key>=<value>` (any of `trailer.separators` or `=`) */
|
|
100
|
+
text: string;
|
|
101
|
+
/** `--where` given before it */
|
|
102
|
+
where?: TrailerWhere;
|
|
103
|
+
/** `--if-exists` given before it */
|
|
104
|
+
ifExists?: TrailerIfExists;
|
|
105
|
+
/** `--if-missing` given before it */
|
|
106
|
+
ifMissing?: TrailerIfMissing;
|
|
107
|
+
}
|
|
108
|
+
/** A shell command of `trailer.<name>.cmd` / `.command` for the host to run. */
|
|
109
|
+
export interface TrailerCommand {
|
|
110
|
+
/** The command line (`command` with its `$ARG` replaced, or `cmd`) */
|
|
111
|
+
command: string;
|
|
112
|
+
/** The arguments after it (`cmd`'s value; none for `command`) */
|
|
113
|
+
args: string[];
|
|
114
|
+
}
|
|
115
|
+
/** What a trailer command did. */
|
|
116
|
+
export interface TrailerCommandOutcome {
|
|
117
|
+
exitCode: number;
|
|
118
|
+
stdout: string;
|
|
119
|
+
/** What it wrote on stderr (git's own stderr shows it) */
|
|
120
|
+
stderr?: string;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Runs trailer commands as git's `apply_command` does: through the shell (`sh -c`), stdin
|
|
124
|
+
* closed, without the variables naming the repository (`local_repo_env`). Undefined when the
|
|
125
|
+
* command could not be started (git reports it as failed).
|
|
126
|
+
*/
|
|
127
|
+
export type TrailerCommandRunner = (command: TrailerCommand) => Promise<TrailerCommandOutcome | undefined>;
|
|
128
|
+
/** How {@link interpretTrailers} edits a message (`git interpret-trailers` options). */
|
|
129
|
+
export interface InterpretTrailersOptions {
|
|
130
|
+
/** The trailers to add (`--trailer`), in order; a string takes the options below */
|
|
131
|
+
trailers?: readonly (string | NewTrailer)[];
|
|
132
|
+
/** `--where` for the trailers given as strings */
|
|
133
|
+
where?: TrailerWhere;
|
|
134
|
+
/** `--if-exists` for the trailers given as strings */
|
|
135
|
+
ifExists?: TrailerIfExists;
|
|
136
|
+
/** `--if-missing` for the trailers given as strings */
|
|
137
|
+
ifMissing?: TrailerIfMissing;
|
|
138
|
+
/** `--trim-empty`: trailers with an empty value are left out */
|
|
139
|
+
trimEmpty?: boolean;
|
|
140
|
+
/** `--only-trailers`: only the trailers are output */
|
|
141
|
+
onlyTrailers?: boolean;
|
|
142
|
+
/** `--only-input`: no `trailer.<name>.command` trailers (and no `trailers` allowed) */
|
|
143
|
+
onlyInput?: boolean;
|
|
144
|
+
/** `--unfold`: continuation lines joined into one */
|
|
145
|
+
unfold?: boolean;
|
|
146
|
+
/** `--parse`: `--only-trailers --only-input --unfold` */
|
|
147
|
+
parse?: boolean;
|
|
148
|
+
/** `--no-divider`: a `---` line does not end the message */
|
|
149
|
+
noDivider?: boolean;
|
|
150
|
+
/**
|
|
151
|
+
* Runs `trailer.<name>.cmd` / `.command` (see {@link TrailerCommandRunner}). Absent, as in a
|
|
152
|
+
* host that runs no commands: commands are not run, a trailer keeps the value given and no
|
|
153
|
+
* `.command` trailer is added on its own.
|
|
154
|
+
*/
|
|
155
|
+
runCommand?: TrailerCommandRunner;
|
|
156
|
+
}
|
|
157
|
+
/** What {@link interpretTrailers} gave. */
|
|
158
|
+
export interface InterpretTrailersResult {
|
|
159
|
+
/** The message with its trailers (git's stdout) */
|
|
160
|
+
output: string;
|
|
161
|
+
/** git's stderr: `error:` lines and the commands' stderr, in order */
|
|
162
|
+
errors: string;
|
|
163
|
+
}
|
|
164
|
+
/** One line of a trailer block as git's trailer iterator gives it. */
|
|
165
|
+
export interface TrailerLine {
|
|
166
|
+
/** The line as written, continuation lines included */
|
|
167
|
+
raw: string;
|
|
168
|
+
/** The key (the configured `key` where one matches); the whole line for a non-trailer */
|
|
169
|
+
key: string;
|
|
170
|
+
/** The value, unfolded; empty for a non-trailer */
|
|
171
|
+
value: string;
|
|
172
|
+
/** Whether it is a trailer (`<key><separator><value>`) */
|
|
173
|
+
isTrailer: boolean;
|
|
174
|
+
}
|
|
175
|
+
/** git's `trailer_set_where`: the placement named (without case); undefined when unknown. */
|
|
176
|
+
export declare function parseTrailerWhere(value: string): TrailerWhere | undefined;
|
|
177
|
+
/** git's `trailer_set_if_exists`: the action named (without case); undefined when unknown. */
|
|
178
|
+
export declare function parseTrailerIfExists(value: string): TrailerIfExists | undefined;
|
|
179
|
+
/** git's `trailer_set_if_missing`: the action named (without case); undefined when unknown. */
|
|
180
|
+
export declare function parseTrailerIfMissing(value: string): TrailerIfMissing | undefined;
|
|
181
|
+
/** The trailer configuration of a working copy (`trailer.*`, the comment prefix). */
|
|
50
182
|
export declare function trailerConfigOf(workingCopy: WorkingCopy): TrailerConfig;
|
|
51
183
|
/**
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
184
|
+
* The trailer configuration from `trailer.*` variables in the configuration's order (keys
|
|
185
|
+
* canonical: section and variable in lower case), as git's `trailer_config_init` reads them:
|
|
186
|
+
* `trailer.where`/`ifexists`/`ifmissing`/`separators` first, then each `trailer.<name>.*`.
|
|
187
|
+
* A `key`, `command`, `cmd` or `separators` without a value is git's fatal config error.
|
|
188
|
+
*/
|
|
189
|
+
export declare function trailerConfigFromEntries(entries: readonly {
|
|
190
|
+
key: string;
|
|
191
|
+
value: string | undefined;
|
|
192
|
+
}[], commentString?: string): TrailerConfig;
|
|
193
|
+
/**
|
|
194
|
+
* commit.c's ignored_log_message_bytes: how many characters at the end of `message` are not
|
|
195
|
+
* part of the log message (trailing comments and blank lines, an old `Conflicts:` block, the
|
|
196
|
+
* scissors line and what follows it): the `ignoreFooter` of {@link appendSignoff} for a
|
|
197
|
+
* commit message being edited.
|
|
198
|
+
*/
|
|
199
|
+
export declare function ignoredLogMessageBytes(message: string, commentString?: string): number;
|
|
200
|
+
/**
|
|
201
|
+
* The lines of the trailer block of `message` (sequencer.c's trailer_iterator: no `---`
|
|
202
|
+
* divider, values unfolded, non-trailer and comment lines included).
|
|
203
|
+
*
|
|
204
|
+
* @example
|
|
205
|
+
* ```typescript
|
|
206
|
+
* trailerLinesOf("Fix\n\nAcked-by: A\n").map((t) => [t.key, t.value]); // [["Acked-by", "A"]]
|
|
207
|
+
* ```
|
|
208
|
+
*/
|
|
209
|
+
export declare function trailerLinesOf(message: string, trailerConfig?: TrailerConfig): TrailerLine[];
|
|
210
|
+
/**
|
|
211
|
+
* trailer.c's process_trailers: `message` with its trailer block parsed, the configured and
|
|
212
|
+
* given trailers applied, and the block written back (the text around it kept as it is).
|
|
213
|
+
*/
|
|
214
|
+
export declare function processTrailers(message: string, options?: InterpretTrailersOptions, trailerConfig?: TrailerConfig): Promise<InterpretTrailersResult>;
|
|
215
|
+
/**
|
|
216
|
+
* `git interpret-trailers` on one input: the message completed with a line end (as git 2.44+
|
|
217
|
+
* reads its input), then {@link processTrailers}. `trailers` with `onlyInput`/`parse` is git's usage
|
|
218
|
+
* error.
|
|
219
|
+
*
|
|
220
|
+
* @example
|
|
221
|
+
* ```typescript
|
|
222
|
+
* const config = { items: [{ name: "ack", key: "Acked-by" }] };
|
|
223
|
+
* (await interpretTrailers("Fix\n", { trailers: ["ack: Peff"] }, config)).output;
|
|
224
|
+
* // "Fix\n\nAcked-by: Peff\n"
|
|
225
|
+
* ```
|
|
226
|
+
*/
|
|
227
|
+
export declare function interpretTrailers(message: string, options?: InterpretTrailersOptions, trailerConfig?: TrailerConfig): Promise<InterpretTrailersResult>;
|
|
228
|
+
/**
|
|
229
|
+
* git's validate_trailer_args: the `error:` line refusing the first `--trailer` argument that
|
|
230
|
+
* is empty or starts with a separator; undefined when all are fine.
|
|
231
|
+
*/
|
|
232
|
+
export declare function validateTrailerArgs(args: readonly string[], trailerConfig?: TrailerConfig): string | undefined;
|
|
233
|
+
/**
|
|
234
|
+
* trailer.c's amend_strbuf_with_trailers, what `commit`, `tag`, `merge`, `rebase` and
|
|
235
|
+
* `cherry-pick` do with their `--trailer` arguments: each added to `message` as
|
|
236
|
+
* `interpret-trailers --no-divider --trailer <arg>` adds it (the configured `where`, `ifexists`,
|
|
237
|
+
* `ifmissing` and commands apply). An empty argument throws git's `empty --trailer argument`.
|
|
238
|
+
*
|
|
239
|
+
* @example
|
|
240
|
+
* ```typescript
|
|
241
|
+
* (await amendWithTrailers("Fix\n", ["Closes: #12"])).output; // "Fix\n\nCloses: #12\n"
|
|
242
|
+
* ```
|
|
243
|
+
*/
|
|
244
|
+
export declare function amendWithTrailers(message: string, args: readonly string[], trailerConfig?: TrailerConfig, runCommand?: TrailerCommandRunner): Promise<InterpretTrailersResult>;
|
|
245
|
+
/** git's `Signed-off-by: <name> <email>` line (sign_off_header and fmt_name), with its line end. */
|
|
246
|
+
export declare function signoffLine(ident: {
|
|
247
|
+
name: string;
|
|
248
|
+
email: string;
|
|
249
|
+
}): string;
|
|
250
|
+
/**
|
|
251
|
+
* sequencer.c's append_signoff: `sob` (`Signed-off-by: <ident>` and a line end, see
|
|
252
|
+
* {@link signoffLine}) added to `message` before its last `ignoreFooter` characters (commit's
|
|
253
|
+
* comments and scissors, `ignored_log_message_bytes`), after a blank line unless the message
|
|
254
|
+
* ends with a trailer block; nothing added when the block's last line is `sob` already
|
|
255
|
+
* (has_conforming_footer), or when the message is `sob` alone. `dedup`
|
|
256
|
+
* (APPEND_SIGNOFF_DEDUP, format-patch) adds nothing when the block has `sob` anywhere.
|
|
56
257
|
*
|
|
57
258
|
* @example
|
|
58
259
|
* ```typescript
|
|
@@ -60,7 +261,7 @@ export declare function trailerConfigOf(workingCopy: WorkingCopy): TrailerConfig
|
|
|
60
261
|
* // "Fix\n\nSigned-off-by: A <a@b>\n"
|
|
61
262
|
* ```
|
|
62
263
|
*/
|
|
63
|
-
export declare function appendSignoff(message: string, sob: string, trailerConfig?: TrailerConfig, dedup?: boolean): string;
|
|
264
|
+
export declare function appendSignoff(message: string, sob: string, trailerConfig?: TrailerConfig, dedup?: boolean, ignoreFooter?: number): string;
|
|
64
265
|
/**
|
|
65
266
|
* trailer.c's format_trailers_from_commit: the trailer block of `message` (from its
|
|
66
267
|
* subject), whole when no option changes it, else each trailer formatted. `before` is what
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trailers.d.ts","sourceRoot":"","sources":["../../src/commands/trailers.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"trailers.d.ts","sourceRoot":"","sources":["../../src/commands/trailers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,C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AAkB,EACjC,KAAK,UAAQ,EACb,YAAY,SAAI,GACf,MAAM,CA4BR;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,oBAAyB,EAClC,aAAa,GAAE,aAAkB,GAChC,MAAM,CAmDR;AAED,iDAAiD;AACjD,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,oBAAyB,EAClC,MAAM,GAAE,aAAkB,GACzB,MAAM,CAER"}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* rather than half-way through rewriting it.
|
|
9
9
|
*/
|
|
10
10
|
import type { Blobs, ObjectId } from "@statewalker/vcs-core";
|
|
11
|
+
import { type WorktreePathOptions } from "@statewalker/vcs-core";
|
|
11
12
|
import { type ContentAttributesContext, type Staging, type Worktree } from "@statewalker/vcs-working-tree";
|
|
12
13
|
import type { CommandTrees } from "../git-command.js";
|
|
13
14
|
/** One file a restore plans to write back into the working tree. */
|
|
@@ -59,6 +60,10 @@ export interface TreeRestoreOptions {
|
|
|
59
60
|
foldsCase?: boolean;
|
|
60
61
|
/** The worktree is on Windows (`capabilities.windowsPaths`): git's Windows path rules. */
|
|
61
62
|
windows?: boolean;
|
|
63
|
+
/** `core.protectNTFS` (default true; `worktreePathRules` reads it) */
|
|
64
|
+
protectNTFS?: boolean;
|
|
65
|
+
/** `core.protectHFS` (default true here; `worktreePathRules` gives git's default) */
|
|
66
|
+
protectHFS?: boolean;
|
|
62
67
|
/** Top-level names the worktree's storage reserves (`capabilities.reservedNames`) */
|
|
63
68
|
reservedNames?: string[];
|
|
64
69
|
/**
|
|
@@ -169,6 +174,8 @@ export interface FreshCheckoutTarget {
|
|
|
169
174
|
* stays out of the worktree, as unpack-trees' loop #2 marks it); default every path.
|
|
170
175
|
*/
|
|
171
176
|
writes?: (path: string) => boolean;
|
|
177
|
+
/** git's `verify_path` rules (`worktreePathRules`); default both protections on */
|
|
178
|
+
pathRules?: WorktreePathOptions;
|
|
172
179
|
}
|
|
173
180
|
/**
|
|
174
181
|
* A tree checked out into an empty worktree and index, as `git clone` and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree-restore.d.ts","sourceRoot":"","sources":["../../src/commands/tree-restore.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"tree-restore.d.ts","sourceRoot":"","sources":["../../src/commands/tree-restore.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAiC,KAAK,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAChG,OAAO,EAEL,KAAK,wBAAwB,EAE7B,KAAK,OAAO,EACZ,KAAK,QAAQ,EACd,MAAM,+BAA+B,CAAC;AAEvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGtD,oEAAoE;AACpE,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,6CAA6C;AAC7C,MAAM,WAAW,eAAe;IAC9B,0BAA0B;IAC1B,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB;;;;OAIG;IACH,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACnB,oEAAoE;IACpE,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB;;;;OAIG;IACH,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,0CAA0C;AAC1C,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OA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in/verify-tag.c,
|
|
3
|
+
* tag.c's `gpg_verify_tag`): each object's signature checked through the host's verifier
|
|
4
|
+
* (see {@link checkSignature}), what git prints gathered as its stdout and stderr.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* const { exitCode, stderr } = await git.verifyCommit().addCommit("HEAD").call();
|
|
9
|
+
* // stderr: "gpg: Signature made ...\ngpg: Good signature from ..."
|
|
10
|
+
* const raw = await git.verifyTag().addTag("v1").setRaw(true).call();
|
|
11
|
+
* // raw.stderr: "[GNUPG:] NEWSIG\n[GNUPG:] GOODSIG ..."
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* @module
|
|
15
|
+
*/
|
|
16
|
+
import type { ObjectId } from "@statewalker/vcs-core";
|
|
17
|
+
import { GitCommand } from "../git-command.js";
|
|
18
|
+
import { type SignatureCheck } from "./signature-check.js";
|
|
19
|
+
/** What `git verify-commit` / `git verify-tag` printed and its exit status. */
|
|
20
|
+
export interface VerifyResult {
|
|
21
|
+
/** 0 when every object had a signature good enough, else 1 */
|
|
22
|
+
readonly exitCode: 0 | 1;
|
|
23
|
+
/** git's stdout: with `-v`, each payload (a tag without signature: the whole tag) */
|
|
24
|
+
readonly stdout: Uint8Array;
|
|
25
|
+
/** git's stderr: errors, then each check's output (`--raw`: gpg's status lines) */
|
|
26
|
+
readonly stderr: string;
|
|
27
|
+
/** Each object named, in order, with its check when one was made */
|
|
28
|
+
readonly checks: readonly {
|
|
29
|
+
name: string;
|
|
30
|
+
id?: ObjectId;
|
|
31
|
+
check?: SignatureCheck;
|
|
32
|
+
}[];
|
|
33
|
+
}
|
|
34
|
+
/** One object's verification as the command's loop runs it. */
|
|
35
|
+
interface VerifyOutput {
|
|
36
|
+
out: Uint8Array[];
|
|
37
|
+
err: string[];
|
|
38
|
+
checks: {
|
|
39
|
+
name: string;
|
|
40
|
+
id?: ObjectId;
|
|
41
|
+
check?: SignatureCheck;
|
|
42
|
+
}[];
|
|
43
|
+
}
|
|
44
|
+
declare abstract class VerifyCommandBase extends GitCommand<VerifyResult> {
|
|
45
|
+
protected readonly names: string[];
|
|
46
|
+
protected verbose: boolean;
|
|
47
|
+
protected raw: boolean;
|
|
48
|
+
/** `-v` / `--verbose`: the object's contents on stdout. */
|
|
49
|
+
setVerbose(verbose: boolean): this;
|
|
50
|
+
/** `--raw`: gpg's status lines instead of its human-readable output. */
|
|
51
|
+
setRaw(raw: boolean): this;
|
|
52
|
+
/** The object's type and bytes as stored (undefined when absent). */
|
|
53
|
+
protected readObject(id: ObjectId): Promise<{
|
|
54
|
+
type: string;
|
|
55
|
+
bytes: Uint8Array;
|
|
56
|
+
} | undefined>;
|
|
57
|
+
/** `repo_get_oid`: the object a name gives, undefined when it names none. */
|
|
58
|
+
protected lookup(name: string): Promise<ObjectId | undefined>;
|
|
59
|
+
/** gpg-interface.c's `print_signature_buffer` */
|
|
60
|
+
protected print(check: SignatureCheck, output: VerifyOutput): void;
|
|
61
|
+
protected abstract verifyOne(name: string, output: VerifyOutput): Promise<boolean>;
|
|
62
|
+
call(): Promise<VerifyResult>;
|
|
63
|
+
protected abstract usage(): string;
|
|
64
|
+
/** The check's own lines (git's `error()`/`warning()` on the way), with newlines. */
|
|
65
|
+
protected messages(check: SignatureCheck, output: VerifyOutput): void;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* `git verify-commit [-v | --verbose] [--raw] <commit>...`: each commit's `gpgsig` checked.
|
|
69
|
+
* A name that names nothing is `error: commit '<name>' not found.`, one of another type
|
|
70
|
+
* `error: <name>: cannot verify a non-commit object of type <type>.`; an unsigned commit
|
|
71
|
+
* fails silently. Exit 1 when any fails.
|
|
72
|
+
*/
|
|
73
|
+
export declare class VerifyCommitCommand extends VerifyCommandBase {
|
|
74
|
+
/** A commit to verify (any revision). */
|
|
75
|
+
addCommit(name: string): this;
|
|
76
|
+
protected usage(): string;
|
|
77
|
+
protected verifyOne(name: string, output: VerifyOutput): Promise<boolean>;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* `git verify-tag [-v | --verbose] [--raw] <tag>...`: each tag's appended signature
|
|
81
|
+
* checked. A name that names nothing is `error: tag '<name>' not found.`, one of another
|
|
82
|
+
* type `error: <name>: cannot verify a non-tag object of type <type>.`, a tag without a
|
|
83
|
+
* signature `error: no signature found` (`-v` prints the tag first). Exit 1 when any fails.
|
|
84
|
+
*/
|
|
85
|
+
export declare class VerifyTagCommand extends VerifyCommandBase {
|
|
86
|
+
/** A tag to verify (any revision naming a tag object). */
|
|
87
|
+
addTag(name: string): this;
|
|
88
|
+
protected usage(): string;
|
|
89
|
+
protected verifyOne(name: string, output: VerifyOutput): Promise<boolean>;
|
|
90
|
+
}
|
|
91
|
+
export {};
|
|
92
|
+
//# sourceMappingURL=verify-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify-command.d.ts","sourceRoot":"","sources":["../../src/commands/verify-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGtD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,KAAK,cAAc,EAAqC,MAAM,sBAAsB,CAAC;AAE9F,+EAA+E;AAC/E,MAAM,WAAW,YAAY;IAC3B,8DAA8D;IAC9D,QAAQ,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC;IACzB,qFAAqF;IACrF,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,mFAAmF;IACnF,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,oEAAoE;IACpE,QAAQ,CAAC,MAAM,EAAE,SAAS;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,CAAC,EAAE,QAAQ,CAAC;QAAC,KAAK,CAAC,EAAE,cAAc,CAAA;KAAE,EAAE,CAAC;CACrF;AAED,+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AAE,MAAM,EAAE,YAAY,GAAG,IAAI,CAEpE;CACF;AAED;;;;;GAKG;AACH,qBAAa,mBAAoB,SAAQ,iBAAiB;IACxD,yCAAyC;IACzC,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAI5B;IAED,SAAS,CAAC,KAAK,IAAI,MAAM,CAExB;IAED,UAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,CA6B9E;CACF;AAED;;;;;GAKG;AACH,qBAAa,gBAAiB,SAAQ,iBAAiB;IACrD,0DAA0D;IAC1D,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAIzB;IAED,SAAS,CAAC,KAAK,IAAI,MAAM,CAExB;IAED,UAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,CA4B9E;CACF"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type ObjectId, type PersonIdent } from "@statewalker/vcs-core";
|
|
2
|
-
import type
|
|
2
|
+
import { type WorkingCopy } from "@statewalker/vcs-working-tree";
|
|
3
3
|
import { GitCommand } from "../git-command.js";
|
|
4
|
+
import { TrackMode } from "./branch-tracking.js";
|
|
4
5
|
/** What {@link WorktreeAddCommand} did. */
|
|
5
6
|
export interface WorktreeAddResult {
|
|
6
7
|
/** The new worktree's path, as git prints it. */
|
|
@@ -15,7 +16,11 @@ export interface WorktreeAddResult {
|
|
|
15
16
|
messages: string[];
|
|
16
17
|
/** The post-checkout hook's exit code when it failed (git exits with it; the worktree stays) */
|
|
17
18
|
hookExitCode?: number;
|
|
18
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* What git prints on stdout without `--quiet`: the new branch's tracking
|
|
21
|
+
* (`branch 'x' set up to track 'origin/x'.`), then the checkout's
|
|
22
|
+
* `HEAD is now at <abbrev> <subject>`.
|
|
23
|
+
*/
|
|
19
24
|
output: string[];
|
|
20
25
|
/** A working copy of the new worktree. */
|
|
21
26
|
workingCopy: WorkingCopy;
|
|
@@ -24,7 +29,8 @@ export interface WorktreeAddResult {
|
|
|
24
29
|
* Add a linked worktree.
|
|
25
30
|
*
|
|
26
31
|
* Equivalent to `git worktree add [-f] [--detach] [--no-checkout] [--lock [--reason <r>]]
|
|
27
|
-
* [--orphan] [
|
|
32
|
+
* [--orphan] [--[no-]track] [--[no-]guess-remote] [--[no-]relative-paths]
|
|
33
|
+
* [(-b | -B) <new-branch>] <path> [<commit-ish>]`.
|
|
28
34
|
*
|
|
29
35
|
* @example
|
|
30
36
|
* ```typescript
|
|
@@ -33,6 +39,10 @@ export interface WorktreeAddResult {
|
|
|
33
39
|
* // detached at a tag, locked
|
|
34
40
|
* await git.worktreeAdd().setPath("../v1").setCommitish("v1.0").setDetach(true)
|
|
35
41
|
* .setLock(true).setLockReason("on a USB disk").call();
|
|
42
|
+
* // `git worktree add ../foo foo` with only origin/foo: branch foo tracking origin/foo
|
|
43
|
+
* await git.worktreeAdd().setPath("../foo").setCommitish("foo").call();
|
|
44
|
+
* // relative links (git 2.48+): extensions.relativeWorktrees is set
|
|
45
|
+
* await git.worktreeAdd().setPath("../rel").setRelativePaths(true).call();
|
|
36
46
|
* ```
|
|
37
47
|
*
|
|
38
48
|
* As git's `add`: without a commit-ish the new branch is named after the path's last
|
|
@@ -49,8 +59,15 @@ export interface WorktreeAddResult {
|
|
|
49
59
|
* HEAD and its reflog line; then, unless `--no-checkout`, the files and the index are
|
|
50
60
|
* checked out (git runs `reset --hard`: ORIG_HEAD and, on a branch, the reflog line
|
|
51
61
|
* `reset: moving to HEAD`). A failure removes what was created. The `post-checkout`
|
|
52
|
-
* hook runs in the new worktree once it is checked out (`<null> <HEAD> 1`)
|
|
53
|
-
*
|
|
62
|
+
* hook runs in the new worktree once it is checked out (`<null> <HEAD> 1`).
|
|
63
|
+
*
|
|
64
|
+
* Remote branches, as git's DWIM: a commit-ish that names no commit but the one
|
|
65
|
+
* remote-tracking branch of that name (`unique_tracking_name`, `checkout.defaultRemote`
|
|
66
|
+
* among several) creates a local branch from it; without a commit-ish,
|
|
67
|
+
* {@link setGuessRemote} (`worktree.guessRemote`) does the same for the name taken from the
|
|
68
|
+
* path. A new branch tracks its start as `git branch` does ({@link setTrack},
|
|
69
|
+
* `branch.autoSetupMerge`). Several matches die with git's advice in 2.5x; git 2.43
|
|
70
|
+
* ({@link setCompatibility}) takes them for no match.
|
|
54
71
|
*/
|
|
55
72
|
export declare class WorktreeAddCommand extends GitCommand<WorktreeAddResult> {
|
|
56
73
|
private path?;
|
|
@@ -65,6 +82,10 @@ export declare class WorktreeAddCommand extends GitCommand<WorktreeAddResult> {
|
|
|
65
82
|
private orphan;
|
|
66
83
|
private quiet;
|
|
67
84
|
private who?;
|
|
85
|
+
private track?;
|
|
86
|
+
private guessRemote?;
|
|
87
|
+
private relativePaths?;
|
|
88
|
+
private compatibility;
|
|
68
89
|
/** The new worktree's path (a path of the repository's storage, or an absolute host path). */
|
|
69
90
|
setPath(path: string): this;
|
|
70
91
|
/** What to check out (default: HEAD; with a new branch, its start). */
|
|
@@ -85,10 +106,53 @@ export declare class WorktreeAddCommand extends GitCommand<WorktreeAddResult> {
|
|
|
85
106
|
setOrphan(orphan: boolean): this;
|
|
86
107
|
/** `--quiet`: no messages. */
|
|
87
108
|
setQuiet(quiet: boolean): this;
|
|
109
|
+
/**
|
|
110
|
+
* `--track[=inherit]` / `--no-track`: how a new branch tracks its start (git passes it to
|
|
111
|
+
* its `git branch` child); without a new branch the add is refused.
|
|
112
|
+
*/
|
|
113
|
+
setTrack(mode: TrackMode): this;
|
|
114
|
+
/**
|
|
115
|
+
* `--[no-]guess-remote` (default `worktree.guessRemote`, false): without a commit-ish, the
|
|
116
|
+
* new branch named after the path starts at the remote-tracking branch of that name.
|
|
117
|
+
*/
|
|
118
|
+
setGuessRemote(guess: boolean): this;
|
|
119
|
+
/**
|
|
120
|
+
* `--[no-]relative-paths` (git 2.48+, default `worktree.useRelativePaths`): the link files
|
|
121
|
+
* hold relative paths and the repository gets `extensions.relativeWorktrees` (which git
|
|
122
|
+
* before 2.48 refuses: only on request).
|
|
123
|
+
*/
|
|
124
|
+
setRelativePaths(relative: boolean): this;
|
|
125
|
+
/**
|
|
126
|
+
* The git version reproduced (default 2.56). 2.43 has no relative links (the option is
|
|
127
|
+
* refused, `worktree.useRelativePaths` ignored) and takes an ambiguous remote branch name
|
|
128
|
+
* for none.
|
|
129
|
+
*/
|
|
130
|
+
setCompatibility(version: "2.43" | "2.56"): this;
|
|
88
131
|
/** The identity of the reflog lines (default: the repository's `user.name` / `user.email`). */
|
|
89
132
|
setIdent(who: PersonIdent): this;
|
|
90
133
|
call(): Promise<WorktreeAddResult>;
|
|
91
|
-
/**
|
|
134
|
+
/**
|
|
135
|
+
* git's `unique_tracking_name` for `worktree add`: the remote-tracking branch `name` is
|
|
136
|
+
* guessed from, undefined when none; several without `checkout.defaultRemote` die with
|
|
137
|
+
* git's advice (2.5x) or count as none (2.43).
|
|
138
|
+
*/
|
|
139
|
+
private trackingName;
|
|
140
|
+
/**
|
|
141
|
+
* git's `can_use_local_refs`: HEAD resolves, or some branch does (then, unless quiet, the
|
|
142
|
+
* warning that HEAD is invalid).
|
|
143
|
+
*/
|
|
144
|
+
private canUseLocalRefs;
|
|
145
|
+
/**
|
|
146
|
+
* git's `remote_get(NULL)` found a remote: the current branch's `branch.<b>.remote` (any
|
|
147
|
+
* name, git takes one without a section for a URL), else the one configured remote, else
|
|
148
|
+
* `origin`, which must have a URL.
|
|
149
|
+
*/
|
|
150
|
+
private hasDefaultRemote;
|
|
151
|
+
/**
|
|
152
|
+
* git's `dwim_orphan`: no valid HEAD, no branch and (`remote` with --guess-remote) no
|
|
153
|
+
* remote-tracking branch infers `--orphan`; a remote with nothing fetched refuses the add
|
|
154
|
+
* unless forced.
|
|
155
|
+
*/
|
|
92
156
|
private dwimOrphan;
|
|
93
157
|
/** The commit `name` names (`lookup_commit_reference_by_name`), else undefined. */
|
|
94
158
|
private commitOf;
|
|
@@ -98,8 +162,16 @@ export declare class WorktreeAddCommand extends GitCommand<WorktreeAddResult> {
|
|
|
98
162
|
private isBranch;
|
|
99
163
|
/** The identity set, else git's committer ident (environment, configuration). */
|
|
100
164
|
private ident;
|
|
101
|
-
/**
|
|
165
|
+
/**
|
|
166
|
+
* `git branch [--force] [--quiet] <new> <start> [--[no-]track]`, with git's reflog line and
|
|
167
|
+
* the tracking `create_branch` sets up (its message on `output` unless quiet).
|
|
168
|
+
*/
|
|
102
169
|
private createBranch;
|
|
170
|
+
/**
|
|
171
|
+
* A step of git's `git branch` child: its death (`fatal: ...` with hints, whatever their
|
|
172
|
+
* order) becomes a WorktreeError carrying what was printed before.
|
|
173
|
+
*/
|
|
174
|
+
private childStep;
|
|
103
175
|
/** git's `add_worktree`. */
|
|
104
176
|
private addWorktree;
|
|
105
177
|
/** git's `reset --hard --no-recurse-submodules` in the new worktree. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worktree-add-command.d.ts","sourceRoot":"","sources":["../../src/commands/worktree-add-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,QAAQ,EACb,KAAK,WAAW,EACjB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"worktree-add-command.d.ts","sourceRoot":"","sources":["../../src/commands/worktree-add-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,QAAQ,EACb,KAAK,WAAW,EACjB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAIL,KAAK,WAAW,EAEjB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAIL,SAAS,EAIV,MAAM,sBAAsB,CAAC;AAY9B,2CAA2C;AAC3C,MAAM,WAAW,iBAAiB;IAChC,iDAAiD;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,mEAAmE;IACnE,EAAE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B;CAkD/B"}
|
|
@@ -161,6 +161,8 @@ export declare function overwriteMessage(action: "checkout" | "merge", found: {
|
|
|
161
161
|
lostDirs?: string[];
|
|
162
162
|
untracked?: string[];
|
|
163
163
|
untrackedRemoved?: string[];
|
|
164
|
+
/** Submodules that cannot be moved (git's ERROR_WOULD_LOSE_SUBMODULE), listed last */
|
|
165
|
+
submodules?: string[];
|
|
164
166
|
}): string | undefined;
|
|
165
167
|
/**
|
|
166
168
|
* Whether the worktree file at `path` differs from an index entry whose flags cheat
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worktree-overwrite-checks.d.ts","sourceRoot":"","sources":["../../src/commands/worktree-overwrite-checks.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAY,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,EAEL,eAAe,EACf,KAAK,YAAY,EACjB,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,iBAAiB,EAEvB,MAAM,+BAA+B,CAAC;AAEvC,sEAAsE;AACtE,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CACnC,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,YAAY,EACnB,KAAK,CAAC,EAAE,iBAAiB,EACzB,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,OAAO,CAAC,CAQlB;AAgED;;;;GAIG;AACH,wBAAsB,gBAAgB,CACpC,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,YAAY,EACnB,KAAK,CAAC,EAAE,iBAAiB,EACzB,SAAS,CA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