@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,6 +1,8 @@
|
|
|
1
1
|
import type { ObjectId, Ref } from "@statewalker/vcs-core";
|
|
2
2
|
import { GitCommand } from "../git-command.js";
|
|
3
3
|
import { ListBranchMode } from "../types.js";
|
|
4
|
+
import { TrackMode } from "./branch-tracking.js";
|
|
5
|
+
import { RefListingCommand } from "./ref-filter/index.js";
|
|
4
6
|
/**
|
|
5
7
|
* Create a new branch.
|
|
6
8
|
*
|
|
@@ -32,6 +34,11 @@ export declare class CreateBranchCommand extends GitCommand<Ref> {
|
|
|
32
34
|
private name?;
|
|
33
35
|
private startPoint?;
|
|
34
36
|
private force;
|
|
37
|
+
private track;
|
|
38
|
+
private createReflog;
|
|
39
|
+
private quiet;
|
|
40
|
+
private readonly output;
|
|
41
|
+
private readonly warnings;
|
|
35
42
|
/**
|
|
36
43
|
* Set the name of the branch to create.
|
|
37
44
|
*
|
|
@@ -56,11 +63,48 @@ export declare class CreateBranchCommand extends GitCommand<Ref> {
|
|
|
56
63
|
*/
|
|
57
64
|
setForce(force: boolean): this;
|
|
58
65
|
/**
|
|
59
|
-
*
|
|
66
|
+
* How the new branch tracks its start point: git's `-t`/`--track[=direct]`
|
|
67
|
+
* (`TrackMode.DIRECT`: the start point must be a branch, a local one tracked with
|
|
68
|
+
* `remote = .`), `--track=inherit` (the start branch's own upstream copied), `--no-track`;
|
|
69
|
+
* by default `branch.autoSetupMerge` decides (`true`: a remote-tracking start point is
|
|
70
|
+
* tracked; `always`, `inherit`, `simple`, `false`). `branch.autoSetupRebase` adds
|
|
71
|
+
* `branch.<name>.rebase = true`.
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```typescript
|
|
75
|
+
* const command = git.branchCreate().setName("topic").setStartPoint("origin/topic");
|
|
76
|
+
* await command.setTrack(TrackMode.DIRECT).call();
|
|
77
|
+
* command.getOutput(); // ["branch 'topic' set up to track 'origin/topic'."]
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
setTrack(mode: TrackMode): this;
|
|
81
|
+
/**
|
|
82
|
+
* git's `--create-reflog`: the branch's reflog is created whatever
|
|
83
|
+
* `core.logAllRefUpdates` says.
|
|
84
|
+
*/
|
|
85
|
+
setCreateReflog(createReflog: boolean): this;
|
|
86
|
+
/** git's `-q`: no "set up to track" message ({@link getOutput} stays empty). */
|
|
87
|
+
setQuiet(quiet: boolean): this;
|
|
88
|
+
/**
|
|
89
|
+
* What git printed on stdout, line by line: `branch '<b>' set up to track
|
|
90
|
+
* '<upstream>'.` (see {@link setTrack}). Read after {@link call}.
|
|
91
|
+
*/
|
|
92
|
+
getOutput(): string[];
|
|
93
|
+
/**
|
|
94
|
+
* What git printed on stderr, line by line: `warning: asked to inherit tracking from
|
|
95
|
+
* '<b>', but no remote is set` and the like. Read after {@link call}.
|
|
96
|
+
*/
|
|
97
|
+
getWarnings(): string[];
|
|
98
|
+
/**
|
|
99
|
+
* Execute the branch creation (git's `create_branch`).
|
|
60
100
|
*
|
|
61
101
|
* @returns The created branch ref
|
|
62
102
|
* @throws InvalidRefNameError if branch name is invalid
|
|
63
103
|
* @throws RefAlreadyExistsError if branch exists and force is false
|
|
104
|
+
* @throws RefNotFoundError when the start point names nothing (`fatal: not a valid object
|
|
105
|
+
* name: '<start>'`), or when several remotes fetch into the tracked start point (once the
|
|
106
|
+
* branch is created, as git dies)
|
|
107
|
+
* @throws InvalidArgumentError when `--track` cannot track the start point
|
|
64
108
|
*/
|
|
65
109
|
call(): Promise<Ref>;
|
|
66
110
|
}
|
|
@@ -129,50 +173,136 @@ export declare class DeleteBranchCommand extends GitCommand<string[]> {
|
|
|
129
173
|
*/
|
|
130
174
|
private isBranchMerged;
|
|
131
175
|
}
|
|
176
|
+
/** What {@link ListBranchCommand.callText} printed. */
|
|
177
|
+
export interface BranchListResult {
|
|
178
|
+
/** git's stdout: each branch's line and its newline (bytes outside UTF-8 as `decodeGitPath` keeps them) */
|
|
179
|
+
output: string;
|
|
180
|
+
/** Each shown branch's line, in order (an empty one left out with `--omit-empty`) */
|
|
181
|
+
lines: string[];
|
|
182
|
+
/** The refs shown, in order (`HEAD` for a detached HEAD) */
|
|
183
|
+
branches: {
|
|
184
|
+
refname: string;
|
|
185
|
+
objectId: ObjectId;
|
|
186
|
+
}[];
|
|
187
|
+
/** git's warnings on stderr */
|
|
188
|
+
warnings: string[];
|
|
189
|
+
}
|
|
132
190
|
/**
|
|
133
191
|
* List branches.
|
|
134
192
|
*
|
|
135
|
-
* Equivalent to `git branch
|
|
193
|
+
* Equivalent to `git branch --list`. {@link call} returns the branch refs (symbolic ones
|
|
194
|
+
* left out); {@link callText} prints git's listing: `* ` before the branch checked out here,
|
|
195
|
+
* `+ ` before one another worktree has checked out, a detached HEAD first as
|
|
196
|
+
* `(HEAD detached at <name>)` (or `from`, `(no branch, rebasing <branch>)`,
|
|
197
|
+
* `(no branch, bisect started on <branch>)`), symbolic refs as `name -> target`, and with
|
|
198
|
+
* `-v` each branch's abbreviated id, upstream tracking and subject (`-vv`: the upstream's
|
|
199
|
+
* name and other worktrees' paths), aligned as git aligns them.
|
|
136
200
|
*
|
|
137
|
-
*
|
|
201
|
+
* The ref filter is git's (`ref-filter`): patterns match after `refs/heads/` or
|
|
202
|
+
* `refs/remotes/` (`setPatterns("feature/*")`), `setSort` keys follow `--sort` (the last is
|
|
203
|
+
* primary; `branch.sort` keys come before them, `refname` when none), `setFormat` takes the
|
|
204
|
+
* `for-each-ref` language, and the reachability filters (`setContains`, `setNoContains`,
|
|
205
|
+
* `setMerged`, `setNoMerged`, `setPointsAt`) take revision names (HEAD when none is given).
|
|
206
|
+
* Colors follow `--color` or `color.branch`/`color.ui` set to `always` (no terminal is
|
|
207
|
+
* assumed), with `color.branch.<slot>`. Not supported: `--column` layouts (lines are
|
|
208
|
+
* printed as `--no-column` prints them).
|
|
209
|
+
*
|
|
210
|
+
* Based on JGit's ListBranchCommand and git's builtin/branch.c.
|
|
138
211
|
*
|
|
139
212
|
* @example
|
|
140
213
|
* ```typescript
|
|
141
214
|
* // List local branches
|
|
142
215
|
* const branches = await git.branchList().call();
|
|
143
216
|
*
|
|
144
|
-
* //
|
|
145
|
-
* const
|
|
146
|
-
* .setListMode(ListBranchMode.REMOTE)
|
|
147
|
-
* .call();
|
|
148
|
-
*
|
|
149
|
-
* // List all branches
|
|
150
|
-
* const all = await git.branchList()
|
|
217
|
+
* // git branch -a -vv --merged
|
|
218
|
+
* const { output } = await git.branchList()
|
|
151
219
|
* .setListMode(ListBranchMode.ALL)
|
|
152
|
-
* .
|
|
220
|
+
* .setVerbose(2)
|
|
221
|
+
* .setMerged()
|
|
222
|
+
* .callText();
|
|
223
|
+
*
|
|
224
|
+
* // git branch --sort=-committerdate --format='%(refname:short)' 'feature/*'
|
|
225
|
+
* const { lines } = await git.branchList()
|
|
226
|
+
* .setSort("-committerdate")
|
|
227
|
+
* .setFormat("%(refname:short)")
|
|
228
|
+
* .setPatterns("feature/*")
|
|
229
|
+
* .callText();
|
|
153
230
|
* ```
|
|
154
231
|
*/
|
|
155
|
-
export declare class ListBranchCommand extends
|
|
232
|
+
export declare class ListBranchCommand extends RefListingCommand<Ref[]> {
|
|
156
233
|
private listMode;
|
|
157
|
-
private
|
|
234
|
+
private patterns;
|
|
235
|
+
private verbose;
|
|
236
|
+
private abbrev?;
|
|
237
|
+
private format?;
|
|
238
|
+
private sortKeys;
|
|
239
|
+
private ignoreCase;
|
|
240
|
+
private omitEmpty;
|
|
241
|
+
private color?;
|
|
242
|
+
private pointsAt;
|
|
243
|
+
private contains;
|
|
244
|
+
private noContains;
|
|
245
|
+
private merged;
|
|
246
|
+
private noMerged;
|
|
247
|
+
private compatibility;
|
|
158
248
|
/**
|
|
159
|
-
* Set the listing mode.
|
|
249
|
+
* Set the listing mode: local branches (default), `-r` (remote-tracking) or `-a` (both).
|
|
160
250
|
*
|
|
161
251
|
* @param mode Which branches to list
|
|
162
252
|
*/
|
|
163
253
|
setListMode(mode: ListBranchMode): this;
|
|
254
|
+
/** `<pattern>...`: branches whose name after `refs/heads/` or `refs/remotes/` matches one. */
|
|
255
|
+
setPatterns(...patterns: string[]): this;
|
|
256
|
+
/** `-v` (1) or `-vv` (2): ids and subjects, then upstreams and worktree paths. */
|
|
257
|
+
setVerbose(level: number): this;
|
|
258
|
+
/** `--abbrev=<n>` for `-v`'s ids (0: `--no-abbrev`, the full id). */
|
|
259
|
+
setAbbrev(length: number): this;
|
|
260
|
+
/** `--format=<format>`: each branch through git's ref format language. */
|
|
261
|
+
setFormat(format: string): this;
|
|
262
|
+
/** `--sort=<key>` for each key, in command-line order (the last is the primary key). */
|
|
263
|
+
setSort(...keys: string[]): this;
|
|
264
|
+
/** `-i`: patterns and sorting without case. */
|
|
265
|
+
setIgnoreCase(ignore: boolean): this;
|
|
266
|
+
/** `--omit-empty`: no line for a branch whose format expands to nothing. */
|
|
267
|
+
setOmitEmpty(omit: boolean): this;
|
|
268
|
+
/** `--color` (true) or `--no-color` (false); default `color.branch`/`color.ui` `always`. */
|
|
269
|
+
setColor(color: boolean): this;
|
|
270
|
+
/** `--points-at=<object>`: branches naming one of these objects. */
|
|
271
|
+
setPointsAt(...objects: string[]): this;
|
|
164
272
|
/**
|
|
165
|
-
*
|
|
273
|
+
* `--contains[=<commit>]` (HEAD without one): branches whose commit reaches one of these.
|
|
166
274
|
*
|
|
167
|
-
* @param
|
|
275
|
+
* @param commits Revision names or object ids
|
|
168
276
|
*/
|
|
169
|
-
setContains(
|
|
277
|
+
setContains(...commits: string[]): this;
|
|
278
|
+
/** `--no-contains[=<commit>]` (HEAD without one): branches whose commit reaches none. */
|
|
279
|
+
setNoContains(...commits: string[]): this;
|
|
280
|
+
/** `--merged[=<commit>]` (HEAD without one): branches one of these reaches. */
|
|
281
|
+
setMerged(...commits: string[]): this;
|
|
282
|
+
/** `--no-merged[=<commit>]` (HEAD without one): branches none of these reaches. */
|
|
283
|
+
setNoMerged(...commits: string[]): this;
|
|
284
|
+
/**
|
|
285
|
+
* The git version whose `--format` output to follow where versions differ (default 2.56;
|
|
286
|
+
* see `ForEachRefCommand.setCompatibility`).
|
|
287
|
+
*/
|
|
288
|
+
setCompatibility(version: "2.43" | "2.56"): this;
|
|
289
|
+
private kind;
|
|
290
|
+
private filterOptions;
|
|
170
291
|
/**
|
|
171
292
|
* Execute the branch listing.
|
|
172
293
|
*
|
|
173
|
-
* @returns
|
|
294
|
+
* @returns The branch refs the filters keep, symbolic refs left out, in name order
|
|
174
295
|
*/
|
|
175
296
|
call(): Promise<Ref[]>;
|
|
297
|
+
/**
|
|
298
|
+
* `git branch --list`'s output.
|
|
299
|
+
*
|
|
300
|
+
* @throws RefFilterError where git refuses an option or dies (bad format, bad sort key,
|
|
301
|
+
* a name that is no commit)
|
|
302
|
+
*/
|
|
303
|
+
callText(): Promise<BranchListResult>;
|
|
304
|
+
/** get_head_description over this repository's state. */
|
|
305
|
+
private headDescription;
|
|
176
306
|
}
|
|
177
307
|
/**
|
|
178
308
|
* Rename a branch. Other worktrees whose HEAD is on it follow the new name, with git's
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"branch-command.d.ts","sourceRoot":"","sources":["../../src/commands/branch-command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAiB,GAAG,EAAQ,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"branch-command.d.ts","sourceRoot":"","sources":["../../src/commands/branch-command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAiB,GAAG,EAAQ,MAAM,uBAAuB,CAAC;AAoBhF,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAGL,SAAS,EAGV,MAAM,sBAAsB,CAAC;AAK9B,OAAO,EAOL,iBAAiB,EAGlB,MAAM,uBAAuB,CAAC;AAK/B;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,mBAAoB,SAAQ,UAAU,CAAC,GAAG,CAAC;IACtD,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,OAAO,CAAC,OAAO,CAAC,CAAS;IAEzB;;;;;;OAMG;IACH,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAIhC;IAED;;;;OAIG;IACH,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAIhC;IAED;;;;;;;OAOG;IACG,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,CA4GzB;CACF;AAED;;;;;;;;;;;;;;GAcG;AACH,qBAAa,iBAAkB,SAAQ,UAAU,CAAC,GAAG,CAAC;IACpD,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,OAAO,CAAC,KAAK,CAAS;IAEtB,qDAAqD;IACrD,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAIhC;IAED,6BAA6B;IAC7B,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAIhC;IAED,uFAAuF;IACvF,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAI7B;IAED;;;;;;;OAOG;IACG,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,CAkFzB;CACF"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `git branch --show-current` and `git branch --edit-description` (builtin/branch.c
|
|
3
|
+
* `print_current_branch_name`, `edit_branch_description`).
|
|
4
|
+
*/
|
|
5
|
+
import { GitCommand } from "../git-command.js";
|
|
6
|
+
import type { CommitEditor } from "./commit-command.js";
|
|
7
|
+
/**
|
|
8
|
+
* The branch checked out.
|
|
9
|
+
*
|
|
10
|
+
* Equivalent to `git branch --show-current`: the branch HEAD names, an unborn one too, and
|
|
11
|
+
* undefined on a detached HEAD (git prints nothing). A HEAD naming a ref outside
|
|
12
|
+
* `refs/heads/` is refused as `git branch` refuses it (`fatal: HEAD not found below refs/heads!`).
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* const name = await git.branchShowCurrent().call(); // "main", or undefined when detached
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare class ShowCurrentBranchCommand extends GitCommand<string | undefined> {
|
|
20
|
+
call(): Promise<string | undefined>;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Edit a branch's description (`branch.<name>.description`).
|
|
24
|
+
*
|
|
25
|
+
* Equivalent to `git branch --edit-description [<branch>]`: the description so far, then
|
|
26
|
+
* git's commented help, is written to `EDIT_DESCRIPTION` in the git directory and given to
|
|
27
|
+
* the editor (a library cannot launch `core.editor`; the callback has the shape of
|
|
28
|
+
* `CommitCommand.setEditor`'s and returns the edited text, or nothing once it changed the
|
|
29
|
+
* file). The result is cleaned up as git's `stripspace` with comments stripped; an empty
|
|
30
|
+
* one removes the description.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```typescript
|
|
34
|
+
* await git.branchEditDescription().setEditor(async () => "Work on the parser\n").call();
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare class EditBranchDescriptionCommand extends GitCommand<string | undefined> {
|
|
38
|
+
private branch?;
|
|
39
|
+
private editor?;
|
|
40
|
+
/** The branch to describe (default: the one checked out). */
|
|
41
|
+
setBranch(branch: string): this;
|
|
42
|
+
/**
|
|
43
|
+
* The editor: called with `EDIT_DESCRIPTION` and the text written there. Without one the
|
|
44
|
+
* text is taken as written (the description kept, cleaned up).
|
|
45
|
+
*/
|
|
46
|
+
setEditor(editor: CommitEditor): this;
|
|
47
|
+
/**
|
|
48
|
+
* @returns the new description, undefined when there is none
|
|
49
|
+
* @throws GitApiError on a detached HEAD (`fatal: cannot give description to detached
|
|
50
|
+
* HEAD`), for a branch that does not exist (`error: no branch named '<b>'`, or `no commit
|
|
51
|
+
* on branch '<b>' yet` for one checked out; exit status 1)
|
|
52
|
+
*/
|
|
53
|
+
call(): Promise<string | undefined>;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=branch-info-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"branch-info-command.d.ts","sourceRoot":"","sources":["../../src/commands/branch-info-command.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAKxD;;;;;;;;;;;GAWG;AACH,qBAAa,wBAAyB,SAAQ,UAAU,CAAC,MAAM,GAAG,SAAS,CAAC;IACpE,IAAI,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAkBxC;CACF;AAED;;;;;;;;;;;;;;GAcG;AACH,qBAAa,4BAA6B,SAAQ,UAAU,CAAC,MAAM,GAAG,SAAS,CAAC;IAC9E,OAAO,CAAC,MAAM,CAAC,CAAS;IACxB,OAAO,CAAC,MAAM,CAAC,CAAe;IAE9B,6DAA6D;IAC7D,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAI9B;IAED;;;OAGG;IACH,SAAS,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAIpC;IAED;;;;;OAKG;IACG,IAAI,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAyDxC;CACF"}
|
|
@@ -7,11 +7,13 @@
|
|
|
7
7
|
* @example
|
|
8
8
|
* ```typescript
|
|
9
9
|
* // `git switch -c topic origin/topic`: branch.topic.remote=origin, .merge=refs/heads/topic
|
|
10
|
-
*
|
|
10
|
+
* const { plan } = planTracking(workingCopy, "topic", "refs/remotes/origin/topic", TrackMode.DEFAULT);
|
|
11
|
+
* if (plan) await installTracking(workingCopy, "topic", plan); // ["branch 'topic' set up to track 'origin/topic'."]
|
|
11
12
|
* ```
|
|
12
13
|
*/
|
|
13
14
|
import { type Refs } from "@statewalker/vcs-core";
|
|
14
15
|
import type { WorkingCopy } from "@statewalker/vcs-working-tree";
|
|
16
|
+
import { InvalidArgumentError } from "../errors/index.js";
|
|
15
17
|
/**
|
|
16
18
|
* How a new branch tracks its start point (git's `--track`, `--no-track`,
|
|
17
19
|
* `branch.autoSetupMerge`).
|
|
@@ -42,16 +44,53 @@ export declare function applyRefspecs(specStrings: string[], src: string): strin
|
|
|
42
44
|
* (a `refs/remotes/...` ref no remote writes is not tracked as a branch).
|
|
43
45
|
*/
|
|
44
46
|
export declare function isRemoteTrackingBranch(workingCopy: WorkingCopy, ref: string): boolean;
|
|
47
|
+
/** What {@link uniqueTrackingName} found. */
|
|
48
|
+
export interface TrackingNameMatch {
|
|
49
|
+
/**
|
|
50
|
+
* The tracking ref picked (a full ref name): the only match, else the one of
|
|
51
|
+
* `checkout.defaultRemote`; undefined when none or several match without a default.
|
|
52
|
+
*/
|
|
53
|
+
readonly ref?: string;
|
|
54
|
+
/** The remotes whose fetch refspecs map `refs/heads/<name>` onto an existing ref, in order. */
|
|
55
|
+
readonly remotes: string[];
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* git's `unique_tracking_name` (checkout.c): every remote, in configuration order, whose
|
|
59
|
+
* fetch refspecs map `refs/heads/<name>` onto a ref that exists (in `refs/remotes/` or
|
|
60
|
+
* anywhere else, as `refs/repo_d/*`); the one match, or with several the one of
|
|
61
|
+
* `checkout.defaultRemote`.
|
|
62
|
+
*/
|
|
63
|
+
export declare function uniqueTrackingName(workingCopy: WorkingCopy, refs: Refs, name: string): Promise<TrackingNameMatch>;
|
|
64
|
+
/** Whether `advice.checkoutAmbiguousRemoteBranchName` is on (the default). */
|
|
65
|
+
export declare function ambiguousRemoteAdvice(workingCopy: WorkingCopy): boolean;
|
|
66
|
+
/**
|
|
67
|
+
* builtin/checkout.c's `advise_disambiguating_remotes` for `git checkout` / `git switch`
|
|
68
|
+
* (git 2.43 words it without the remotes, and always as `git checkout`).
|
|
69
|
+
*/
|
|
70
|
+
export declare function checkoutAmbiguityHints(command: "checkout" | "switch", name: string, remotes: string[], compatibility?: TrackingCompatibility): string[];
|
|
71
|
+
/**
|
|
72
|
+
* builtin/worktree.c's `advise_disambiguating_remotes` (git 2.5x; 2.43's `worktree add`
|
|
73
|
+
* takes an ambiguous name for no remote branch at all).
|
|
74
|
+
*/
|
|
75
|
+
export declare function worktreeAmbiguityHints(path: string, name: string, remotes: string[]): string[];
|
|
76
|
+
/** Options of {@link guessRemoteBranch}. */
|
|
77
|
+
export interface GuessRemoteBranchOptions {
|
|
78
|
+
/** The command whose advice an ambiguous name gets (default `checkout`). */
|
|
79
|
+
command?: "checkout" | "switch";
|
|
80
|
+
/** The git version whose advice it follows (default 2.56). */
|
|
81
|
+
compatibility?: TrackingCompatibility;
|
|
82
|
+
}
|
|
45
83
|
/**
|
|
46
84
|
* The remote-tracking branch git's checkout and switch turn `name` into when no ref has
|
|
47
|
-
* that name (`--guess`, on by default): the one
|
|
85
|
+
* that name (`--guess`, on by default, git's `parse_remote_branch`): the one ref that some
|
|
48
86
|
* remote fetches `refs/heads/<name>` into; with several, the one of `checkout.defaultRemote`.
|
|
49
87
|
*
|
|
50
88
|
* @returns the full name of the tracking ref, or undefined when no remote has the branch
|
|
51
|
-
* @throws InvalidArgumentError when several remotes have it
|
|
52
|
-
*
|
|
89
|
+
* @throws InvalidArgumentError when several remotes have it: the
|
|
90
|
+
* `advice.checkoutAmbiguousRemoteBranchName` hints, then git's `fatal: '<name>' matched
|
|
91
|
+
* multiple (<n>) remote tracking branches`
|
|
53
92
|
*/
|
|
54
|
-
export declare function guessRemoteBranch(workingCopy: WorkingCopy, refs: Refs, name: string): Promise<string | undefined>;
|
|
93
|
+
export declare function guessRemoteBranch(workingCopy: WorkingCopy, refs: Refs, name: string, options?: GuessRemoteBranchOptions): Promise<string | undefined>;
|
|
55
94
|
/**
|
|
56
95
|
* The start point's full ref name when it names a branch git would track (git's
|
|
57
96
|
* `dwim_branch_start`): a local branch, or a remote-tracking branch some remote fetches
|
|
@@ -61,6 +100,21 @@ export declare function guessRemoteBranch(workingCopy: WorkingCopy, refs: Refs,
|
|
|
61
100
|
export declare function trackableStart(workingCopy: WorkingCopy, refs: Refs, start: string, mode: TrackMode): Promise<string | undefined>;
|
|
62
101
|
/** The ref a (possibly symbolic) ref ends at, when that one exists. */
|
|
63
102
|
export declare function endOfSymbolicChain(refs: Refs, name: string): Promise<string | undefined>;
|
|
103
|
+
/** The git version whose wording a tracking message follows (hints differ). */
|
|
104
|
+
export type TrackingCompatibility = "2.43" | "2.56";
|
|
105
|
+
/**
|
|
106
|
+
* git's `advise()` lines of `text`: `hint: <line>`, an empty line `hint:` (2.43 wrote
|
|
107
|
+
* `hint: ` with the space).
|
|
108
|
+
*/
|
|
109
|
+
export declare function hintLines(text: string, compatibility?: TrackingCompatibility): string[];
|
|
110
|
+
/** The closing line of `advise_if_enabled`, as the version words it. */
|
|
111
|
+
export declare function disableHint(name: string, compatibility?: TrackingCompatibility): string;
|
|
112
|
+
/**
|
|
113
|
+
* git's `upstream_missing` death of `dwim_branch_start` under `--track` /
|
|
114
|
+
* `--set-upstream-to`: `fatal: the requested upstream branch '<start>' does not exist`,
|
|
115
|
+
* with the `advice.setUpstreamFailure` hint.
|
|
116
|
+
*/
|
|
117
|
+
export declare function upstreamMissingError(workingCopy: WorkingCopy, start: string, compatibility?: TrackingCompatibility): InvalidArgumentError;
|
|
64
118
|
/**
|
|
65
119
|
* The upstream configuration {@link planTracking} decided on: `branch.<name>.remote` (none
|
|
66
120
|
* for a local start, written as `.`), `.merge` and whether `.rebase` is set.
|
|
@@ -70,29 +124,64 @@ export interface TrackingPlan {
|
|
|
70
124
|
readonly merges: string[];
|
|
71
125
|
readonly rebase: boolean;
|
|
72
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* What {@link planTracking} decided: the plan (none when nothing is tracked) and the
|
|
129
|
+
* warnings git prints instead (`warning: asked to inherit tracking from '<b>', but no
|
|
130
|
+
* remote is set`, `warning: not setting branch '<b>' as its own upstream`).
|
|
131
|
+
*/
|
|
132
|
+
export interface TrackingDecision {
|
|
133
|
+
readonly plan?: TrackingPlan;
|
|
134
|
+
readonly warnings: string[];
|
|
135
|
+
}
|
|
136
|
+
/** Options of {@link planTracking}. */
|
|
137
|
+
export interface PlanTrackingOptions {
|
|
138
|
+
/** The git version whose hints the refusals follow (default 2.56). */
|
|
139
|
+
compatibility?: TrackingCompatibility;
|
|
140
|
+
}
|
|
73
141
|
/**
|
|
74
142
|
* git's `setup_tracking` up to the point it writes: what a new branch that starts at the
|
|
75
143
|
* branch `startRef` (a full ref name, see {@link trackableStart}) tracks, as `mode` and
|
|
76
144
|
* `branch.autoSetupMerge` say. Nothing is written; {@link installTracking} does that.
|
|
77
145
|
*
|
|
78
|
-
* @returns the plan
|
|
146
|
+
* @returns the plan (none when nothing is tracked) with git's warnings
|
|
79
147
|
* @throws RefNotFoundError when several remotes fetch into `startRef` (git's `not
|
|
80
|
-
* tracking: ambiguous information for ref '<ref>'`
|
|
148
|
+
* tracking: ambiguous information for ref '<ref>'` and the `advice.ambiguousFetchRefspec`
|
|
149
|
+
* hint)
|
|
150
|
+
* @throws InvalidArgumentError when several refs are inherited and `branch.autoSetupRebase`
|
|
151
|
+
* asks for rebasing (`cannot inherit upstream tracking configuration of multiple refs
|
|
152
|
+
* when rebasing is requested`)
|
|
81
153
|
*/
|
|
82
|
-
export declare function planTracking(workingCopy: WorkingCopy, newBranch: string, startRef: string, mode: TrackMode):
|
|
154
|
+
export declare function planTracking(workingCopy: WorkingCopy, newBranch: string, startRef: string, mode: TrackMode, options?: PlanTrackingOptions): TrackingDecision;
|
|
83
155
|
/**
|
|
84
|
-
*
|
|
156
|
+
* The plan of `git push -u` (transport.c `set_upstreams` → `install_branch_config`): the
|
|
157
|
+
* branch tracks `merge` (a `refs/heads/` ref) of `remote` (the remote's name, or the URL
|
|
158
|
+
* pushed to), rebasing as `branch.autoSetupRebase` says.
|
|
85
159
|
*
|
|
86
|
-
* @
|
|
160
|
+
* @example
|
|
161
|
+
* ```typescript
|
|
162
|
+
* const plan = pushTrackingPlan(workingCopy, "origin", "refs/heads/topic");
|
|
163
|
+
* await installTracking(workingCopy, "topic", plan); // ["branch 'topic' set up to track 'origin/topic'."]
|
|
164
|
+
* ```
|
|
165
|
+
*/
|
|
166
|
+
export declare function pushTrackingPlan(workingCopy: WorkingCopy, remote: string, merge: string): TrackingPlan;
|
|
167
|
+
/**
|
|
168
|
+
* Whether git's `install_branch_config_multiple_remotes` sets `branch.<name>.rebase` for an
|
|
169
|
+
* upstream on `remote` (undefined: a local branch), as `branch.autoSetupRebase` says.
|
|
170
|
+
*/
|
|
171
|
+
export declare function autoSetupRebase(workingCopy: WorkingCopy, remote: string | undefined): boolean;
|
|
172
|
+
/**
|
|
173
|
+
* What git prints once it wrote a {@link TrackingPlan} (`BRANCH_CONFIG_VERBOSE`):
|
|
174
|
+
* `branch '<b>' set up to track '<remote>/<branch>'.` (`... by rebasing.`), the local
|
|
175
|
+
* branch's name alone for `remote = .` set up by `--track`, `./<branch>` for one inherited,
|
|
176
|
+
* one line per upstream after `branch '<b>' set up to track:` for several.
|
|
87
177
|
*/
|
|
88
|
-
export declare function
|
|
178
|
+
export declare function trackingMessage(newBranch: string, plan: TrackingPlan): string[];
|
|
89
179
|
/**
|
|
90
|
-
*
|
|
91
|
-
* `
|
|
92
|
-
*
|
|
93
|
-
* `branch.autoSetupMerge` say. The configuration is saved.
|
|
180
|
+
* Write a {@link TrackingPlan} as `branch.<newBranch>.*` and save the configuration, as
|
|
181
|
+
* git's `install_branch_config_multiple_remotes`: `.remote` set, every `.merge` replaced,
|
|
182
|
+
* `.rebase = true` when rebasing.
|
|
94
183
|
*
|
|
95
|
-
* @returns
|
|
184
|
+
* @returns what git prints (see {@link trackingMessage})
|
|
96
185
|
*/
|
|
97
|
-
export declare function
|
|
186
|
+
export declare function installTracking(workingCopy: WorkingCopy, newBranch: string, plan: TrackingPlan): Promise<string[]>;
|
|
98
187
|
//# sourceMappingURL=branch-tracking.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"branch-tracking.d.ts","sourceRoot":"","sources":["../../src/commands/branch-tracking.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"branch-tracking.d.ts","sourceRoot":"","sources":["../../src/commands/branch-tracking.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAiB,KAAK,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAGjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAEjE,OAAO,EAAE,oBAAoB,EAAoB,MAAM,oBAAoB,CAAC;AAG5E;;;GAGG;AACH,oBAAY,SAAS;IACnB,uGAAuG;IACvG,OAAO,YAAY;IACnB,kGAAkG;IAClG,MAAM,WAAW;IACjB,kFAAkF;IAClF,OAAO,YAAY;IACnB,wEAAwE;IACxE,IAAI,SAAS;CACd;AA6DD;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAYpF;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAGrF;AAED,6CAA6C;AAC7C,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,+FAA+F;IAC/F,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC;CAC5B;AAED;;;;;GAKG;AACH,wBAAsB,kBAAkB,CACtC,WAAW,EAAE,WAAW,EACxB,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,iBAAiB,CAAC,CAe5B;AAED,8EAA8E;AAC9E,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,WA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EAAE,WAAW,EACxB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,YAAY,GACjB,OAAO,CAAC,MAAM,EAAE,CAAC,CAUnB"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `git branch --set-upstream-to` and `git branch --unset-upstream` (builtin/branch.c): the
|
|
3
|
+
* `branch.<name>.remote` / `.merge` configuration of an existing branch.
|
|
4
|
+
*/
|
|
5
|
+
import { GitCommand } from "../git-command.js";
|
|
6
|
+
/**
|
|
7
|
+
* The branch a set/unset-upstream names (cmd_branch's `branch_get`): the one checked out
|
|
8
|
+
* when none is given or it is `HEAD`, else the name as `copy_branchname` interprets it.
|
|
9
|
+
*/
|
|
10
|
+
declare abstract class BranchUpstreamBase<T> extends GitCommand<T> {
|
|
11
|
+
protected branch?: string;
|
|
12
|
+
/**
|
|
13
|
+
* The branch to change (default: the one checked out). `HEAD` names the current branch,
|
|
14
|
+
* `@{-1}` the previous one.
|
|
15
|
+
*/
|
|
16
|
+
setBranch(branch: string): this;
|
|
17
|
+
/**
|
|
18
|
+
* The branch's short name, or undefined on a detached HEAD (git's `branch_get(NULL)`).
|
|
19
|
+
*/
|
|
20
|
+
protected branchName(): Promise<string | undefined>;
|
|
21
|
+
/** git's `branch_checked_out`: whether some worktree (this one at least) has it. */
|
|
22
|
+
protected checkedOut(name: string): Promise<boolean>;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Set the upstream of a branch.
|
|
26
|
+
*
|
|
27
|
+
* Equivalent to `git branch --set-upstream-to=<upstream> [<branch>]`: the upstream must be a
|
|
28
|
+
* branch (a remote-tracking branch some remote fetches into, or a local branch, tracked with
|
|
29
|
+
* `remote = .`); `branch.autoSetupRebase` adds `branch.<name>.rebase = true`. git's message
|
|
30
|
+
* (`branch 'main' set up to track 'origin/main'.`) is in {@link getOutput}, its warning for a
|
|
31
|
+
* branch set as its own upstream in {@link getWarnings}.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```typescript
|
|
35
|
+
* const command = git.branchSetUpstream().setUpstream("origin/main");
|
|
36
|
+
* await command.call();
|
|
37
|
+
* command.getOutput(); // ["branch 'main' set up to track 'origin/main'."]
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export declare class SetUpstreamBranchCommand extends BranchUpstreamBase<void> {
|
|
41
|
+
private upstream?;
|
|
42
|
+
private quiet;
|
|
43
|
+
private readonly output;
|
|
44
|
+
private readonly warnings;
|
|
45
|
+
/** The upstream: a branch name (`origin/main`, `main`, `refs/remotes/origin/main`). */
|
|
46
|
+
setUpstream(upstream: string): this;
|
|
47
|
+
/** git's `-q`: no "set up to track" message. */
|
|
48
|
+
setQuiet(quiet: boolean): this;
|
|
49
|
+
/** What git printed on stdout, line by line. Read after {@link call}. */
|
|
50
|
+
getOutput(): string[];
|
|
51
|
+
/** What git printed on stderr (its warnings), line by line. Read after {@link call}. */
|
|
52
|
+
getWarnings(): string[];
|
|
53
|
+
/**
|
|
54
|
+
* @throws GitApiError with git's `fatal:` lines: a detached HEAD, a branch that does not
|
|
55
|
+
* exist, an upstream that names nothing or no branch, ambiguous remotes
|
|
56
|
+
*/
|
|
57
|
+
call(): Promise<void>;
|
|
58
|
+
/**
|
|
59
|
+
* git 2.5x's `die_if_upstream_looks_like_remote`: `--set-upstream-to origin topic` meant
|
|
60
|
+
* `origin/topic` when `origin` is a remote and `refs/remotes/origin/topic` exists.
|
|
61
|
+
*/
|
|
62
|
+
private refuseRemoteSlip;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Remove the upstream of a branch.
|
|
66
|
+
*
|
|
67
|
+
* Equivalent to `git branch --unset-upstream [<branch>]`: `branch.<name>.remote` and
|
|
68
|
+
* `branch.<name>.merge` are removed (`.rebase` stays, as git leaves it); a branch without
|
|
69
|
+
* both is refused (`fatal: branch '<b>' has no upstream information`).
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```typescript
|
|
73
|
+
* await git.branchUnsetUpstream().setBranch("topic").call();
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
export declare class UnsetUpstreamBranchCommand extends BranchUpstreamBase<void> {
|
|
77
|
+
/**
|
|
78
|
+
* @throws GitApiError with git's `fatal:` line: a detached HEAD, no upstream configured
|
|
79
|
+
*/
|
|
80
|
+
call(): Promise<void>;
|
|
81
|
+
}
|
|
82
|
+
export {};
|
|
83
|
+
//# sourceMappingURL=branch-upstream-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"branch-upstream-command.d.ts","sourceRoot":"","sources":["../../src/commands/branch-upstream-command.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAY/C;;;GAGG;AACH,uBAAe,kBAAkB,CAAC,CAAC,CAAE,SAAQ,UAAU,CAAC,CAAC,CAAC;IACxD,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAE1B;;;OAGG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAI9B;IAED;;OAEG;IACH,UAAgB,UAAU,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAMxD;IAED,oFAAoF;IACpF,UAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAKzD;CACF;AAED;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,wBAAyB,SAAQ,kBAAkB,CAAC,IAAI,CAAC;IACpE,OAAO,CAAC,QAAQ,CAAC,CAAS;IAC1B,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgB;IACvC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAgB;IAEzC,uFAAuF;IACvF,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAIlC;IAED,gDAAgD;IAChD,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAI7B;IAED,yEAAyE;IACzE,SAAS,IAAI,MAAM,EAAE,CAEpB;IAED,wFAAwF;IACxF,WAAW,IAAI,MAAM,EAAE,CAEtB;IAED;;;OAGG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAkD1B;IAED;;;OAGG;YACW,gBAAgB;CAe/B;AAED;;;;;;;;;;;GAWG;AACH,qBAAa,0BAA2B,SAAQ,kBAAkB,CAAC,IAAI,CAAC;IACtE;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAoB1B;CACF"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `git check-mailmap` (builtin/check-mailmap.c): each contact as the repository's mailmap
|
|
3
|
+
* maps it (`.mailmap`, `mailmap.blob`, `mailmap.file`, plus `--mailmap-blob` and
|
|
4
|
+
* `--mailmap-file`).
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* // git check-mailmap "nick1 <bugs@company.xx>"
|
|
9
|
+
* await git.checkMailmap().addContact("nick1 <bugs@company.xx>").call();
|
|
10
|
+
* // "Some Dude <some@dude.xx>\n"
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
import { GitCommand } from "../git-command.js";
|
|
14
|
+
/**
|
|
15
|
+
* The contacts of `git check-mailmap <contact>...` (and `--stdin`'s lines after them), one
|
|
16
|
+
* output line each: `Name <email>`, or `<email>` when the result has no name.
|
|
17
|
+
*
|
|
18
|
+
* git 2.43 (`setCompatibility("2.43")`) takes only `Name <email>` contacts (`fatal: unable
|
|
19
|
+
* to parse contact: <contact>`) and has no `--mailmap-file`/`--mailmap-blob`; 2.47 and later
|
|
20
|
+
* also map a bare address. Where git dies, the error carries what was printed before
|
|
21
|
+
* ({@link getOutput}).
|
|
22
|
+
*/
|
|
23
|
+
export declare class CheckMailmapCommand extends GitCommand<string> {
|
|
24
|
+
private readonly contacts;
|
|
25
|
+
private stdin?;
|
|
26
|
+
private mailmapFile?;
|
|
27
|
+
private mailmapBlob?;
|
|
28
|
+
private compatibility;
|
|
29
|
+
private output;
|
|
30
|
+
private readonly errors;
|
|
31
|
+
/** A contact argument. */
|
|
32
|
+
addContact(contact: string): this;
|
|
33
|
+
/** `--stdin`: these lines (git's stdin) checked after the arguments. */
|
|
34
|
+
setStdin(text: string): this;
|
|
35
|
+
/** `--mailmap-file=<file>` (git 2.47+): more entries from this host file. */
|
|
36
|
+
setMailmapFile(path: string): this;
|
|
37
|
+
/** `--mailmap-blob=<blob>` (git 2.47+): more entries from this blob. */
|
|
38
|
+
setMailmapBlob(name: string): this;
|
|
39
|
+
/** The git version whose behaviour to follow (default 2.56). */
|
|
40
|
+
setCompatibility(version: "2.43" | "2.56"): this;
|
|
41
|
+
/** What was printed on stdout (also after a death). */
|
|
42
|
+
getOutput(): string;
|
|
43
|
+
/** git's `error:` lines (a mailmap blob that is no blob). */
|
|
44
|
+
getErrors(): string[];
|
|
45
|
+
/** The output. */
|
|
46
|
+
call(): Promise<string>;
|
|
47
|
+
private check;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=check-mailmap-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-mailmap-command.d.ts","sourceRoot":"","sources":["../../src/commands/check-mailmap-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAK/C;;;;;;;;GAQG;AACH,qBAAa,mBAAoB,SAAQ,UAAU,CAAC,MAAM,CAAC;IACzD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAgB;IACzC,OAAO,CAAC,KAAK,CAAC,CAAS;IACvB,OAAO,CAAC,WAAW,CAAC,CAAS;IAC7B,OAAO,CAAC,WAAW,CAAC,CAAS;IAC7B,OAAO,CAAC,aAAa,CAA2B;IAChD,OAAO,CAAC,MAAM,CAAM;IACpB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgB;IAEvC,0BAA0B;IAC1B,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAIhC;IAED,wEAAwE;IACxE,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAI3B;IAED,6EAA6E;IAC7E,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAIjC;IAED,wEAAwE;IACxE,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAIjC;IAED,gEAAgE;IAChE,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI/C;IAED,uDAAuD;IACvD,SAAS,IAAI,MAAM,CAElB;IAED,6DAA6D;IAC7D,SAAS,IAAI,MAAM,EAAE,CAEpB;IAED,kBAAkB;IACZ,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CAiC5B;IAED,OAAO,CAAC,KAAK;CASd"}
|