@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
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `git config` as a library command (builtin/config.c): `get`, `set`, `--add`, `unset`,
|
|
3
|
+
* `--replace-all` / `--unset-all` with value patterns, `rename-section` and
|
|
4
|
+
* `remove-section`, on the repository's file or on one scope's.
|
|
5
|
+
*
|
|
6
|
+
* ```typescript
|
|
7
|
+
* await git.config().set("core.editor", "vim").call();
|
|
8
|
+
* await git.config().add("remote.origin.fetch", "+refs/tags/*:refs/tags/*").call();
|
|
9
|
+
* await git.config().unset("remote.origin.fetch").setValuePattern("tags").call();
|
|
10
|
+
* await git.config().setScope("global").set("user.name", "A U Thor").call();
|
|
11
|
+
* await git.config().renameSection("remote.origin", "remote.upstream").call();
|
|
12
|
+
* const { stdout, exitCode } = await git.config().get("core.bare").call(); // "false\n", 0
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* Writes edit the scope's file as git does (`setConfigMultivarInFile`,
|
|
16
|
+
* `renameConfigSectionInFile` of vcs-store-files: under `<file>.lock`, comments, includes and
|
|
17
|
+
* other sections kept byte for byte), and give git's exit status and stderr: 5 for a key to
|
|
18
|
+
* unset that is not there or several values without `setAll`, 1 or 2 for an invalid key, 6
|
|
19
|
+
* for an invalid pattern, 3 for a file whose header git cannot name, 255 for a lock held,
|
|
20
|
+
* 128 where git dies (`no such section`, a bad config line).
|
|
21
|
+
*
|
|
22
|
+
* Reads follow `git config --get`, `--get-all`, `--get-regexp`, `--get-urlmatch`, `--list`,
|
|
23
|
+
* `--get-color` and `--get-colorbool` (and 2.46's `get [--all] [--regexp] [--url=<url>]` and
|
|
24
|
+
* `list`): values canonicalised by {@link ConfigCommand.setType} as builtin/config.c's
|
|
25
|
+
* `format_config` (`--type=bool|int|bool-or-int|bool-or-str|path|expiry-date|color`; `set`
|
|
26
|
+
* writes them as `normalize_value`), `--default`, `--show-origin`, `--show-scope`,
|
|
27
|
+
* `--name-only`, `--show-names`, `-z`, and `--blob=<rev>:<path>`.
|
|
28
|
+
*
|
|
29
|
+
* ```typescript
|
|
30
|
+
* const { stdout } = await git.config().list().setShowOrigin(true).call(); // "file:.git/config\tcore.bare=false\n"
|
|
31
|
+
* await git.config().get("pack.window").setType("int").call(); // "1024\n" for `1k`
|
|
32
|
+
* await git.config().getUrlmatch("http", "https://example.com/repo").call(); // "http.sslverify false\n"
|
|
33
|
+
* await git.config().getRegexp("^remote\\.").setBlob("HEAD:shared.config").call();
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
import { GitCommand } from "../git-command.js";
|
|
37
|
+
import { type ConfigValueType } from "./config-value-types.js";
|
|
38
|
+
/** The file `git config` reads or writes: `--local`, `--worktree`, `--global`, `--system`. */
|
|
39
|
+
export type ConfigCommandScope = "local" | "worktree" | "global" | "system";
|
|
40
|
+
/** What {@link ConfigCommand} did. */
|
|
41
|
+
export interface ConfigCommandResult {
|
|
42
|
+
/** git's exit status */
|
|
43
|
+
exitCode: number;
|
|
44
|
+
/** git's stdout: the values `get` prints, one per line */
|
|
45
|
+
stdout: string;
|
|
46
|
+
/** git's stderr: its `warning:`, `error:` and `fatal:` lines */
|
|
47
|
+
stderr: string;
|
|
48
|
+
/** The values `get` found, in order (undefined for a variable without `=`) */
|
|
49
|
+
values?: (string | undefined)[];
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* `git config` on one key or section (see the module comment).
|
|
53
|
+
*
|
|
54
|
+
* The action is one of {@link get}, {@link set}, {@link add}, {@link unset},
|
|
55
|
+
* {@link renameSection}, {@link removeSection}. Without {@link setScope} or {@link setFile}
|
|
56
|
+
* writes go to the repository's `config` and `get` reads the whole configuration (system,
|
|
57
|
+
* global, the repository's, `config.worktree`, the command line, includes followed); with one,
|
|
58
|
+
* only that file is read, its includes not followed, as git does.
|
|
59
|
+
*
|
|
60
|
+
* git's two syntaxes differ only in their messages and refusals: the legacy one (`git config
|
|
61
|
+
* <key> <value> [<value-pattern>]`, `--add`, `--replace-all`, `--unset[-all]`,
|
|
62
|
+
* `--rename-section`, `--remove-section`, `--get[-all]`) with {@link setLegacySyntax}, else
|
|
63
|
+
* git 2.46's subcommands (`git config set [--all] [--value=<pattern>] [--append]`,
|
|
64
|
+
* `unset`, `get`, `rename-section`, `remove-section`).
|
|
65
|
+
*/
|
|
66
|
+
export declare class ConfigCommand extends GitCommand<ConfigCommandResult> {
|
|
67
|
+
/** git's command reads no core settings: an unparsable `core.whitespace` does not stop it */
|
|
68
|
+
protected readsCoreConfig(): boolean;
|
|
69
|
+
private action?;
|
|
70
|
+
private scope?;
|
|
71
|
+
private file?;
|
|
72
|
+
private all;
|
|
73
|
+
private valuePattern?;
|
|
74
|
+
private fixedValue;
|
|
75
|
+
private comment?;
|
|
76
|
+
private defaultValue?;
|
|
77
|
+
private legacy;
|
|
78
|
+
private type?;
|
|
79
|
+
private blob?;
|
|
80
|
+
private includes?;
|
|
81
|
+
private showOrigin;
|
|
82
|
+
private showScope;
|
|
83
|
+
private nameOnly;
|
|
84
|
+
private showNames;
|
|
85
|
+
private nullTerminated;
|
|
86
|
+
private compatibility;
|
|
87
|
+
private dumbTerminal;
|
|
88
|
+
/** git's warnings of a read (a file it cannot open), printed before the values */
|
|
89
|
+
private warnings;
|
|
90
|
+
/** `get <key>` / `--get <key>` (`--get-all` with {@link setAll}). */
|
|
91
|
+
get(key: string): this;
|
|
92
|
+
/**
|
|
93
|
+
* `set <key> <value>` / `<key> <value>`: the key's value replaced (`--all` /
|
|
94
|
+
* `--replace-all` with {@link setAll}; only values matching {@link setValuePattern}).
|
|
95
|
+
*/
|
|
96
|
+
set(key: string, value: string): this;
|
|
97
|
+
/** `set --append <key> <value>` / `--add <key> <value>`: a new line, the old ones kept. */
|
|
98
|
+
add(key: string, value: string): this;
|
|
99
|
+
/** `unset <key>` / `--unset <key>` (`--all` / `--unset-all` with {@link setAll}). */
|
|
100
|
+
unset(key: string): this;
|
|
101
|
+
/** `rename-section <old> <new>` / `--rename-section`: `old` as written in its headers. */
|
|
102
|
+
renameSection(from: string, to: string): this;
|
|
103
|
+
/** `remove-section <name>` / `--remove-section`: every section of that name, whole. */
|
|
104
|
+
removeSection(name: string): this;
|
|
105
|
+
/** `--local`, `--worktree`, `--global`, `--system`: the file read or written. */
|
|
106
|
+
setScope(scope: ConfigCommandScope | undefined): this;
|
|
107
|
+
/**
|
|
108
|
+
* `--get-regexp <pattern>` / `get --regexp <pattern>`: the keys matching a POSIX extended
|
|
109
|
+
* regex (its section and last part lowered, as git does). The legacy syntax prints every
|
|
110
|
+
* value with its key; the subcommand only the last value unless {@link setAll}, with its
|
|
111
|
+
* key under {@link setShowNames}.
|
|
112
|
+
*/
|
|
113
|
+
getRegexp(pattern: string): this;
|
|
114
|
+
/**
|
|
115
|
+
* `--get-urlmatch <name> <url>` / `get --url=<url> <name>`: the value of `<section>.<key>`
|
|
116
|
+
* (or, for a bare section, of each of its keys with the key) that best matches the URL
|
|
117
|
+
* among `<section>.<url-pattern>.<key>` entries (urlmatch.c).
|
|
118
|
+
*/
|
|
119
|
+
getUrlmatch(name: string, url: string): this;
|
|
120
|
+
/** `--list` / `list`: every value, `key=value` per line. */
|
|
121
|
+
list(): this;
|
|
122
|
+
/**
|
|
123
|
+
* `--get-color <slot> [<default>]`: the escape sequence of the color the slot is set to
|
|
124
|
+
* (the default's when unset), with no newline.
|
|
125
|
+
*/
|
|
126
|
+
getColor(slot: string, defaultColor?: string): this;
|
|
127
|
+
/**
|
|
128
|
+
* `--get-colorbool <slot> [<stdout-is-tty>]`: whether color is wanted for the slot (falling
|
|
129
|
+
* back to `diff.color` for `color.diff`, then `color.ui`). With `stdoutIsTty` (a boolean as
|
|
130
|
+
* git reads it) git prints `true`/`false`; without, the exit status tells (stdout is no
|
|
131
|
+
* terminal here). `auto` needs a terminal that is not dumb ({@link setDumbTerminal}).
|
|
132
|
+
*/
|
|
133
|
+
getColorBool(slot: string, stdoutIsTty?: string): this;
|
|
134
|
+
/**
|
|
135
|
+
* `--type=<type>` (`--bool`, `--int`, `--bool-or-int`, `--bool-or-str`, `--path`,
|
|
136
|
+
* `--expiry-date`, `--type=color`): values printed canonical, and written canonical by
|
|
137
|
+
* `set`/`add`. A name git does not know is refused when the command runs (git's
|
|
138
|
+
* `unrecognized --type argument`).
|
|
139
|
+
*/
|
|
140
|
+
setType(type: ConfigValueType | string | undefined): this;
|
|
141
|
+
/** `--blob=<blob-ish>`: read the configuration from a blob (`HEAD:shared.config`). */
|
|
142
|
+
setBlob(blob: string | undefined): this;
|
|
143
|
+
/**
|
|
144
|
+
* `--includes` / `--no-includes` for a file read with {@link setScope} or {@link setFile}
|
|
145
|
+
* (default off there, as git; the whole configuration always follows them).
|
|
146
|
+
*/
|
|
147
|
+
setIncludes(includes: boolean | undefined): this;
|
|
148
|
+
/** `--show-origin`: each value after `file:<name>`, `blob:<name>` or `command line:`. */
|
|
149
|
+
setShowOrigin(show: boolean): this;
|
|
150
|
+
/** `--show-scope`: each value after its scope (`local`, `global`, `command`, ...). */
|
|
151
|
+
setShowScope(show: boolean): this;
|
|
152
|
+
/** `--name-only`: keys without their values (`--list`, `--get-regexp`). */
|
|
153
|
+
setNameOnly(nameOnly: boolean): this;
|
|
154
|
+
/** `--show-names` (2.46's `get`): each value after its key. */
|
|
155
|
+
setShowNames(show: boolean): this;
|
|
156
|
+
/** `-z` / `--null`: values end with NUL, a key and its value separated by a newline. */
|
|
157
|
+
setNullTerminated(nul: boolean): this;
|
|
158
|
+
/**
|
|
159
|
+
* The git version whose behaviour applies where they differ (default 2.56): 2.43's `--list`
|
|
160
|
+
* ignores `--type`, knows no `:(optional)` paths nor `#rgb` colors, and dies on a
|
|
161
|
+
* `--get-color` default it cannot parse (2.5x: an error, exit 255).
|
|
162
|
+
*/
|
|
163
|
+
setCompatibility(version: "2.43" | "2.56"): this;
|
|
164
|
+
/** Whether the terminal is dumb (`TERM` unset or `dumb`): `--get-colorbool`'s `auto`. */
|
|
165
|
+
setDumbTerminal(dumb: boolean): this;
|
|
166
|
+
/**
|
|
167
|
+
* `--file <path>`: an absolute host path (written through the host environment's
|
|
168
|
+
* `hostFilesOf`), or a path relative to the worktree top.
|
|
169
|
+
*/
|
|
170
|
+
setFile(path: string | undefined): this;
|
|
171
|
+
/** `--all` (`--get-all`, `--replace-all`, `--unset-all`): every value matching. */
|
|
172
|
+
setAll(all: boolean): this;
|
|
173
|
+
/**
|
|
174
|
+
* `--value=<pattern>` / the legacy positional `<value-pattern>`: only the values matching it
|
|
175
|
+
* (a POSIX extended regex, `!` first to invert, or the string with {@link setFixedValue}).
|
|
176
|
+
*/
|
|
177
|
+
setValuePattern(pattern: string | undefined): this;
|
|
178
|
+
/** `--fixed-value`: the value pattern is compared as a string. */
|
|
179
|
+
setFixedValue(fixed: boolean): this;
|
|
180
|
+
/** `--comment <text>`: written after the value set or added. */
|
|
181
|
+
setComment(comment: string | undefined): this;
|
|
182
|
+
/** `--default <value>`: what `get` prints when the key has no value. */
|
|
183
|
+
setDefault(value: string | undefined): this;
|
|
184
|
+
/** git's legacy option syntax (`--add`, `--unset-all`, ...): its messages and refusals. */
|
|
185
|
+
setLegacySyntax(legacy: boolean): this;
|
|
186
|
+
private setAction;
|
|
187
|
+
call(): Promise<ConfigCommandResult>;
|
|
188
|
+
private run;
|
|
189
|
+
/** builtin/config.c's `normalize_value` of a value to write, or git's death. */
|
|
190
|
+
private normalized;
|
|
191
|
+
/** The option checks git makes before it reads or writes anything. */
|
|
192
|
+
private checkOptions;
|
|
193
|
+
/** The display options as builtin/config.c's `display_options_init` sets them. */
|
|
194
|
+
private display;
|
|
195
|
+
/** What a value's formatting needs from the host. */
|
|
196
|
+
private valueContext;
|
|
197
|
+
/**
|
|
198
|
+
* builtin/config.c's `format_config`: scope, origin, key and the value as typed, ended
|
|
199
|
+
* with the terminator; a death of git's thrown as a {@link Refusal}.
|
|
200
|
+
*/
|
|
201
|
+
private format;
|
|
202
|
+
/**
|
|
203
|
+
* A value that failed to format while git read the configuration: the read stops with git's
|
|
204
|
+
* `bad config line` (or the command line's) death after the formatter's error.
|
|
205
|
+
*/
|
|
206
|
+
private configReadDeath;
|
|
207
|
+
/** `get` / `--get[-all]` / `--get-regexp`: builtin/config.c's `get_value`. */
|
|
208
|
+
private runGet;
|
|
209
|
+
/** `list` / `--list`: builtin/config.c's `show_all_config` over the whole read. */
|
|
210
|
+
private runList;
|
|
211
|
+
/** `--get-urlmatch` / `get --url=`: builtin/config.c's `get_urlmatch`. */
|
|
212
|
+
private runUrlmatch;
|
|
213
|
+
/** `--get-color`: builtin/config.c's `get_color`. */
|
|
214
|
+
private runGetColor;
|
|
215
|
+
/** `--get-colorbool`: builtin/config.c's `get_colorbool`. */
|
|
216
|
+
private runGetColorBool;
|
|
217
|
+
/**
|
|
218
|
+
* The entries read, in git's order: of the blob, of the scope's file or `--file`, or of the
|
|
219
|
+
* whole configuration. A source `list` cannot read is git's death there; `get` reads it as
|
|
220
|
+
* empty.
|
|
221
|
+
*/
|
|
222
|
+
private readEntries;
|
|
223
|
+
/** `--blob=<blob-ish>`: git's `git_config_from_blob_ref`. */
|
|
224
|
+
private readBlobEntries;
|
|
225
|
+
/** A blob's bytes. */
|
|
226
|
+
private readBlob;
|
|
227
|
+
/** The working copy's configuration, read again after a write (git's `repo_config_clear`). */
|
|
228
|
+
private reloadConfig;
|
|
229
|
+
/** git's `location_options_init`: the file the scope names. */
|
|
230
|
+
private location;
|
|
231
|
+
/** The repository's configuration, which must be backed by files to be edited. */
|
|
232
|
+
private repositoryConfig;
|
|
233
|
+
/** `--file <path>`: a host path, or one relative to the worktree top. */
|
|
234
|
+
private fileLocation;
|
|
235
|
+
}
|
|
236
|
+
//# sourceMappingURL=config-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-command.d.ts","sourceRoot":"","sources":["../../src/commands/config-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;A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tE,OAAO,CAAC,YAAY;IAuGpB,kFAAkF;IAClF,OAAO,CAAC,OAAO;IAUf,qDAAqD;IACrD,OAAO,CAAC,YAAY;IAyBpB;;;OAGG;YACW,MAAM;IA0CpB;;;OAGG;IACH,OAAO,CAAC,eAAe;IAYvB,8EAA8E;YAChE,MAAM;IAyFpB,mFAAmF;YACrE,OAAO;IAoBrB,0EAA0E;YAC5D,WAAW;IA0BzB,qDAAqD;YACvC,WAAW;IAuCzB,6DAA6D;YAC/C,eAAe;IAgC7B;;;;OAIG;YACW,WAAW;IA2FzB,6DAA6D;YAC/C,eAAe;IAgD7B,sBAAsB;YACR,QAAQ;IAkBtB,8FAA8F;YAChF,YAAY;IAK1B,+DAA+D;YACjD,QAAQ;IAmCtB,kFAAkF;IAClF,OAAO,CAAC,gBAAgB;IAQxB,yEAAyE;YAC3D,YAAY;CAa3B"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `git config --type=<type>` (builtin/config.c `format_config`, `normalize_value`): a config
|
|
3
|
+
* value canonicalised as git prints it on `get` and writes it on `set`.
|
|
4
|
+
*
|
|
5
|
+
* ```typescript
|
|
6
|
+
* await formatConfigValue("int", "pack.window", "1k", source, context); // { ok: "1024" }
|
|
7
|
+
* await formatConfigValue("bool", "core.bare", "yes", source, context); // { ok: "true" }
|
|
8
|
+
* await formatConfigValue("color", "color.diff.old", "red", source, context); // { ok: "\x1b[31m" }
|
|
9
|
+
* normalizeConfigValue("bool-or-int", "x.y", "on"); // "true"
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* Where git dies (`bad numeric config value`, `bad boolean config value`) a
|
|
13
|
+
* {@link ConfigValueDeath} is thrown carrying git's lines; where git's formatter returns an
|
|
14
|
+
* error after printing its `error:` line (a path without a value, a date or color it cannot
|
|
15
|
+
* parse), the result is `{ error: [lines] }`; `{ skip: true }` is a value git treats as absent
|
|
16
|
+
* (`:(optional)` naming a missing file, 2.5x). The gentle mode (`git config list --type`,
|
|
17
|
+
* 2.5x) drops values that do not canonicalise without a word, except git's `error:` lines
|
|
18
|
+
* for a path without a value.
|
|
19
|
+
*
|
|
20
|
+
* @module
|
|
21
|
+
*/
|
|
22
|
+
/** git's `--type` values (`--bool`, `--int`, ... are the same types). */
|
|
23
|
+
export type ConfigValueType = "bool" | "int" | "bool-or-int" | "bool-or-str" | "path" | "expiry-date" | "color";
|
|
24
|
+
/** The types `--type=<type>` names. */
|
|
25
|
+
export declare const CONFIG_VALUE_TYPES: readonly ConfigValueType[];
|
|
26
|
+
/** Where a value was read (git's `key_value_info`), for git's messages. */
|
|
27
|
+
export interface ConfigValueSource {
|
|
28
|
+
/** git's origin type: a file, a blob, the command line (`-c`, `--default`) */
|
|
29
|
+
origin: "file" | "blob" | "command line" | "standard input" | "";
|
|
30
|
+
/** The file or blob as git names it; empty for the command line */
|
|
31
|
+
name: string;
|
|
32
|
+
}
|
|
33
|
+
/** What a value needs from its surroundings. */
|
|
34
|
+
export interface ConfigValueContext {
|
|
35
|
+
/** git's version where the types differ (`:(optional)`, `#rgb` colors: 2.5x) */
|
|
36
|
+
compatibility: "2.43" | "2.56";
|
|
37
|
+
/** `$HOME` for `~/` (undefined: git's "failed to expand user dir") */
|
|
38
|
+
home: string | undefined;
|
|
39
|
+
/** `~user`'s home directory, when the host can tell */
|
|
40
|
+
userHome?: (name: string) => Promise<string | undefined>;
|
|
41
|
+
/** Whether a path names nothing (git's `is_missing_file`), for `:(optional)` */
|
|
42
|
+
isMissing?: (path: string) => Promise<boolean>;
|
|
43
|
+
/** The current time in seconds, for relative expiry dates */
|
|
44
|
+
now: number;
|
|
45
|
+
}
|
|
46
|
+
/** git died: its exit status 128 and its lines. */
|
|
47
|
+
export declare class ConfigValueDeath extends Error {
|
|
48
|
+
readonly lines: string[];
|
|
49
|
+
readonly exitCode = 128;
|
|
50
|
+
constructor(lines: string[]);
|
|
51
|
+
}
|
|
52
|
+
/** A value as git formats it. */
|
|
53
|
+
export type FormattedConfigValue = {
|
|
54
|
+
ok: string;
|
|
55
|
+
} | {
|
|
56
|
+
skip: true;
|
|
57
|
+
} | {
|
|
58
|
+
error: string[];
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* git's `git_parse_signed`: strtoimax (leading whitespace, sign, base 0) and a `k`/`m`/`g`
|
|
62
|
+
* unit; the reason git refuses a value otherwise (errno: `invalid unit` or `out of range`).
|
|
63
|
+
*/
|
|
64
|
+
export declare function parseGitSigned(value: string | undefined, max?: bigint): {
|
|
65
|
+
value: bigint;
|
|
66
|
+
} | {
|
|
67
|
+
reason: "invalid unit" | "out of range";
|
|
68
|
+
};
|
|
69
|
+
/** git's `git_parse_maybe_bool`: the text spellings, else an `int`; -1 when neither. */
|
|
70
|
+
export declare function gitParseMaybeBool(value: string | undefined): number;
|
|
71
|
+
/** git's `git_config_bool`: true/false, or git's death. */
|
|
72
|
+
export declare function gitConfigBool(key: string, value: string | undefined): boolean;
|
|
73
|
+
/** color.c's `color_parse`: the escape sequence, undefined when git cannot parse it. */
|
|
74
|
+
export declare function parseGitColor(value: string, compatibility?: "2.43" | "2.56"): string | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* builtin/config.c's `format_config` of one value (without the key, origin and scope git
|
|
77
|
+
* prints before it). `gently` is 2.5x's `list --type`.
|
|
78
|
+
*
|
|
79
|
+
* @throws ConfigValueDeath where git dies
|
|
80
|
+
*/
|
|
81
|
+
export declare function formatConfigValue(type: ConfigValueType, key: string, value: string | undefined, source: ConfigValueSource, context: ConfigValueContext, gently?: boolean): Promise<FormattedConfigValue>;
|
|
82
|
+
/**
|
|
83
|
+
* builtin/config.c's `normalize_value`: the value `set` writes under `--type` (paths and
|
|
84
|
+
* dates as given; a color checked but written as given).
|
|
85
|
+
*
|
|
86
|
+
* @throws ConfigValueDeath where git dies
|
|
87
|
+
*/
|
|
88
|
+
export declare function normalizeConfigValue(type: ConfigValueType | undefined, key: string, value: string, compatibility?: "2.43" | "2.56"): string;
|
|
89
|
+
/** color.c's `git_config_colorbool`: never, always, auto, or (from a boolean) never/auto. */
|
|
90
|
+
export declare function gitConfigColorBool(key: string, value: string | undefined): "never" | "always" | "auto";
|
|
91
|
+
//# sourceMappingURL=config-value-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-value-types.d.ts","sourceRoot":"","sources":["../../src/commands/config-value-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAKH,yEAAyE;AACzE,MAAM,MAAM,eAAe,GACvB,MAAM,GACN,KAAK,GACL,aAAa,GACb,aAAa,GACb,MAAM,GACN,aAAa,GACb,OAAO,CAAC;AAEZ,uCAAuC;AACvC,eAAO,MAAM,kBAAkB,EAAE,SAAS,eAAe,EAQxD,CAAC;AAEF,2EAA2E;AAC3E,MAAM,WAAW,iBAAiB;IAChC,8EAA8E;IAC9E,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,cAAc,GAAG,gBAAgB,GAAG,EAAE,CAAC;IACjE,mEAAmE;IACnE,IAAI,EAAE,MAAM,CAAC;CACd;AAED,gDAAgD;AAChD,MAAM,WAAW,kBAAkB;IACjC,gFAAgF;IAChF,aAAa,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,sEAAsE;IACtE,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,uDAAuD;IACvD,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACzD,gFAAgF;IAChF,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/C,6DAA6D;IAC7D,GAAG,EAAE,MAAM,CAAC;CACb;AAED,mDAAmD;AACnD,qBAAa,gBAAiB,SAAQ,KAAK;IAE7B,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE;IADpC,QAAQ,CAAC,QAAQ,OAAO;IACxB,YAAqB,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,EAAE,MAAM,GAAG,SAAS,GACxB,OAAO,GAAG,QAAQ,GAAG,MAAM,CAQ7B"}
|
|
@@ -38,6 +38,26 @@ export declare function configLoadError(workingCopy: WorkingCopy): {
|
|
|
38
38
|
key: string;
|
|
39
39
|
message: string;
|
|
40
40
|
} | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* What git dies with reading `core.whitespace` in `git_default_core_config` (before the
|
|
43
|
+
* command does anything), else undefined: every value is parsed in the configuration's order,
|
|
44
|
+
* so a rule git cannot enforce (`fatal: cannot enforce both tab-in-indent and
|
|
45
|
+
* indent-with-non-tab`) or a variable without `=` (`error: missing value for
|
|
46
|
+
* 'core.whitespace'` and the `bad config variable` line) dies even when a later value
|
|
47
|
+
* replaces it. `git config`, `git remote` and `git ls-remote` read no core settings, and
|
|
48
|
+
* `git bisect` dies only in the checkout it runs.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```typescript
|
|
52
|
+
* // .git/config: [core] whitespace = tab-in-indent,indent-with-non-tab
|
|
53
|
+
* whitespaceConfigError(workingCopy)?.message;
|
|
54
|
+
* // "fatal: cannot enforce both tab-in-indent and indent-with-non-tab"
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
export declare function whitespaceConfigError(workingCopy: WorkingCopy): {
|
|
58
|
+
key: string;
|
|
59
|
+
message: string;
|
|
60
|
+
} | undefined;
|
|
41
61
|
/**
|
|
42
62
|
* `id` abbreviated as git prints it (`repo_find_unique_abbrev(id, DEFAULT_ABBREV)`): to
|
|
43
63
|
* `core.abbrev` digits (auto: from the approximate object count, at least 7), lengthened until
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-config.d.ts","sourceRoot":"","sources":["../../src/commands/core-config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAKL,KAAK,QAAQ,EAGd,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,iB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AC,CAEhC;AAED,6CAA6C;AAC7C,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,qFAAqF;AACrF,MAAM,WAAW,aAAa;IAC5B,mEAAmE;IACnE,UAAU,CAAC,EAAE,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1C,uDAAuD;IACvD,OAAO,CAAC,GAAG,EAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;CACtF;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,WAAW,EACxB,OAAO,GAAE,oBAAyB,GACjC,aAAa,CA+Bf"}
|
|
@@ -12,55 +12,53 @@ export interface DescribeResult {
|
|
|
12
12
|
readonly depth?: number;
|
|
13
13
|
/** Abbreviated commit hash */
|
|
14
14
|
readonly abbrevHash?: string;
|
|
15
|
+
/** One description per revision described, as git prints them */
|
|
16
|
+
readonly descriptions: string[];
|
|
17
|
+
/** What git prints on stderr (warnings, `--debug`) */
|
|
18
|
+
readonly stderr: string[];
|
|
19
|
+
}
|
|
20
|
+
/** `git describe`'s output. */
|
|
21
|
+
export interface DescribeText {
|
|
22
|
+
stdout: string;
|
|
23
|
+
stderr: string[];
|
|
15
24
|
}
|
|
16
25
|
/**
|
|
17
|
-
* Given a commit, show the most recent tag that is reachable from it
|
|
18
|
-
*
|
|
19
|
-
*
|
|
26
|
+
* Given a commit, show the most recent tag that is reachable from it: git describe
|
|
27
|
+
* (builtin/describe.c), `--contains` through name-rev, a blob by the first commit that
|
|
28
|
+
* brings it (`<description>:<path>`), `--dirty`/`--broken` marks of the worktree.
|
|
20
29
|
*
|
|
21
|
-
*
|
|
30
|
+
* {@link call} answers `description: undefined` where git dies for want of a tag;
|
|
31
|
+
* {@link callText} gives git's stdout and stderr and throws {@link DescribeError} where git
|
|
32
|
+
* dies.
|
|
22
33
|
*
|
|
23
34
|
* @example
|
|
24
35
|
* ```typescript
|
|
25
|
-
* //
|
|
26
|
-
* const desc = await git.describe().call();
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* const
|
|
30
|
-
* .setTarget(commitId)
|
|
31
|
-
* .call();
|
|
32
|
-
*
|
|
33
|
-
* // Use long format
|
|
34
|
-
* const desc = await git.describe()
|
|
35
|
-
* .setLong(true)
|
|
36
|
-
* .call();
|
|
37
|
-
*
|
|
38
|
-
* // Include lightweight tags
|
|
39
|
-
* const desc = await git.describe()
|
|
40
|
-
* .setTags(true)
|
|
41
|
-
* .call();
|
|
42
|
-
*
|
|
43
|
-
* // Always output something (fall back to commit hash)
|
|
44
|
-
* const desc = await git.describe()
|
|
45
|
-
* .setAlways(true)
|
|
46
|
-
* .call();
|
|
47
|
-
*
|
|
48
|
-
* // Match specific tag patterns
|
|
49
|
-
* const desc = await git.describe()
|
|
50
|
-
* .setMatch("v*")
|
|
51
|
-
* .call();
|
|
36
|
+
* const desc = await git.describe().call(); // HEAD
|
|
37
|
+
* const desc = await git.describe().setTags(true).call(); // lightweight tags too
|
|
38
|
+
* const { stdout } = await git.describe().setRevisions("HEAD~2", "v1.0").callText();
|
|
39
|
+
* const { stdout } = await git.describe().setDirty().callText(); // "v1.2-3-gabc1234-dirty"
|
|
40
|
+
* const { stdout } = await git.describe().setContains(true).callText(); // "v2.0~3"
|
|
52
41
|
* ```
|
|
53
42
|
*/
|
|
54
43
|
export declare class DescribeCommand extends GitCommand<DescribeResult> {
|
|
55
44
|
private target?;
|
|
45
|
+
private revisions;
|
|
56
46
|
private longFormat;
|
|
57
47
|
private useTags;
|
|
58
48
|
private useAll;
|
|
59
49
|
private always;
|
|
60
|
-
private abbrev
|
|
50
|
+
private abbrev?;
|
|
61
51
|
private matchPatterns;
|
|
62
52
|
private excludePatterns;
|
|
63
53
|
private maxCandidates;
|
|
54
|
+
private contains;
|
|
55
|
+
private firstParent;
|
|
56
|
+
private debug;
|
|
57
|
+
private dirty?;
|
|
58
|
+
private broken?;
|
|
59
|
+
private compatibility;
|
|
60
|
+
/** What a child git (diff-index of `--broken`) printed on stderr */
|
|
61
|
+
private childStderr;
|
|
64
62
|
/**
|
|
65
63
|
* Set the commit to describe.
|
|
66
64
|
*
|
|
@@ -73,6 +71,8 @@ export declare class DescribeCommand extends GitCommand<DescribeResult> {
|
|
|
73
71
|
* @param rev Reference string (branch, tag, commit ID)
|
|
74
72
|
*/
|
|
75
73
|
setTargetRef(rev: string): Promise<this>;
|
|
74
|
+
/** The revisions to describe, as given to git (`<commit-ish>...`, blobs too). */
|
|
75
|
+
setRevisions(...revisions: string[]): this;
|
|
76
76
|
/**
|
|
77
77
|
* Whether to always use long output format.
|
|
78
78
|
*
|
|
@@ -106,9 +106,10 @@ export declare class DescribeCommand extends GitCommand<DescribeResult> {
|
|
|
106
106
|
*/
|
|
107
107
|
setAlways(always: boolean): this;
|
|
108
108
|
/**
|
|
109
|
-
* Set the abbreviation length for commit hash
|
|
109
|
+
* Set the abbreviation length for commit hash (`--abbrev=<n>`): 0 prints the tag alone,
|
|
110
|
+
* other lengths are kept between 4 and 40.
|
|
110
111
|
*
|
|
111
|
-
* @param abbrev Abbreviation length (default:
|
|
112
|
+
* @param abbrev Abbreviation length (default: `core.abbrev`)
|
|
112
113
|
*/
|
|
113
114
|
setAbbrev(abbrev: number): this;
|
|
114
115
|
/**
|
|
@@ -128,48 +129,54 @@ export declare class DescribeCommand extends GitCommand<DescribeResult> {
|
|
|
128
129
|
*/
|
|
129
130
|
setExclude(...patterns: string[]): this;
|
|
130
131
|
/**
|
|
131
|
-
* Set maximum number of tag candidates to consider.
|
|
132
|
+
* Set maximum number of tag candidates to consider (`--candidates=<n>`, at most 28).
|
|
132
133
|
*
|
|
133
134
|
* @param max Maximum candidates (default: 10)
|
|
134
135
|
*/
|
|
135
136
|
setMaxCandidates(max: number): this;
|
|
137
|
+
/** `--candidates=<n>`: as {@link setMaxCandidates}. */
|
|
138
|
+
setCandidates(max: number): this;
|
|
139
|
+
/** `--exact-match` (`--candidates=0`); false is `--no-exact-match` (10 candidates). */
|
|
140
|
+
setExactMatch(exact: boolean): this;
|
|
141
|
+
/** `--contains`: the tag that comes after the commit (name-rev). */
|
|
142
|
+
setContains(contains: boolean): this;
|
|
143
|
+
/** `--first-parent`: only first parents are followed. */
|
|
144
|
+
setFirstParent(firstParent: boolean): this;
|
|
145
|
+
/** `--debug`: the search strategy on stderr. */
|
|
146
|
+
setDebug(debug: boolean): this;
|
|
136
147
|
/**
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
* @returns Description result with tag name, depth, and/or commit hash
|
|
140
|
-
*/
|
|
141
|
-
call(): Promise<DescribeResult>;
|
|
142
|
-
/**
|
|
143
|
-
* Collect all tags/refs into a map by commit ID.
|
|
148
|
+
* `--dirty[=<mark>]`: HEAD described, `<mark>` (default `-dirty`) appended when the
|
|
149
|
+
* worktree differs from it; `undefined` turns it off.
|
|
144
150
|
*/
|
|
145
|
-
|
|
151
|
+
setDirty(mark?: string | undefined): this;
|
|
146
152
|
/**
|
|
147
|
-
*
|
|
153
|
+
* `--broken[=<mark>]`: as `--dirty`, and `<mark>` (default `-broken`) when the worktree
|
|
154
|
+
* cannot be compared (a broken submodule); `undefined` turns it off.
|
|
148
155
|
*/
|
|
149
|
-
|
|
156
|
+
setBroken(mark?: string | undefined): this;
|
|
157
|
+
/** The git version whose behaviour to follow (see `DescribeOptions.compatibility`). */
|
|
158
|
+
setCompatibility(version: "2.43" | "2.56"): this;
|
|
150
159
|
/**
|
|
151
|
-
*
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* Select the best tag from multiple candidates.
|
|
156
|
-
*/
|
|
157
|
-
private selectBestTag;
|
|
158
|
-
/**
|
|
159
|
-
* Find tag candidates by walking ancestors.
|
|
160
|
-
*/
|
|
161
|
-
private findCandidates;
|
|
162
|
-
/**
|
|
163
|
-
* Format a ref name to tag name.
|
|
164
|
-
*/
|
|
165
|
-
private formatTagName;
|
|
166
|
-
/**
|
|
167
|
-
* Format long description: tag-depth-gSHA.
|
|
160
|
+
* Execute the describe command.
|
|
161
|
+
*
|
|
162
|
+
* @returns Description result with tag name, depth, and/or commit hash
|
|
168
163
|
*/
|
|
169
|
-
|
|
164
|
+
call(): Promise<DescribeResult>;
|
|
170
165
|
/**
|
|
171
|
-
*
|
|
166
|
+
* git describe's stdout (one line per revision) and stderr.
|
|
167
|
+
*
|
|
168
|
+
* @throws DescribeError where git dies (its stderr as the message, the lines printed
|
|
169
|
+
* before in `stdout`)
|
|
172
170
|
*/
|
|
171
|
+
callText(): Promise<DescribeText>;
|
|
173
172
|
private abbreviate;
|
|
173
|
+
private nameRevSource;
|
|
174
|
+
private run;
|
|
175
|
+
/** `--dirty`/`--broken`: the mark the worktree's state against HEAD gives. */
|
|
176
|
+
private worktreeSuffix;
|
|
177
|
+
/** Whether a stage-0 entry's file no longer matches its stat (`ce_match_stat_basic`). */
|
|
178
|
+
private statChanged;
|
|
179
|
+
/** `describe --contains`: `name-rev --peel-tag --name-only --no-undefined [--tags]`. */
|
|
180
|
+
private runContains;
|
|
174
181
|
}
|
|
175
182
|
//# sourceMappingURL=describe-command.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"describe-command.d.ts","sourceRoot":"","sources":["../../src/commands/describe-command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"describe-command.d.ts","sourceRoot":"","sources":["../../src/commands/describe-command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAKtD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAM/C;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,iEAAiE;IACjE,QAAQ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