@statewalker/vcs-commands 0.7.0 → 0.8.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 +38 -0
- package/dist/commands/add-command.d.ts.map +1 -1
- package/dist/commands/am/am-command.d.ts +55 -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.map +1 -1
- package/dist/commands/apply/apply-engine.d.ts.map +1 -1
- package/dist/commands/apply/apply-parse.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/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/checkout-command.d.ts +19 -3
- package/dist/commands/checkout-command.d.ts.map +1 -1
- package/dist/commands/cherry-pick-command.d.ts +59 -0
- package/dist/commands/cherry-pick-command.d.ts.map +1 -1
- package/dist/commands/clean-command.d.ts +12 -0
- package/dist/commands/clean-command.d.ts.map +1 -1
- package/dist/commands/clone-command.d.ts.map +1 -1
- package/dist/commands/commit-command.d.ts +191 -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/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 +252 -5
- package/dist/commands/diff-command.d.ts.map +1 -1
- package/dist/commands/fetch-command.d.ts +20 -0
- package/dist/commands/fetch-command.d.ts.map +1 -1
- 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 +41 -1
- 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 +4 -0
- package/dist/commands/git-describe.d.ts.map +1 -1
- package/dist/commands/git-hooks.d.ts +35 -0
- 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 +26 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +3 -3
- package/dist/commands/interpret-trailers-command.d.ts +90 -0
- package/dist/commands/interpret-trailers-command.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 +296 -11
- package/dist/commands/log-command.d.ts.map +1 -1
- package/dist/commands/log-graph.d.ts +26 -1
- package/dist/commands/log-graph.d.ts.map +1 -1
- package/dist/commands/log-output.d.ts +133 -5
- 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 +30 -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 +96 -9
- package/dist/commands/merge-command.d.ts.map +1 -1
- package/dist/commands/merge-support.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.d.ts +48 -0
- package/dist/commands/name-rev.d.ts.map +1 -0
- package/dist/commands/notes-command.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 +10 -0
- package/dist/commands/pull-command.d.ts.map +1 -1
- package/dist/commands/push-command.d.ts +160 -9
- package/dist/commands/push-command.d.ts.map +1 -1
- package/dist/commands/read-tree-command.d.ts +6 -0
- package/dist/commands/read-tree-command.d.ts.map +1 -1
- package/dist/commands/rebase-command.d.ts +168 -6
- 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/remote-command.d.ts +138 -29
- package/dist/commands/remote-command.d.ts.map +1 -1
- 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 +2 -3
- package/dist/commands/reset-command.d.ts.map +1 -1
- package/dist/commands/restore-command.d.ts +2 -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 +154 -2
- package/dist/commands/rev-list-command.d.ts.map +1 -1
- package/dist/commands/revert-command.d.ts +32 -0
- package/dist/commands/revert-command.d.ts.map +1 -1
- package/dist/commands/revision-range.d.ts +32 -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 +84 -4
- package/dist/commands/sequencer-pick.d.ts.map +1 -1
- package/dist/commands/sequencer-support.d.ts +2 -0
- 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/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.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 +375 -0
- package/dist/commands/submodule-commands.d.ts.map +1 -0
- package/dist/commands/submodule-model.d.ts +288 -0
- package/dist/commands/submodule-model.d.ts.map +1 -0
- package/dist/commands/submodule-update-command.d.ts +198 -0
- package/dist/commands/submodule-update-command.d.ts.map +1 -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-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-ISM52N0n.js} +70736 -54492
- 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.map +1 -1
- package/dist/errors/index.js +57 -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/{git-command-BGiOJ8Zk.js → fsck-DLRpbwTj.js} +6230 -71
- package/dist/git-command.d.ts +27 -1
- package/dist/git-command.d.ts.map +1 -1
- package/dist/git.d.ts +267 -1
- package/dist/git.d.ts.map +1 -1
- package/dist/index.js +5 -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/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-output.d.ts +85 -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/index.d.ts +4 -0
- package/dist/results/index.d.ts.map +1 -1
- package/dist/results/index.js +2 -2
- package/dist/results/push-result.d.ts +7 -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-WVlBhVb1.js → results-TB2IJ64h.js} +2168 -403
- 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 +178 -17
- package/src/commands/am/am-command.ts +262 -42
- package/src/commands/am/index.ts +1 -0
- package/src/commands/am/mailsplit.ts +326 -0
- package/src/commands/apply/apply-command.ts +6 -6
- package/src/commands/apply/apply-engine.ts +1 -1
- package/src/commands/apply/apply-parse.ts +7 -8
- package/src/commands/bisect/bisect-command.ts +18 -5
- 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/checkout-command.ts +69 -43
- package/src/commands/cherry-pick-command.ts +143 -0
- package/src/commands/clean-command.ts +34 -3
- package/src/commands/clone-command.ts +2 -1
- package/src/commands/commit-command.ts +782 -64
- 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/diff-color-config.ts +274 -0
- package/src/commands/diff-command.ts +1009 -49
- package/src/commands/fetch-command.ts +142 -8
- 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 +314 -46
- package/src/commands/fsck/fetch-fsck.ts +172 -18
- package/src/commands/gc-command.ts +31 -1
- package/src/commands/git-describe.ts +31 -11
- package/src/commands/git-hooks.ts +81 -0
- 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 +26 -0
- package/src/commands/interpret-trailers-command.ts +256 -0
- package/src/commands/local-transport.ts +109 -10
- package/src/commands/log-command.ts +1246 -210
- package/src/commands/log-graph.ts +123 -26
- package/src/commands/log-output.ts +280 -21
- package/src/commands/ls-remote-command.ts +5 -0
- package/src/commands/mailmap.ts +119 -0
- package/src/commands/merge-base-command.ts +170 -0
- package/src/commands/merge-bases.ts +63 -8
- package/src/commands/merge-command.ts +330 -82
- package/src/commands/merge-support.ts +14 -1
- package/src/commands/mv-command.ts +6 -3
- package/src/commands/name-rev.ts +171 -0
- package/src/commands/notes-command.ts +11 -1
- 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 +26 -7
- package/src/commands/push-command.ts +682 -65
- package/src/commands/read-tree-command.ts +28 -1
- package/src/commands/rebase-command.ts +933 -129
- 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/remote-command.ts +449 -69
- package/src/commands/remote-transport.ts +9 -1
- package/src/commands/reset-command.ts +36 -31
- package/src/commands/restore-command.ts +12 -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 +402 -15
- package/src/commands/revert-command.ts +82 -0
- package/src/commands/revision-range.ts +204 -4
- package/src/commands/revision-resolver.ts +23 -8
- package/src/commands/rm-command.ts +282 -21
- package/src/commands/sequencer-pick.ts +498 -85
- package/src/commands/sequencer-support.ts +20 -2
- package/src/commands/serve-repository.ts +18 -3
- package/src/commands/show-command.ts +490 -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 +5 -2
- 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 +1517 -0
- package/src/commands/submodule-model.ts +930 -0
- package/src/commands/submodule-update-command.ts +1092 -0
- package/src/commands/switch-command.ts +3 -1
- package/src/commands/tag-command.ts +876 -64
- package/src/commands/trailers.ts +837 -100
- package/src/commands/tree-restore.ts +38 -10
- package/src/commands/verify-command.ts +235 -0
- package/src/commands/worktree-add-command.ts +268 -24
- 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 +2 -1
- package/src/errors/ref-errors.ts +23 -0
- package/src/errors/worktree-errors.ts +8 -1
- package/src/git-command.ts +66 -1
- package/src/git.ts +404 -1
- package/src/remote-config/index.ts +2 -0
- package/src/remote-config/remote-config-store.ts +101 -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-output.ts +195 -30
- package/src/results/diff-pickaxe.ts +304 -0
- package/src/results/diff-words.ts +395 -0
- package/src/results/index.ts +4 -0
- package/src/results/push-result.ts +7 -0
- package/src/results/rebase-result.ts +3 -0
- package/src/results/stash-result.ts +7 -0
- 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
|
@@ -16,7 +16,9 @@
|
|
|
16
16
|
* what `--date=` takes, and so on; unset, the configuration's defaults apply (`format.pretty`,
|
|
17
17
|
* `log.date`, `log.abbrevCommit`, `log.decorate`, `log.showRoot`, `log.mailmap`,
|
|
18
18
|
* `log.follow`, `log.graphIndent`, `log.excludeDecoration`, `notes.displayRef`...). Colors
|
|
19
|
-
* are
|
|
19
|
+
* are written as `git log --color=always` writes them when the diff options or `color.ui` /
|
|
20
|
+
* `color.diff` ask for `always` (`auto` is git without a terminal: none), the graph's columns
|
|
21
|
+
* in `log.graphColors` (graph.c's `column_colors_ansi` by default).
|
|
20
22
|
*
|
|
21
23
|
* A commit with an `encoding` header is shown in UTF-8 (git's default `i18n.logOutputEncoding`);
|
|
22
24
|
* another output encoding is not supported. One quirk of git is not reproduced: where its C
|
|
@@ -28,11 +30,14 @@
|
|
|
28
30
|
*
|
|
29
31
|
* @module
|
|
30
32
|
*/
|
|
31
|
-
import type { Commit, ObjectId } from "@statewalker/vcs-core";
|
|
33
|
+
import type { Commit, ObjectId, PersonIdent } from "@statewalker/vcs-core";
|
|
34
|
+
import type { DiffColors } from "../results/diff-color.js";
|
|
32
35
|
import { ChangeType } from "../results/diff-entry.js";
|
|
33
|
-
import type
|
|
36
|
+
import { type DiffOutputFormat, type DiffTextOptions } from "./diff-command.js";
|
|
34
37
|
import type { Mailmap } from "./mailmap.js";
|
|
35
|
-
import { type RefDecorations } from "./pretty-format.js";
|
|
38
|
+
import { type DecorationPalette, type RefDecorations } from "./pretty-format.js";
|
|
39
|
+
import type { SignatureCheck } from "./signature-check.js";
|
|
40
|
+
import { type TrailerConfig } from "./trailers.js";
|
|
36
41
|
/** How `git log` treats merges in its diffs (`--diff-merges=<mode>`, `-m`, `-c`, `--cc`). */
|
|
37
42
|
export type LogDiffMerges = "off" | "first-parent" | "separate" | "combined" | "dense-combined";
|
|
38
43
|
/** What `git log` prints of each commit (its command-line options). */
|
|
@@ -74,6 +79,20 @@ export interface LogOutputOptions {
|
|
|
74
79
|
topoOrder?: boolean;
|
|
75
80
|
/** `--reverse` */
|
|
76
81
|
reverse?: boolean;
|
|
82
|
+
/** `--date-order` */
|
|
83
|
+
dateOrder?: boolean;
|
|
84
|
+
/** `--author-date-order` */
|
|
85
|
+
authorDateOrder?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* `--boundary`: the excluded parents of the commits shown too, marked `-` (`commit - <id>`,
|
|
88
|
+
* `- <id> <subject>` with `--oneline`, `%m`)
|
|
89
|
+
*/
|
|
90
|
+
boundary?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* `--source`: after each commit's id, a tab and the name it was reached from (a `%S` in
|
|
93
|
+
* the format asks for the names too)
|
|
94
|
+
*/
|
|
95
|
+
source?: boolean;
|
|
77
96
|
/** `-p` / `--patch` */
|
|
78
97
|
patch?: boolean;
|
|
79
98
|
/** `-s` / `--no-patch`: no diff output, whatever else asks for it */
|
|
@@ -93,6 +112,11 @@ export interface LogOutputOptions {
|
|
|
93
112
|
nameOnly?: boolean;
|
|
94
113
|
/** `--name-status` */
|
|
95
114
|
nameStatus?: boolean;
|
|
115
|
+
/**
|
|
116
|
+
* `--check`: each commit's whitespace errors and leftover conflict markers, in place of
|
|
117
|
+
* the other formats; the log's exit status is then 2 when any were found
|
|
118
|
+
*/
|
|
119
|
+
check?: boolean;
|
|
96
120
|
/** `-m`: merges' diffs against each parent (`log.diffMerges`, default `separate`) */
|
|
97
121
|
m?: boolean;
|
|
98
122
|
/** `-c`: combined diffs of merges (implies `-p`) */
|
|
@@ -135,6 +159,12 @@ export interface LogOutputOptions {
|
|
|
135
159
|
localTzName?: (time: number) => string;
|
|
136
160
|
/** `git format-patch`'s mail settings (with the `email` or `mboxrd` format) */
|
|
137
161
|
mail?: LogMailOptions;
|
|
162
|
+
/**
|
|
163
|
+
* `--show-signature` / `--no-show-signature` (default `log.showSignature`, false; never for
|
|
164
|
+
* `format-patch`, whose `mail` settings are given): each signed commit's check, then each
|
|
165
|
+
* `mergetag`'s, after the commit's header
|
|
166
|
+
*/
|
|
167
|
+
showSignature?: boolean;
|
|
138
168
|
}
|
|
139
169
|
/** What `git format-patch` adds to the `email` format (log-tree.c, pretty.c). */
|
|
140
170
|
export interface LogMailOptions {
|
|
@@ -150,6 +180,13 @@ export interface LogMailOptions {
|
|
|
150
180
|
preserveSubject?: boolean;
|
|
151
181
|
/** `--signoff`: this `Signed-off-by: ...` line (with LF) appended, unless already there */
|
|
152
182
|
signoff?: string;
|
|
183
|
+
/** The `trailer.*` settings the sign-off is added with (see `trailerConfigOf`) */
|
|
184
|
+
trailerConfig?: TrailerConfig;
|
|
185
|
+
/**
|
|
186
|
+
* A multipart mail (`--attach`, `--inline`): `afterSubject` carries the MIME headers, and
|
|
187
|
+
* no 8bit `Content-Type` header is added (log-tree.c's need_8bit_cte of -1)
|
|
188
|
+
*/
|
|
189
|
+
multipart?: boolean;
|
|
153
190
|
/** `--from=<ident>`: the `From:` header's ident (the author moves to an in-body From) */
|
|
154
191
|
from?: {
|
|
155
192
|
name: string;
|
|
@@ -174,6 +211,30 @@ export interface LogOutputEntry {
|
|
|
174
211
|
parents: ObjectId[];
|
|
175
212
|
/** The parents before `--graph` rewrote them (git's saved parents, for `--full-diff`) */
|
|
176
213
|
savedParents?: ObjectId[];
|
|
214
|
+
/** The reflog entry a reflog walk (`git log -g <ref>`) shows this commit for */
|
|
215
|
+
reflog?: LogReflogEntry;
|
|
216
|
+
/** A boundary commit (`--boundary`), marked `-` */
|
|
217
|
+
boundary?: boolean;
|
|
218
|
+
/** The name the commit was reached from (`--source`, `%S`) */
|
|
219
|
+
source?: string;
|
|
220
|
+
}
|
|
221
|
+
/** A reflog entry of a reflog walk (reflog-walk.c's `reflog_info`). */
|
|
222
|
+
export interface LogReflogEntry {
|
|
223
|
+
/** The ref as given (`refs/stash`, `HEAD`) */
|
|
224
|
+
ref: string;
|
|
225
|
+
/** Its position, newest first (`<ref>@{n}`) */
|
|
226
|
+
index: number;
|
|
227
|
+
/** The entry's message, without its line end */
|
|
228
|
+
message: string;
|
|
229
|
+
/** Who made the change, and when */
|
|
230
|
+
who: PersonIdent;
|
|
231
|
+
/** The ref shortened (shorten_unambiguous_ref), for `%gd`; a prefix-stripped `ref` without */
|
|
232
|
+
shortRef?: string;
|
|
233
|
+
/**
|
|
234
|
+
* The selector the walk was given the ref with: `@{<n>}` shows indexes, `@{<date>}` dates,
|
|
235
|
+
* neither (undefined) indexes unless `--date` is given
|
|
236
|
+
*/
|
|
237
|
+
selector?: "index" | "date";
|
|
177
238
|
}
|
|
178
239
|
/** What the printer reads of the repository (see `LogCommand.callBytes`). */
|
|
179
240
|
export interface LogOutputHost {
|
|
@@ -201,6 +262,16 @@ export interface LogOutputHost {
|
|
|
201
262
|
}[]>;
|
|
202
263
|
/** The mailmap */
|
|
203
264
|
mailmap(): Promise<Mailmap>;
|
|
265
|
+
/** The `%G` check of a commit (`check_commit_signature`), made once per commit */
|
|
266
|
+
signature?(id: ObjectId): Promise<SignatureCheck>;
|
|
267
|
+
/**
|
|
268
|
+
* `--show-signature`'s lines of a commit (log-tree.c's `show_signature` and
|
|
269
|
+
* `show_mergetag`): each block of text with whether its check failed
|
|
270
|
+
*/
|
|
271
|
+
signatureLines?(entry: LogOutputEntry): Promise<{
|
|
272
|
+
failed: boolean;
|
|
273
|
+
text: string;
|
|
274
|
+
}[]>;
|
|
204
275
|
/**
|
|
205
276
|
* The diff of a commit against a parent (the empty tree for none): undefined bytes when
|
|
206
277
|
* nothing differs; `follow` the path followed, `followPath` the path to follow in the
|
|
@@ -236,6 +307,14 @@ export interface LogOutputHost {
|
|
|
236
307
|
patch: Uint8Array;
|
|
237
308
|
}>;
|
|
238
309
|
}
|
|
310
|
+
/**
|
|
311
|
+
* pp_email_subject's subject header: `start` (`Subject: [PATCH 1/2] `) and the title, in
|
|
312
|
+
* RFC 2047 (unless `encodeHeaders` is false) or wrapped at 78 columns, with its LF.
|
|
313
|
+
*/
|
|
314
|
+
export declare function mailSubjectLine(start: string, title: string, options?: {
|
|
315
|
+
encodeHeaders?: boolean;
|
|
316
|
+
encoding?: string;
|
|
317
|
+
}): string;
|
|
239
318
|
/**
|
|
240
319
|
* The `From:` header of the email format (pp_user_info): RFC 2047 (unless
|
|
241
320
|
* `format.encodeEmailHeaders` is off) or quoted as needed.
|
|
@@ -244,6 +323,17 @@ export declare function mailFromHeader(name: string, email: string, options?: {
|
|
|
244
323
|
encodeHeaders?: boolean;
|
|
245
324
|
encoding?: string;
|
|
246
325
|
}): string;
|
|
326
|
+
/**
|
|
327
|
+
* pretty.c's repo_logmsg_reencode of a stored commit into `outputEncoding`, as `git commit`
|
|
328
|
+
* reads one for `-C`, `--amend`, `--fixup` and `--squash` (`read_commit_message`,
|
|
329
|
+
* `format_commit_message` with `get_commit_output_encoding()`): the message and the author
|
|
330
|
+
* from the converted buffer; undefined when nothing changes (no `encoding` header in another
|
|
331
|
+
* character set, or bytes that do not convert).
|
|
332
|
+
*/
|
|
333
|
+
export declare function reencodedCommitParts(raw: Uint8Array, outputEncoding: string): {
|
|
334
|
+
message: string;
|
|
335
|
+
author: PersonIdent | undefined;
|
|
336
|
+
} | undefined;
|
|
247
337
|
/** The commit printer: git's rev_info output state over one walk. */
|
|
248
338
|
export declare class LogPrinter {
|
|
249
339
|
private readonly host;
|
|
@@ -264,6 +354,7 @@ export declare class LogPrinter {
|
|
|
264
354
|
private readonly showRoot;
|
|
265
355
|
private readonly useMailmap;
|
|
266
356
|
private readonly showNotes;
|
|
357
|
+
private readonly showSignature;
|
|
267
358
|
private readonly decorate;
|
|
268
359
|
private readonly follow;
|
|
269
360
|
private decorations?;
|
|
@@ -279,9 +370,24 @@ export declare class LogPrinter {
|
|
|
279
370
|
interesting: (id: ObjectId) => boolean;
|
|
280
371
|
firstParentOnly: boolean;
|
|
281
372
|
paths: string[];
|
|
373
|
+
/** The colors (`--color`, `color.ui`...), undefined for none */
|
|
374
|
+
colors?: {
|
|
375
|
+
diff: DiffColors;
|
|
376
|
+
decorations: DecorationPalette;
|
|
377
|
+
graph: readonly string[];
|
|
378
|
+
};
|
|
282
379
|
});
|
|
283
|
-
/**
|
|
380
|
+
/** `--diff-filter` or a pickaxe (`-S`, `-G`, `--find-object`) given */
|
|
381
|
+
private readonly diffFiltered;
|
|
382
|
+
/** Whether a commit whose diff is empty is still shown (git's `always_show_header`) */
|
|
284
383
|
get alwaysShowHeader(): boolean;
|
|
384
|
+
/**
|
|
385
|
+
* Whether the format shows the names commits were reached from (`%S`, as pretty.c's
|
|
386
|
+
* userformat_find_requirements finds it): the walk keeps them then, as with `--source`.
|
|
387
|
+
*/
|
|
388
|
+
get wantsSource(): boolean;
|
|
389
|
+
/** Whether commits not shown (their diff empty) do not count (`--follow`) */
|
|
390
|
+
get followsPath(): boolean;
|
|
285
391
|
/** Prepares what the format reads (decorations, mailmap) and the graph */
|
|
286
392
|
start(): Promise<void>;
|
|
287
393
|
/** Starts the graph over the entries shown */
|
|
@@ -289,6 +395,11 @@ export declare class LogPrinter {
|
|
|
289
395
|
private padding;
|
|
290
396
|
private oneline;
|
|
291
397
|
private abbrevId;
|
|
398
|
+
/**
|
|
399
|
+
* get_reflog_selector: `<ref>@{n}`, or `<ref>@{<date>}` for a ref given as `@{<date>}` or,
|
|
400
|
+
* given without a selector, under an explicit `--date`; `shorten` for `%gd`
|
|
401
|
+
*/
|
|
402
|
+
private reflogSelector;
|
|
292
403
|
private formatDate;
|
|
293
404
|
private mapped;
|
|
294
405
|
/**
|
|
@@ -315,6 +426,23 @@ export declare class LogPrinter {
|
|
|
315
426
|
private prettyPrint;
|
|
316
427
|
/** pretty.c's pp_user_info */
|
|
317
428
|
private userInfo;
|
|
429
|
+
/**
|
|
430
|
+
* `git show`'s `putchar('\n')` before a tag or tree header once something was shown
|
|
431
|
+
* (git's `rev.shown_one`, shared with the commits' separators)
|
|
432
|
+
*/
|
|
433
|
+
separateObject(): void;
|
|
434
|
+
/** `git show` showed a tag or tree header (`rev.shown_one = 1`) */
|
|
435
|
+
markShown(): void;
|
|
436
|
+
/** Text written as it is (a tag's or tree's header) */
|
|
437
|
+
writeText(text: string): void;
|
|
438
|
+
/** Bytes written as they are (a blob, a tag's message, tree entry names) */
|
|
439
|
+
writeBytes(bytes: Uint8Array): void;
|
|
440
|
+
/**
|
|
441
|
+
* builtin/log.c's show_tagger: pp_user_info of a tag's `tagger` line in the commits'
|
|
442
|
+
* format and date mode, without the mailmap and, in the email formats, without RFC 2047
|
|
443
|
+
* (git's context sets neither)
|
|
444
|
+
*/
|
|
445
|
+
writeTagger(ident: PersonIdent): void;
|
|
318
446
|
/** The output so far */
|
|
319
447
|
result(): Uint8Array;
|
|
320
448
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log-output.d.ts","sourceRoot":"","sources":["../../src/commands/log-output.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"log-output.d.ts","sourceRoot":"","sources":["../../src/commands/log-output.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAI3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAc,MAAM,mBAAmB,CAAC;AAE5F,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C,O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C,KAAK,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAqBnE"}
|
|
@@ -56,6 +56,8 @@ export interface LsRemoteResult {
|
|
|
56
56
|
* ```
|
|
57
57
|
*/
|
|
58
58
|
export declare class LsRemoteCommand extends TransportCommand<LsRemoteResult> {
|
|
59
|
+
/** git's command reads no core settings: an unparsable `core.whitespace` does not stop it */
|
|
60
|
+
protected readsCoreConfig(): boolean;
|
|
59
61
|
private remote?;
|
|
60
62
|
private heads;
|
|
61
63
|
private tags;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ls-remote-command.d.ts","sourceRoot":"","sources":["../../src/commands/ls-remote-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAKrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAG3D;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,kCAAkC;IAClC,QAAQ,EAAE,QAAQ,CAAC;IACnB,gDAAgD;IAChD,cAAc,CAAC,EAAE,QAAQ,CAAC;IAC1B,qCAAqC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6BAA6B;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,2BAA2B;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,kBAAkB;IAClB,IAAI,EAAE,SAAS,EAAE,CAAC;IAClB,wCAAwC;IACxC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBAAa,eAAgB,SAAQ,gBAAgB,CAAC,cAAc,CAAC;IACnE,OAAO,CAAC,MAAM,CAAC,CAAS;IACxB,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,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SAAS;CA6BxB"}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
*
|
|
13
13
|
* @module
|
|
14
14
|
*/
|
|
15
|
+
import { type GitHostEnvironment, type Worktree } from "@statewalker/vcs-working-tree";
|
|
15
16
|
/** A mailmap: entries keyed by email, case-insensitively, as git's string list keeps them. */
|
|
16
17
|
export declare class Mailmap {
|
|
17
18
|
private readonly entries;
|
|
@@ -22,10 +23,39 @@ export declare class Mailmap {
|
|
|
22
23
|
private readLine;
|
|
23
24
|
/** mailmap.c's add_mapping. */
|
|
24
25
|
private add;
|
|
26
|
+
/**
|
|
27
|
+
* mailmap.c's map_user where it maps: the canonical name and email of an identity, or
|
|
28
|
+
* undefined when no entry gives either (git leaves the identity as written then).
|
|
29
|
+
*/
|
|
30
|
+
lookup(name: string, email: string): {
|
|
31
|
+
name: string;
|
|
32
|
+
email: string;
|
|
33
|
+
} | undefined;
|
|
25
34
|
/** mailmap.c's map_user: the canonical name and email of an identity. */
|
|
26
35
|
map(name: string, email: string): {
|
|
27
36
|
name: string;
|
|
28
37
|
email: string;
|
|
29
38
|
};
|
|
30
39
|
}
|
|
40
|
+
/** What {@link readRepositoryMailmap} reads of a repository. */
|
|
41
|
+
export interface MailmapSources {
|
|
42
|
+
/** A configuration value (`core.bare`, `mailmap.blob`, `mailmap.file`) */
|
|
43
|
+
config(key: string): string | undefined;
|
|
44
|
+
/** The worktree `.mailmap` is read from (none in a bare repository) */
|
|
45
|
+
worktree?: Worktree;
|
|
46
|
+
/** The host `mailmap.file` is read through (a relative path from its current directory) */
|
|
47
|
+
environment?: GitHostEnvironment;
|
|
48
|
+
/** The blob a revision names (`mailmap.blob`), undefined when it names none */
|
|
49
|
+
readBlobNamed(name: string): Promise<Uint8Array | undefined>;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* mailmap.c's read_mailmap: the worktree's `.mailmap` (not in a bare repository), then
|
|
53
|
+
* `mailmap.blob` (default `HEAD:.mailmap` in a bare repository), then `mailmap.file`.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```typescript
|
|
57
|
+
* const map = await readRepositoryMailmap({ config, worktree, readBlobNamed });
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
export declare function readRepositoryMailmap(sources: MailmapSources): Promise<Mailmap>;
|
|
31
61
|
//# sourceMappingURL=mailmap.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mailmap.d.ts","sourceRoot":"","sources":["../../src/commands/mailmap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;
|
|
1
|
+
{"version":3,"file":"mailmap.d.ts","sourceRoot":"","sources":["../../src/commands/mailmap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,QAAQ,EACd,MAAM,+BAA+B,CAAC;AA0CvC,8FAA8F;AAC9F,qBAAa,OAAO;IAClB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAmC;IAE3D,yDAAyD;IACzD,IAAI,KAAK,IAAI,OAAO,CAEnB;IAED,mFAAmF;IACnF,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAMvB;IAED,OAAO,CAAC,QAAQ;IAchB,+BAA+B;IAC/B,OAAO,CAAC,GAAG;IA6BX;;;OAGG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAU/E;IAED,yEAAyE;IACzE,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAShE;CACF;AAED,gEAAgE;AAChE,MAAM,WAAW,cAAc;IAC7B,0EAA0E;IAC1E,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACxC,uEAAuE;IACvE,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,2FAA2F;IAC3F,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,+EAA+E;IAC/E,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAAC;CAC9D;AAcD;;;;;;;;GAQG;AACH,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,CA8BrF"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MergeBaseCommand - `git merge-base` (builtin/merge-base.c): the best common ancestors of
|
|
3
|
+
* commits, and its other modes: `--octopus`, `--independent`, `--is-ancestor` and
|
|
4
|
+
* `--fork-point`.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* // git merge-base --all main topic
|
|
9
|
+
* const { bases } = await git.mergeBase().setAll(true).addCommit("main").addCommit("topic").call();
|
|
10
|
+
*
|
|
11
|
+
* // git merge-base --is-ancestor v1.0 HEAD: exit status 0 when it is
|
|
12
|
+
* const { exitCode } = await git.mergeBase().setMode("is-ancestor").addCommit("v1.0").addCommit("HEAD").call();
|
|
13
|
+
*
|
|
14
|
+
* // git merge-base --fork-point origin/main topic: where topic forked, from origin/main's reflog
|
|
15
|
+
* const { bases: [fork] } = await git.mergeBase().setMode("fork-point").addCommit("origin/main").addCommit("topic").call();
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
import type { ObjectId } from "@statewalker/vcs-core";
|
|
19
|
+
import { GitCommand } from "../git-command.js";
|
|
20
|
+
/**
|
|
21
|
+
* What `git merge-base` does with its commits (its `OPT_CMDMODE` options): `"bases"` (the
|
|
22
|
+
* default) the merge bases of the first commit and all the others.
|
|
23
|
+
*/
|
|
24
|
+
export type MergeBaseMode = "bases" | "octopus" | "independent" | "is-ancestor" | "fork-point";
|
|
25
|
+
/** What `git merge-base` printed and its exit status. */
|
|
26
|
+
export interface MergeBaseResult {
|
|
27
|
+
/** The ids printed, one per line (none for `--is-ancestor`) */
|
|
28
|
+
readonly bases: ObjectId[];
|
|
29
|
+
/**
|
|
30
|
+
* git's exit status: 0, or 1 when nothing was found (`--is-ancestor`: 1 when the first
|
|
31
|
+
* commit is not an ancestor of the second)
|
|
32
|
+
*/
|
|
33
|
+
readonly exitCode: 0 | 1;
|
|
34
|
+
/** `--is-ancestor`: whether the first commit is an ancestor of the second (or the same) */
|
|
35
|
+
readonly isAncestor?: boolean;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* `git merge-base`. Commits are named as git reads them (any revision); a name that names no
|
|
39
|
+
* object dies with `fatal: Not a valid object name <name>`, one that names no commit with
|
|
40
|
+
* `fatal: Not a valid commit name <name>` (exit 128); a wrong number of commits is git's
|
|
41
|
+
* usage (exit 129).
|
|
42
|
+
*/
|
|
43
|
+
export declare class MergeBaseCommand extends GitCommand<MergeBaseResult> {
|
|
44
|
+
private readonly names;
|
|
45
|
+
private all;
|
|
46
|
+
private mode;
|
|
47
|
+
/**
|
|
48
|
+
* A commit argument. For `"fork-point"` the first is the ref whose reflog is read, the
|
|
49
|
+
* second (default HEAD) the commit that forked.
|
|
50
|
+
*/
|
|
51
|
+
addCommit(name: string): this;
|
|
52
|
+
/** `--all`: every merge base, not only the first (default false). */
|
|
53
|
+
setAll(all: boolean): this;
|
|
54
|
+
/** The mode (`--octopus`, `--independent`, `--is-ancestor`, `--fork-point`). */
|
|
55
|
+
setMode(mode: MergeBaseMode): this;
|
|
56
|
+
call(): Promise<MergeBaseResult>;
|
|
57
|
+
/** builtin/merge-base.c's get_commit_reference. */
|
|
58
|
+
private commitReference;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=merge-base-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge-base-command.d.ts","sourceRoot":"","sources":["../../src/commands/merge-base-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGtD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAI/C;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,SAAS,GAAG,aAAa,GAAG,aAAa,GAAG,YAAY,CAAC;AAE/F,yDAAyD;AACzD,MAAM,WAAW,eAAe;IAC9B,+DAA+D;IAC/D,QAAQ,CAAC,KAAK,EAAE,QAAQ,EAAE,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC;IACzB,2FAA2F;IAC3F,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;CAC/B;AAUD;;;;;GAKG;AACH,qBAAa,gBAAiB,SAAQ,UAAU,CAAC,eAAe,CAAC;IAC/D,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IACtC,OAAO,CAAC,GAAG,CAAS;IACpB,OAAO,CAAC,IAAI,CAA0B;IAEtC;;;OAGG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAI5B;IAED,qEAAqE;IACrE,MAAM,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAIzB;IAED,gFAAgF;IAChF,OAAO,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI,CAIjC;IAEK,IAAI,IAAI,OAAO,CAAC,eAAe,CAAC,CAmErC;IAED,mDAAmD;YACrC,eAAe;CAY9B"}
|
|
@@ -81,5 +81,28 @@ export declare class MergeBaseGraph {
|
|
|
81
81
|
mergeBases(one: BaseNode, two: BaseNode): Promise<BaseNode[]>;
|
|
82
82
|
/** git's repo_get_merge_bases_many(one, twos) (`git merge-base --all one twos...`). */
|
|
83
83
|
mergeBasesMany(one: BaseNode, twos: BaseNode[]): Promise<BaseNode[]>;
|
|
84
|
+
/**
|
|
85
|
+
* git's remove_redundant: the nodes no other of them reaches, in the order given (the
|
|
86
|
+
* nodes must be distinct).
|
|
87
|
+
*/
|
|
88
|
+
removeRedundant(nodes: BaseNode[]): Promise<BaseNode[]>;
|
|
89
|
+
/**
|
|
90
|
+
* git's reduce_heads (`git merge-base --independent`): duplicates dropped (the first kept),
|
|
91
|
+
* then every node another one reaches; the order given is kept.
|
|
92
|
+
*/
|
|
93
|
+
reduceHeads(nodes: BaseNode[]): Promise<BaseNode[]>;
|
|
94
|
+
/**
|
|
95
|
+
* git's get_octopus_merge_bases followed by reduce_heads (`git merge-base --octopus`): the
|
|
96
|
+
* merge bases of the first commit and the second, then of the third and each of those,
|
|
97
|
+
* and so on.
|
|
98
|
+
*/
|
|
99
|
+
octopusMergeBases(nodes: BaseNode[]): Promise<BaseNode[]>;
|
|
84
100
|
}
|
|
101
|
+
/**
|
|
102
|
+
* git's get_fork_point (commit.c): where `commit` forked from the ref whose reflog gave
|
|
103
|
+
* `candidates` (the first entry's old value, then every entry's new value, oldest first,
|
|
104
|
+
* each commit once; the ref's value when the log has none). It is the one merge base of
|
|
105
|
+
* `commit` and all candidates, when there is exactly one and it is a candidate.
|
|
106
|
+
*/
|
|
107
|
+
export declare function forkPointOf(graph: MergeBaseGraph, commit: ObjectId, candidates: ObjectId[]): Promise<ObjectId | undefined>;
|
|
85
108
|
//# sourceMappingURL=merge-bases.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merge-bases.d.ts","sourceRoot":"","sources":["../../src/commands/merge-bases.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAsB,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEnF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAEnE,sFAAsF;AACtF,MAAM,WAAW,QAAQ;IACvB,2DAA2D;IAC3D,EAAE,C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AGG;IACG,eAAe,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAY5D;IAED;;;OAGG;IACG,WAAW,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAKxD;IAED;;;;OAIG;IACG,iBAAiB,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAS9D;CACF;AAED;;;;;GAKG;AACH,wBAAsB,WAAW,CAC/B,KAAK,EAAE,cAAc,EACrB,MAAM,EAAE,QAAQ,EAChB,UAAU,EAAE,QAAQ,EAAE,GACrB,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC,CAS/B"}
|
|
@@ -58,11 +58,45 @@ export declare class MergeCommand extends GitCommand<MergeResult> {
|
|
|
58
58
|
private cleanupMode?;
|
|
59
59
|
private inProcess;
|
|
60
60
|
private noVerify;
|
|
61
|
+
/** `-S[<keyid>]` / `--no-gpg-sign` (undefined: `commit.gpgSign`) */
|
|
62
|
+
private sign?;
|
|
63
|
+
/** `--[no-]verify-signatures` (undefined: `merge.verifySignatures`) */
|
|
64
|
+
private verifySignatures?;
|
|
65
|
+
/** git's stdout lines of the signatures checked (`Commit <id> has a good GPG signature`) */
|
|
66
|
+
private readonly signatureLines;
|
|
67
|
+
/**
|
|
68
|
+
* `--verify-signatures` (true) / `--no-verify-signatures` (false): every commit merged
|
|
69
|
+
* must carry a good signature of at least marginal trust (with `gpg.minTrustLevel` set,
|
|
70
|
+
* that level instead), checked through the host's verifier before anything is written
|
|
71
|
+
* (commit.c's `verify_merge_signature`); undefined (the default) leaves it to
|
|
72
|
+
* `merge.verifySignatures`. A refusal throws {@link SignatureVerificationError} with git's
|
|
73
|
+
* death; a good signature adds `Commit <id> has a good GPG signature by <signer>` to the
|
|
74
|
+
* output.
|
|
75
|
+
*/
|
|
76
|
+
setVerifySignatures(verify: boolean | undefined): this;
|
|
77
|
+
/** Whether the commits merged are checked (the option, else `merge.verifySignatures`). */
|
|
78
|
+
private verifiesSignatures;
|
|
79
|
+
/** verify_merge_signature of one commit merged, its good line kept for the output */
|
|
80
|
+
private verifyMergedCommit;
|
|
61
81
|
/**
|
|
62
82
|
* `--no-verify`: the `pre-merge-commit` and `commit-msg` hooks do not run
|
|
63
83
|
* (`prepare-commit-msg` and `post-merge` still do).
|
|
64
84
|
*/
|
|
65
85
|
setNoVerify(noVerify: boolean): this;
|
|
86
|
+
/**
|
|
87
|
+
* `-S` (true) / `--no-gpg-sign` (false): whether to sign the merge commit; undefined (the
|
|
88
|
+
* default) leaves it to `commit.gpgSign`. The merge commit is signed through the host's
|
|
89
|
+
* signer (`GitHostEnvironment.signer`) as git's commit_tree signs it; when it cannot be
|
|
90
|
+
* signed (no signer, a failing one) the merge fails as git's does (`error: gpg failed to
|
|
91
|
+
* sign the data:`, `fatal: failed to write commit object`, exit 128:
|
|
92
|
+
* {@link SigningFailedError}), left in progress as git leaves it (MERGE_HEAD, the merged
|
|
93
|
+
* index and files) and no commit made. A fast-forward or a merge stopped before its commit
|
|
94
|
+
* signs nothing. `merge --continue` commits as git runs a plain `git commit`: signed only
|
|
95
|
+
* under `commit.gpgSign`.
|
|
96
|
+
*/
|
|
97
|
+
setSign(sign: boolean | undefined): this;
|
|
98
|
+
/** `-S<keyid>`: sign with this key (see {@link setSign}). */
|
|
99
|
+
setSigningKey(keyId: string): this;
|
|
66
100
|
/**
|
|
67
101
|
* A merge another command makes in process (a rebase's `merge`), which reads no `git
|
|
68
102
|
* merge` configuration of its own (`git_merge_config`).
|
|
@@ -77,6 +111,12 @@ export declare class MergeCommand extends GitCommand<MergeResult> {
|
|
|
77
111
|
private autoStash?;
|
|
78
112
|
private renormalize?;
|
|
79
113
|
private allowUnrelated;
|
|
114
|
+
/** `--log[=<n>]` / `--no-log` (undefined: `merge.log`) */
|
|
115
|
+
private log?;
|
|
116
|
+
private signoff;
|
|
117
|
+
private intoName?;
|
|
118
|
+
/** FETCH_HEAD-style lines naming the heads (a pull's), instead of merge_name's */
|
|
119
|
+
private mergeNames?;
|
|
80
120
|
/**
|
|
81
121
|
* Add a commit/branch to merge.
|
|
82
122
|
*
|
|
@@ -183,6 +223,32 @@ export declare class MergeCommand extends GitCommand<MergeResult> {
|
|
|
183
223
|
* merges against the empty tree.
|
|
184
224
|
*/
|
|
185
225
|
setAllowUnrelatedHistories(allow: boolean): this;
|
|
226
|
+
/**
|
|
227
|
+
* `--log[=<n>]`: the merge message lists the commits each head brings, at most `n` of them
|
|
228
|
+
* (true: 20), as git's fmt-merge-msg shortlog (`* <name>:` and their subjects; see
|
|
229
|
+
* {@link FmtMergeMsgCommand}); `--no-log` (false or 0) lists none. Undefined (the default)
|
|
230
|
+
* takes `merge.log` (or its old name `merge.summary`). With {@link setMessage} the list
|
|
231
|
+
* follows the message given.
|
|
232
|
+
*/
|
|
233
|
+
setLog(log: boolean | number | undefined): this;
|
|
234
|
+
/**
|
|
235
|
+
* `--signoff`: the merge commit's message gets the committer's `Signed-off-by:` trailer
|
|
236
|
+
* (git's append_signoff, before the hooks see MERGE_MSG); `--no-signoff` (false, the
|
|
237
|
+
* default) none. A merge stopped before its commit (conflicts, `--no-commit`) adds none.
|
|
238
|
+
*/
|
|
239
|
+
setSignoff(signoff: boolean): this;
|
|
240
|
+
/**
|
|
241
|
+
* `--into-name <branch>`: the default message names this branch as the one merged into
|
|
242
|
+
* (`into <branch>` left out as for HEAD's under `merge.suppressDest`).
|
|
243
|
+
*/
|
|
244
|
+
setIntoName(name: string | undefined): this;
|
|
245
|
+
/**
|
|
246
|
+
* The heads described as FETCH_HEAD describes them (`<id>\t\tbranch 'x' of <url>`), as
|
|
247
|
+
* `git pull` hands them to the merge, instead of describing the names included.
|
|
248
|
+
*
|
|
249
|
+
* @internal
|
|
250
|
+
*/
|
|
251
|
+
setMergeNames(lines: string): this;
|
|
186
252
|
/**
|
|
187
253
|
* The author of the merge commit (default: resolved as git resolves it, from
|
|
188
254
|
* `GIT_AUTHOR_*`, `author.*`, `user.*`).
|
|
@@ -207,6 +273,10 @@ export declare class MergeCommand extends GitCommand<MergeResult> {
|
|
|
207
273
|
* {@link call}.
|
|
208
274
|
*/
|
|
209
275
|
callIntoVoid(mergeHead: ObjectId): Promise<MergeResult>;
|
|
276
|
+
/** The good-signature lines first in the output, as git prints them before the merge's */
|
|
277
|
+
private withSignatureLines;
|
|
278
|
+
/** A two-way switch from the empty tree to `mergeHead`, HEAD's branch created there. */
|
|
279
|
+
private intoVoid;
|
|
210
280
|
/**
|
|
211
281
|
* merge.c's `checkout_fast_forward(head, remote)`: a two-way switch of the index and worktree
|
|
212
282
|
* from `from`'s tree to `to`'s, refusing (unpack-trees' porcelain "merge" messages) where
|
|
@@ -222,6 +292,12 @@ export declare class MergeCommand extends GitCommand<MergeResult> {
|
|
|
222
292
|
/** What the sparse checkout printed while the result was written (see MergeResult.warnings). */
|
|
223
293
|
private readonly sparseWarnings;
|
|
224
294
|
private run;
|
|
295
|
+
/**
|
|
296
|
+
* Runs a merge's write; when a tree holds a name the decoder refuses (`..`, `/` in a name,
|
|
297
|
+
* an empty name), answers as git: `error: invalid path '<path>'` (with merge-ort's
|
|
298
|
+
* `Merge with strategy ort failed.` when not a fast-forward), or the empty name's death.
|
|
299
|
+
*/
|
|
300
|
+
private refusingTreePaths;
|
|
225
301
|
/**
|
|
226
302
|
* git's fast-forward setting as the strategy leaves it: `ours` (NO_FAST_FORWARD) always
|
|
227
303
|
* makes a merge commit, whatever was asked.
|
|
@@ -253,8 +329,6 @@ export declare class MergeCommand extends GitCommand<MergeResult> {
|
|
|
253
329
|
* (`SQUASH_MSG`, HEAD left alone).
|
|
254
330
|
*/
|
|
255
331
|
private doOctopus;
|
|
256
|
-
/** git's fmt-merge-msg title for several heads: `Merge branches 'a', 'b' and tag 'v1'`. */
|
|
257
|
-
private octopusMessage;
|
|
258
332
|
/** The heads MERGE_HEAD names (one per line: several for an octopus). */
|
|
259
333
|
private mergeHeads;
|
|
260
334
|
/** `git merge --continue`: commits the resolved merge with MERGE_MSG. */
|
|
@@ -279,11 +353,21 @@ export declare class MergeCommand extends GitCommand<MergeResult> {
|
|
|
279
353
|
private resetAssumeUnchanged;
|
|
280
354
|
private context;
|
|
281
355
|
/**
|
|
282
|
-
* MERGE_MSG's text before any conflicts hint (git's `write_merge_state`):
|
|
283
|
-
*
|
|
284
|
-
* default message (already one line ended).
|
|
356
|
+
* MERGE_MSG's text before any conflicts hint (git's `write_merge_state`): merge_msg with
|
|
357
|
+
* a newline added, always (`-m "x\n"` gives `x` and a blank line).
|
|
285
358
|
*/
|
|
286
359
|
private stateMessage;
|
|
360
|
+
/**
|
|
361
|
+
* git's merge_msg (collect_parents): the message given (`-m`), followed by fmt-merge-msg's
|
|
362
|
+
* shortlog and tag messages under `--log`, or fmt-merge-msg's whole message without one;
|
|
363
|
+
* its last newline dropped (prepare_merge_message).
|
|
364
|
+
*/
|
|
365
|
+
private mergeMessage;
|
|
366
|
+
/**
|
|
367
|
+
* prepare_to_commit's `--signoff`: the committer's sign-off added to merge_msg
|
|
368
|
+
* (append_signoff with ignored_log_message_bytes).
|
|
369
|
+
*/
|
|
370
|
+
private signedOff;
|
|
287
371
|
/** git's merge exports GIT_REFLOG_ACTION before it writes a ref (see reflogActionValue). */
|
|
288
372
|
protected refTransactionHookEnv(): Record<string, string> | undefined;
|
|
289
373
|
/** `GIT_REFLOG_ACTION` as git's merge exports it (`merge <names>`, `pull` for a pull). */
|
|
@@ -302,6 +386,13 @@ export declare class MergeCommand extends GitCommand<MergeResult> {
|
|
|
302
386
|
private strategyName;
|
|
303
387
|
/** git's `cleanup_message` of a merge commit's message (prepare_to_commit, no editor). */
|
|
304
388
|
private cleanup;
|
|
389
|
+
/**
|
|
390
|
+
* The merge commit written, signed as `-S[<keyid>]` / `--no-gpg-sign` / `commit.gpgSign`
|
|
391
|
+
* ask (builtin/merge.c's `commit_tree` with `sign_commit`). When it cannot be signed git
|
|
392
|
+
* dies after prepare_to_commit has written the merge state (MERGE_MSG as the hooks left
|
|
393
|
+
* it): `writeState` writes it (not for an in-process merge), so the merge stays in progress
|
|
394
|
+
* for `git commit`, and the error is thrown.
|
|
395
|
+
*/
|
|
305
396
|
private storeCommit;
|
|
306
397
|
/**
|
|
307
398
|
* HEAD (its branch, when attached) moved to `id`, logged as git's merge logs it:
|
|
@@ -309,10 +400,6 @@ export declare class MergeCommand extends GitCommand<MergeResult> {
|
|
|
309
400
|
* or with `message` as it is.
|
|
310
401
|
*/
|
|
311
402
|
private updateHead;
|
|
312
|
-
/** How git's merge message names what is merged: `branch 'x'`, `tag 'v1'`, ... */
|
|
313
|
-
private describeMergeSource;
|
|
314
|
-
/** git's default merge message: `Merge branch 'x'` (`into <branch>` off main/master). */
|
|
315
|
-
private defaultMessage;
|
|
316
403
|
/**
|
|
317
404
|
* Check if commitA is an ancestor of commitB.
|
|
318
405
|
*/
|