@statewalker/vcs-commands 0.6.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/bisect/bisect-engine.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 +17 -0
- package/dist/commands/clone-command.d.ts.map +1 -1
- package/dist/commands/comment-char-config.d.ts +35 -0
- package/dist/commands/comment-char-config.d.ts.map +1 -0
- 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/default-branch.d.ts +70 -0
- package/dist/commands/default-branch.d.ts.map +1 -0
- 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/fsck/fsck-command.d.ts +2 -0
- package/dist/commands/fsck/fsck-command.d.ts.map +1 -1
- package/dist/commands/fsck/fsck-loose.d.ts +3 -0
- package/dist/commands/fsck/fsck-loose.d.ts.map +1 -1
- package/dist/commands/fsck/fsck-object-checks.d.ts +25 -14
- package/dist/commands/fsck/fsck-object-checks.d.ts.map +1 -1
- package/dist/commands/fsck/fsck-object-table.d.ts +15 -7
- package/dist/commands/fsck/fsck-object-table.d.ts.map +1 -1
- package/dist/commands/fsck/fsck-pack.d.ts +11 -4
- package/dist/commands/fsck/fsck-pack.d.ts.map +1 -1
- package/dist/commands/fsck/verify-pack-command.d.ts.map +1 -1
- package/dist/commands/gc-command.d.ts +80 -48
- package/dist/commands/gc-command.d.ts.map +1 -1
- package/dist/commands/git-date.d.ts +1 -65
- package/dist/commands/git-date.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 +43 -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 +15 -2
- package/dist/commands/index-adder.d.ts.map +1 -1
- package/dist/commands/index.d.ts +28 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +3 -3
- package/dist/commands/init-command.d.ts +50 -3
- 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/legacy-remotes.d.ts +55 -0
- package/dist/commands/legacy-remotes.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 +108 -9
- package/dist/commands/merge-command.d.ts.map +1 -1
- package/dist/commands/merge-support.d.ts +11 -3
- 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/notes-merge-command.d.ts.map +1 -1
- package/dist/commands/notes-tree.d.ts +11 -1
- package/dist/commands/notes-tree.d.ts.map +1 -1
- package/dist/commands/patch-id.d.ts +3 -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 +28 -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/rev-parse-command.d.ts +9 -0
- package/dist/commands/rev-parse-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 +21 -2
- 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 +85 -5
- 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 +18 -1
- 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-summary-command.d.ts.map +1 -1
- 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/untracked-cache-support.d.ts +2 -1
- package/dist/commands/untracked-cache-support.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-list-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-DnmlfwGV.js → commands-ISM52N0n.js} +66120 -49271
- 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-DxvwPrPB.js → fsck-DLRpbwTj.js} +6863 -1070
- package/dist/git-command.d.ts +43 -2
- package/dist/git-command.d.ts.map +1 -1
- package/dist/git.d.ts +276 -3
- 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 +117 -3
- package/dist/remote-config/remote-config-store.d.ts.map +1 -1
- package/dist/rename/detect-renames.d.ts.map +1 -1
- package/dist/results/clone-result.d.ts +8 -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-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/init-result.d.ts +7 -0
- package/dist/results/init-result.d.ts.map +1 -1
- package/dist/results/pull-result.d.ts +5 -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.map +1 -1
- package/dist/{results-BZGa2Z3I.js → results-TB2IJ64h.js} +2178 -412
- 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/add-patch/add-interactive.ts +3 -3
- package/src/commands/am/am-command.ts +263 -43
- package/src/commands/am/index.ts +1 -0
- package/src/commands/am/mailsplit.ts +326 -0
- package/src/commands/apply/apply-command.ts +18 -8
- package/src/commands/apply/apply-engine.ts +6 -7
- package/src/commands/apply/apply-parse.ts +10 -10
- package/src/commands/attributes-source.ts +1 -1
- package/src/commands/bisect/bisect-command.ts +18 -5
- package/src/commands/bisect/bisect-engine.ts +2 -1
- 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 +70 -44
- package/src/commands/cherry-pick-command.ts +143 -0
- package/src/commands/clean-command.ts +34 -3
- package/src/commands/clone-command.ts +118 -5
- package/src/commands/comment-char-config.ts +160 -0
- package/src/commands/commit-command.ts +790 -71
- 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 +47 -2
- package/src/commands/default-branch.ts +196 -0
- package/src/commands/diff-color-config.ts +274 -0
- package/src/commands/diff-command.ts +1053 -75
- package/src/commands/fetch-command.ts +161 -13
- 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 +316 -43
- package/src/commands/fsck/fetch-fsck.ts +172 -18
- package/src/commands/fsck/fsck-command.ts +183 -66
- package/src/commands/fsck/fsck-loose.ts +14 -4
- package/src/commands/fsck/fsck-object-checks.ts +87 -46
- package/src/commands/fsck/fsck-object-table.ts +52 -42
- package/src/commands/fsck/fsck-pack.ts +64 -34
- package/src/commands/fsck/verify-pack-command.ts +5 -2
- package/src/commands/gc-command.ts +238 -107
- package/src/commands/git-date.ts +9 -895
- package/src/commands/git-describe.ts +31 -11
- package/src/commands/git-hooks.ts +92 -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 +54 -10
- package/src/commands/index.ts +28 -0
- package/src/commands/init-command.ts +167 -11
- package/src/commands/interpret-trailers-command.ts +256 -0
- package/src/commands/legacy-remotes.ts +224 -0
- package/src/commands/local-transport.ts +109 -10
- package/src/commands/log-command.ts +1283 -232
- package/src/commands/log-graph.ts +123 -26
- package/src/commands/log-output.ts +280 -21
- package/src/commands/ls-remote-command.ts +9 -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 +360 -82
- package/src/commands/merge-support.ts +43 -9
- 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/notes-merge-command.ts +23 -14
- package/src/commands/notes-tree.ts +28 -13
- package/src/commands/octopus-merge.ts +3 -2
- package/src/commands/patch-id.ts +16 -8
- package/src/commands/pathspec-file.ts +72 -0
- package/src/commands/pathspec.ts +14 -2
- package/src/commands/pretty-format.ts +105 -20
- package/src/commands/promisor-remote.ts +10 -1
- package/src/commands/pull-command.ts +149 -22
- package/src/commands/push-command.ts +704 -72
- package/src/commands/read-tree-command.ts +34 -3
- package/src/commands/rebase-command.ts +957 -142
- 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 +484 -74
- package/src/commands/remote-transport.ts +9 -1
- package/src/commands/reset-command.ts +40 -42
- 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/rev-parse-command.ts +22 -0
- package/src/commands/revert-command.ts +82 -0
- package/src/commands/revision-range.ts +204 -4
- package/src/commands/revision-resolver.ts +55 -22
- package/src/commands/rm-command.ts +282 -21
- package/src/commands/sequencer-pick.ts +504 -86
- package/src/commands/sequencer-support.ts +30 -5
- 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 +17 -5
- package/src/commands/stash-branch-command.ts +88 -0
- package/src/commands/stash-create-command.ts +30 -2
- 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 +7 -6
- package/src/commands/status-header.ts +44 -8
- 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-summary-command.ts +6 -7
- 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/untracked-cache-support.ts +16 -12
- package/src/commands/verify-command.ts +235 -0
- package/src/commands/worktree-add-command.ts +268 -24
- package/src/commands/worktree-list-command.ts +3 -5
- 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/core-commands/add.command.impl.ts +1 -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 +98 -3
- package/src/git.ts +420 -4
- package/src/remote-config/index.ts +4 -0
- package/src/remote-config/remote-config-store.ts +238 -11
- package/src/rename/detect-renames.ts +5 -1
- package/src/results/clone-result.ts +9 -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 +204 -37
- 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/init-result.ts +9 -0
- package/src/results/pull-result.ts +5 -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 +5 -2
- 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
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `git interpret-trailers` (builtin/interpret-trailers.c) as a library command.
|
|
3
|
+
*
|
|
4
|
+
* ```typescript
|
|
5
|
+
* const { stdout } = await git
|
|
6
|
+
* .interpretTrailers()
|
|
7
|
+
* .setInput("Fix the parser\n")
|
|
8
|
+
* .addTrailer("Reviewed-by: R <r@example.com>")
|
|
9
|
+
* .setWhere("start")
|
|
10
|
+
* .addTrailer("Bug: 42")
|
|
11
|
+
* .call();
|
|
12
|
+
* // "Fix the parser\n\nBug: 42\nReviewed-by: R <r@example.com>\n"
|
|
13
|
+
*
|
|
14
|
+
* const parsed = await git.interpretTrailers().setInput(message).setParse(true).call();
|
|
15
|
+
* parsed.stdout; // the trailers alone, unfolded
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
import { GitCommand } from "../git-command.js";
|
|
19
|
+
import { type TrailerIfExists, type TrailerIfMissing, type TrailerWhere } from "./trailers.js";
|
|
20
|
+
/** What {@link InterpretTrailersCommand} gave. */
|
|
21
|
+
export interface InterpretTrailersCommandResult {
|
|
22
|
+
/** git's stdout: each input with its trailers (nothing for files edited in place) */
|
|
23
|
+
stdout: string;
|
|
24
|
+
/**
|
|
25
|
+
* git's stderr: the configuration's warnings, `error:` lines (an empty trailer token, a
|
|
26
|
+
* failed trailer command) and what the trailer commands wrote there
|
|
27
|
+
*/
|
|
28
|
+
stderr: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Add or parse the trailers of messages, as `git interpret-trailers [--in-place]
|
|
32
|
+
* [--trim-empty] [(--trailer <key>[(=|:)<value>])...] [--parse] [<file>...]`.
|
|
33
|
+
*
|
|
34
|
+
* The input is {@link setInput} (git's stdin) or the files added with {@link addFile} (paths
|
|
35
|
+
* from the worktree top, through the repository's FilesApi), each completed with a line end.
|
|
36
|
+
* The `trailer.*` configuration applies (`trailer.<key>.key`, `.where`, `.ifexists`,
|
|
37
|
+
* `.ifmissing`, `.cmd`, `.command`, `trailer.separators`, the defaults); `--where`,
|
|
38
|
+
* `--if-exists` and `--if-missing` apply to the trailers added after them, as on git's
|
|
39
|
+
* command line ({@link setWhere} with undefined is `--no-where`). Trailer commands run through
|
|
40
|
+
* the host environment's hook runner (`sh -c`, in the worktree top, without the variables
|
|
41
|
+
* naming the repository); without a runner none runs: a trailer keeps the value given and
|
|
42
|
+
* `trailer.<key>.command` adds no trailer of its own.
|
|
43
|
+
*/
|
|
44
|
+
export declare class InterpretTrailersCommand extends GitCommand<InterpretTrailersCommandResult> {
|
|
45
|
+
private input;
|
|
46
|
+
private files;
|
|
47
|
+
private inPlace;
|
|
48
|
+
private trimEmpty;
|
|
49
|
+
private onlyTrailers;
|
|
50
|
+
private onlyInput;
|
|
51
|
+
private unfold;
|
|
52
|
+
private noDivider;
|
|
53
|
+
private where?;
|
|
54
|
+
private ifExists?;
|
|
55
|
+
private ifMissing?;
|
|
56
|
+
private trailers;
|
|
57
|
+
private compatibility?;
|
|
58
|
+
/** The message to read when no file is given (git's stdin). */
|
|
59
|
+
setInput(input: string | Uint8Array): this;
|
|
60
|
+
/** A file to read (`<file>`), from the worktree top; several are output one after another. */
|
|
61
|
+
addFile(path: string): this;
|
|
62
|
+
/** `--in-place`: write each file back instead of the output. */
|
|
63
|
+
setInPlace(inPlace: boolean): this;
|
|
64
|
+
/** `--trim-empty`: leave out trailers whose value is empty. */
|
|
65
|
+
setTrimEmpty(trim: boolean): this;
|
|
66
|
+
/** `--only-trailers`: output only the trailers. */
|
|
67
|
+
setOnlyTrailers(only: boolean): this;
|
|
68
|
+
/** `--only-input`: apply no `trailer.<key>.command` trailers. */
|
|
69
|
+
setOnlyInput(only: boolean): this;
|
|
70
|
+
/** `--unfold`: join continuation lines into one. */
|
|
71
|
+
setUnfold(unfold: boolean): this;
|
|
72
|
+
/** `--parse`: `--only-trailers --only-input --unfold` (true sets the three). */
|
|
73
|
+
setParse(parse: boolean): this;
|
|
74
|
+
/** `--no-divider`: a `---` line does not end the message. */
|
|
75
|
+
setNoDivider(noDivider: boolean): this;
|
|
76
|
+
/** `--where <placement>` for the trailers added next; undefined is `--no-where`. */
|
|
77
|
+
setWhere(where: TrailerWhere | undefined): this;
|
|
78
|
+
/** `--if-exists <action>` for the trailers added next; undefined is `--no-if-exists`. */
|
|
79
|
+
setIfExists(action: TrailerIfExists | undefined): this;
|
|
80
|
+
/** `--if-missing <action>` for the trailers added next; undefined is `--no-if-missing`. */
|
|
81
|
+
setIfMissing(action: TrailerIfMissing | undefined): this;
|
|
82
|
+
/** `--trailer <key>[(=|:)<value>]`, with the placement and actions set so far. */
|
|
83
|
+
addTrailer(text: string): this;
|
|
84
|
+
/** `--no-trailer`: forget the trailers added so far. */
|
|
85
|
+
clearTrailers(): this;
|
|
86
|
+
/** The git version to follow where versions differ (default: the hook runner's, else 2.56). */
|
|
87
|
+
setCompatibility(version: "2.43" | "2.56"): this;
|
|
88
|
+
call(): Promise<InterpretTrailersCommandResult>;
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=interpret-trailers-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interpret-trailers-command.d.ts","sourceRoot":"","sources":["../../src/commands/interpret-trailers-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAIL,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EAElB,MAAM,eAAe,CAAC;AAEvB,kDAAkD;AAClD,MAAM,WAAW,8BAA8B;IAC7C,qFAAqF;IACrF,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAKD;;;;;;;;;;;;;GAaG;AACH,qBAAa,wBAAyB,SAAQ,UAAU,CAAC,8BAA8B,CAAC;IACtF,OAAO,CAAC,KAAK,CAAM;IACnB,OAAO,CAAC,KAAK,CAAgB;IAC7B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,KAAK,CAAC,CAAe;IAC7B,OAAO,CAAC,QAAQ,CAAC,CAAkB;IACnC,OAAO,CAAC,SAAS,CAAC,CAAmB;IACrC,OAAO,CAAC,QAAQ,CAAoB;IACpC,OAAO,CAAC,aAAa,CAAC,CAAkB;IAExC,+DAA+D;IAC/D,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAIzC;IAED,8FAA8F;IAC9F,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAI1B;IAED,gEAAgE;IAChE,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAIjC;IAED,+DAA+D;IAC/D,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAIhC;IAED,mDAAmD;IACnD,eAAe,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAInC;IAED,iEAAiE;IACjE,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAIhC;IAED,oDAAoD;IACpD,SAAS,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAI/B;IAED,gFAAgF;IAChF,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAQ7B;IAED,6DAA6D;IAC7D,YAAY,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,CAIrC;IAED,oFAAoF;IACpF,QAAQ,CAAC,KAAK,EAAE,YAAY,GAAG,SAAS,GAAG,IAAI,CAI9C;IAED,yFAAyF;IACzF,WAAW,CAAC,MAAM,EAAE,eAAe,GAAG,SAAS,GAAG,IAAI,CAIrD;IAED,2FAA2F;IAC3F,YAAY,CAAC,MAAM,EAAE,gBAAgB,GAAG,SAAS,GAAG,IAAI,CAIvD;IAED,kFAAkF;IAClF,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAS7B;IAED,wDAAwD;IACxD,aAAa,IAAI,IAAI,CAIpB;IAED,+FAA+F;IAC/F,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI/C;IAEK,IAAI,IAAI,OAAO,CAAC,8BAA8B,CAAC,CAwDpD;CACF"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* git 2.x's legacy remotes: a remote defined by a file `$GIT_COMMON_DIR/remotes/<name>` or
|
|
3
|
+
* `$GIT_COMMON_DIR/branches/<name>` instead of the configuration (remote.c
|
|
4
|
+
* `read_remotes_file`, `read_branches_file`). git reads them when it looks a remote up by
|
|
5
|
+
* name and the configuration gives that name no URL; git 3.0 (`WITH_BREAKING_CHANGES`,
|
|
6
|
+
* `GitHostEnvironment.breakingChanges`) never reads them.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```text
|
|
10
|
+
* $ cat .git/remotes/upstream $ cat .git/branches/vendor
|
|
11
|
+
* URL: https://example.com/r.git https://example.com/v.git#stable
|
|
12
|
+
* Pull: refs/heads/main:refs/heads/upstream
|
|
13
|
+
* Push: refs/heads/main:refs/heads/main
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* The branches file fetches `refs/heads/stable:refs/heads/vendor` and pushes
|
|
17
|
+
* `HEAD:refs/heads/stable`; without `#<branch>` the branch is `init.defaultBranch`, else
|
|
18
|
+
* `master`.
|
|
19
|
+
*/
|
|
20
|
+
import type { WorkingCopy } from "@statewalker/vcs-working-tree";
|
|
21
|
+
import { type LegacyRemote } from "../remote-config/index.js";
|
|
22
|
+
/** What {@link loadLegacyRemote} found, and the lines git prints on stderr reading it. */
|
|
23
|
+
export interface LegacyRemoteLoad {
|
|
24
|
+
remote?: LegacyRemote;
|
|
25
|
+
/**
|
|
26
|
+
* git's stderr while it reads the files, each entry one message (lines joined by `\n`):
|
|
27
|
+
* 2.5x's deprecation warning per file read, and the `advice.defaultBranchName` hint of a
|
|
28
|
+
* branches file without `#<branch>` (2.43 prints only the hint, in its own words)
|
|
29
|
+
*/
|
|
30
|
+
messages: string[];
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Reads the legacy remote `name` of a working copy, as remote.c's `remotes_remote_get_1`
|
|
34
|
+
* does, and records it for the working copy's {@link RemoteConfigStore}s (they see it while
|
|
35
|
+
* the configuration gives the name no URL): nothing under git 3.0, for a name that is no
|
|
36
|
+
* valid remote nickname (empty, `.`, `..`, a `/`), or for a remote the configuration gives a
|
|
37
|
+
* URL; else `remotes/<name>`, then, while there is still no URL, `branches/<name>`.
|
|
38
|
+
*
|
|
39
|
+
* @param compatibility The git whose stderr to give: 2.43 has no deprecation warning
|
|
40
|
+
*/
|
|
41
|
+
export declare function loadLegacyRemote(workingCopy: WorkingCopy, name: string, compatibility?: "2.43" | "2.56"): Promise<LegacyRemoteLoad>;
|
|
42
|
+
/**
|
|
43
|
+
* Removes the file a legacy remote was read from (builtin/remote.c `migrate_file`'s
|
|
44
|
+
* `unlink_or_warn`) and forgets the remote; a file already gone is no error.
|
|
45
|
+
*/
|
|
46
|
+
export declare function removeLegacyRemoteFile(workingCopy: WorkingCopy, origin: "remotes" | "branches", name: string): Promise<void>;
|
|
47
|
+
/** remote.c's `valid_remote_nick`: not empty, `.` or `..`, and no `/`. */
|
|
48
|
+
export declare function isValidRemoteNick(name: string): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Parses a `remotes/<name>` file as `read_remotes_file`: each line, its trailing
|
|
51
|
+
* whitespace (git's `isspace`: space, `\t`, `\n`, `\r`) dropped, is a `URL:`, `Push:` or `Pull:` line (the value's leading whitespace
|
|
52
|
+
* dropped) or ignored.
|
|
53
|
+
*/
|
|
54
|
+
export declare function parseRemotesFile(text: string): Pick<LegacyRemote, "urls" | "fetchRefspecs" | "pushRefspecs">;
|
|
55
|
+
//# sourceMappingURL=legacy-remotes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legacy-remotes.d.ts","sourceRoot":"","sources":["../../src/commands/legacy-remotes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAEjE,OAAO,EAAE,KAAK,YAAY,EAAsC,MAAM,2BAA2B,CAAC;AAKlG,0FAA0F;AAC1F,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB;;;;OAIG;IACH,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,wBAAsB,gBAAgB,CACpC,WAAW,EAAE,WAAW,EACxB,IAAI,EAAE,MAAM,EACZ,aAAa,GAAE,MAAM,GAAG,MAAe,GACtC,OAAO,CAAC,gBAAgB,CAAC,CA2C3B;AAED;;;GAGG;AACH,wBAAsB,sBAAsB,CAC1C,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,SAAS,GAAG,UAAU,EAC9B,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,IAAI,CAAC,CAIf;AAED,0EAA0E;AAC1E,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,GACX,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,eAAe,GAAG,cAAc,CAAC,CAc/D"}
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
* is decided in `remote-transport.ts` (`resolveRemote`).
|
|
6
6
|
*/
|
|
7
7
|
import { type Duplex, type GitServeSettings, type ReceivePackConnection, type ReceivePackHookContext, type ReceivePackHooks, type ServedRequestContext, type UploadPackConnection } from "@statewalker/vcs-transport";
|
|
8
|
-
import { type LinkedWorktrees, type OpenedRepository, type WorkingCopy } from "@statewalker/vcs-working-tree";
|
|
8
|
+
import { type GitHostEnvironment, type LinkedWorktrees, type OpenedRepository, type WorkingCopy } from "@statewalker/vcs-working-tree";
|
|
9
|
+
import { type ReceiveFsckSettings } from "./fsck/index.js";
|
|
9
10
|
import { HookSession } from "./git-hooks.js";
|
|
10
11
|
/**
|
|
11
12
|
* A connected pair of in-memory duplex streams: what one side writes, the other reads. `end`
|
|
@@ -62,9 +63,16 @@ hooks?: HookSession,
|
|
|
62
63
|
* output reaches the pushing user's stderr directly, not as "remote: " lines
|
|
63
64
|
*/
|
|
64
65
|
transactionHooks?: HookSession | undefined,
|
|
65
|
-
/**
|
|
66
|
+
/**
|
|
67
|
+
* `protocol.version`: 1 has receive-pack answer `version 1` first (2 is v0 for a push);
|
|
68
|
+
* `host`: where receive-pack runs ({@link ReceivePackHost}); `onWarning`: receive-pack's own
|
|
69
|
+
* warnings as it reads its config (`warning: skipping unknown msg id '<id>'`), which git's
|
|
70
|
+
* local transport shows on the pushing user's stderr
|
|
71
|
+
*/
|
|
66
72
|
options?: {
|
|
67
73
|
protocolVersion?: 0 | 1 | 2;
|
|
74
|
+
host?: ReceivePackHost;
|
|
75
|
+
onWarning?: (line: string) => void;
|
|
68
76
|
}): Promise<T>;
|
|
69
77
|
/**
|
|
70
78
|
* Runs `body` with the reference-transaction hook of `hooks` (a receiving repository's
|
|
@@ -74,13 +82,36 @@ options?: {
|
|
|
74
82
|
* runner, or a ref store that cannot take one, `body` alone.
|
|
75
83
|
*/
|
|
76
84
|
export declare function withReceiveTransactionHook<T>(remote: OpenedRepository, hooks: HookSession | undefined, body: () => Promise<T>): Promise<T>;
|
|
85
|
+
/** Where receive-pack runs: what it reads besides the served repository. */
|
|
86
|
+
export interface ReceivePackHost {
|
|
87
|
+
/** The host environment (absolute and `~/` skip lists, `$HOME`) */
|
|
88
|
+
environment?: GitHostEnvironment;
|
|
89
|
+
/** Whose messages to give where git 2.43 and 2.5x differ (default 2.5x) */
|
|
90
|
+
compatibility?: "2.43" | "2.56";
|
|
91
|
+
/**
|
|
92
|
+
* The repository is someone else's (served): files its configuration names (a
|
|
93
|
+
* `receive.fsck.skipList`) are read only inside its own git directories, as confined
|
|
94
|
+
* includes (`configIncludes: "files"`), never from the host; a local push into one's own
|
|
95
|
+
* repository reads them as git does
|
|
96
|
+
*/
|
|
97
|
+
confineFiles?: boolean;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* receive-pack's `receive.fsckObjects` / `transfer.fsckObjects` settings of the repository it
|
|
101
|
+
* serves (`receiveFsckOf`): skip lists named by a relative path are read from its git
|
|
102
|
+
* directory (receive-pack's working directory), absolute ones from the host; with
|
|
103
|
+
* `confineFiles` (a served repository) only files inside its own git directories, where their
|
|
104
|
+
* links lead and capped as confined includes (`readConfinedFile`), anything else unreadable.
|
|
105
|
+
*/
|
|
106
|
+
export declare function receiveFsckSettingsOf(remote: OpenedRepository, host?: ReceivePackHost): ReceiveFsckSettings;
|
|
77
107
|
/**
|
|
78
108
|
* The settings git's receive-pack takes from the repository it serves: the policies and hidden
|
|
79
109
|
* refs of its config (`serverSettingsFromConfig`), its current branch and the branches its
|
|
80
|
-
* worktrees have checked out, `updateInstead` (push-to-checkout, push-to-deploy),
|
|
81
|
-
*
|
|
110
|
+
* worktrees have checked out, `updateInstead` (push-to-checkout, push-to-deploy), the fsck of
|
|
111
|
+
* pushed objects (`receive.fsckObjects`, {@link receiveFsckSettingsOf}) and, with hooks,
|
|
112
|
+
* pre-receive / update / post-receive run as git's receive-pack runs them.
|
|
82
113
|
*/
|
|
83
|
-
export declare function receivePackSettingsOf(remote: OpenedRepository, hooks?: HookSession, receiveHooks?: ReceivePackHooks | undefined): Promise<GitServeSettings>;
|
|
114
|
+
export declare function receivePackSettingsOf(remote: OpenedRepository, hooks?: HookSession, receiveHooks?: ReceivePackHooks | undefined, host?: ReceivePackHost): Promise<GitServeSettings>;
|
|
84
115
|
/**
|
|
85
116
|
* The hooks of a repository a local push reaches (git's receive-pack runs them there): found
|
|
86
117
|
* in its git directory (or its `core.hooksPath`), run in its git directory, through the host
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-transport.d.ts","sourceRoot":"","sources":["../../src/commands/local-transport.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"local-transport.d.ts","sourceRoot":"","sources":["../../src/commands/local-transport.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAGL,KAAK,MAAM,EACX,KAAK,gBAAgB,EAIrB,KAAK,qBAAqB,EAE1B,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EAIzB,KAAK,oBAAoB,EAC1B,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EAErB,KAAK,WAAW,EACjB,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EAAE,KAAK,mBAAmB,EAAiB,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EACL,WAAW,EAKZ,MAAM,gBAAgB,CAAC;AAaxB;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAyDnD;AAED;;;GAGG;AACH,wBAAsB,eAAe,CACnC,WAAW,EAAE,WAAW,EACxB,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,gBAAgB,CAAC,CAS3B;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CAAC,CAAC,EACzC,MAAM,EAAE,gBAAgB,EACxB,GAAG,EAAE,CAAC,UAAU,EAAE,oBAAoB,KAAK,OAAO,CAAC,CAAC,CAAC,EACrD,OAAO,GAAE;IAAE,eAAe,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;CAAO,GAC5C,OAAO,CAAC,CAAC,CAAC,CAuCZ;AAuCD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAIlE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,GAAG,SAAS,CAI/E;AA0CD;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAChC,SAAS,EAAE,eAAe,EAC1B,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CA0B7B;AAED;;;;;;;;GAQG;AACH,wBAAsB,oBAAoB,CAAC,CAAC,EAC1C,MAAM,EAAE,gBAAgB,EACxB,GAAG,EAAE,CAAC,UAAU,EAAE,qBAAqB,KAAK,OAAO,CAAC,CAAC,CAAC;AACtD,0FAA0F;AAC1F,KAAK,CAAC,EAAE,WAAW;AACnB;;;GAGG;AACH,gBAAgB,GAAE,WAAW,GAAG,SAAiB;AACjD;;;;;GAKG;AACH,OAAO,GAAE;IACP,eAAe,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC5B,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/B,GACL,OAAO,CAAC,CAAC,CAAC,CAiBZ;AAaD;;;;;;GAMG;AACH,wBAAsB,0BAA0B,CAAC,CAAC,EAChD,MAAM,EAAE,gBAAgB,EACxB,KAAK,EAAE,WAAW,GAAG,SAAS,EAC9B,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACrB,OAAO,CAAC,CAAC,CAAC,CA6BZ;AAED,4EAA4E;AAC5E,MAAM,WAAW,eAAe;IAC9B,mEAAmE;IACnE,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,2EAA2E;IAC3E,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAChC;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,gBAAgB,EACxB,IAAI,GAAE,eAAoB,GACzB,mBAAmB,CA4CrB;AAED;;;;;;GAMG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,gBAAgB,EACxB,KAAK,CAAC,EAAE,WAAW,EACnB,YAAY,GAAE,gBAAgB,GAAG,SAEpB,EACb,IAAI,GAAE,eAAoB,GACzB,OAAO,CAAC,gBAAgB,CAAC,CA8C3B;AA4ED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAC/B,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,gBAAgB,EACxB,OAAO,GAAE;IAAE,SAAS,CAAC,EAAE,OAAO,CAAA;CAAO,GACpC,WAAW,GAAG,SAAS,CAiCzB;AA4BD;;;;;;;;GAQG;AACH,wBAAsB,aAAa,CACjC,KAAK,EAAE,WAAW,EAClB,GAAG,EAAE,IAAI,CAAC,sBAAsB,EAAE,gBAAgB,CAAC,GAClD,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAuBjC;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,oBAAoB,GAAG,SAAS,GACvC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAWxB"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { type Commit, type ObjectId } from "@statewalker/vcs-core";
|
|
1
|
+
import { type Commit, type ObjectId, type PersonIdent } from "@statewalker/vcs-core";
|
|
2
2
|
import { GitCommand } from "../git-command.js";
|
|
3
3
|
import { type DiffTextOptions } from "./diff-command.js";
|
|
4
|
-
import { type LogOutputOptions } from "./log-output.js";
|
|
4
|
+
import { type LogOutputOptions, type LogReflogEntry } from "./log-output.js";
|
|
5
|
+
import { type CommitFilter, type GrepPatternType } from "./rev-filter/index.js";
|
|
5
6
|
/**
|
|
6
7
|
* Result of a log command iteration.
|
|
7
8
|
*
|
|
@@ -10,7 +11,50 @@ import { type LogOutputOptions } from "./log-output.js";
|
|
|
10
11
|
export interface LogResult extends Commit {
|
|
11
12
|
/** The SHA-1 object ID of the commit */
|
|
12
13
|
id: ObjectId;
|
|
14
|
+
/**
|
|
15
|
+
* A boundary commit ({@link LogCommand.setBoundary}): a parent of a commit listed that is
|
|
16
|
+
* not listed itself, given after the others (git's `BOUNDARY`, the `-` mark)
|
|
17
|
+
*/
|
|
18
|
+
boundary?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* The name the commit was reached from ({@link LogCommand.setSource}, git's `--source`):
|
|
21
|
+
* the revision as given, or the ref `--all`, `--branches`... named
|
|
22
|
+
*/
|
|
23
|
+
source?: string;
|
|
24
|
+
/** In a reflog walk ({@link LogCommand.addReflogWalk}), the entry the commit is listed for */
|
|
25
|
+
reflog?: LogReflogEntry;
|
|
13
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* What `git show` prints through one log printer (see {@link LogCommand.showSession}).
|
|
29
|
+
*
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
export interface ShowSession {
|
|
33
|
+
/** Shows a commit as git show does; false when it was not shown (already, or TREESAME) */
|
|
34
|
+
commit(id: ObjectId): Promise<boolean>;
|
|
35
|
+
/** The newline before a tag or tree once something was shown */
|
|
36
|
+
separate(): void;
|
|
37
|
+
/** Marks something shown (a tag's or tree's header) */
|
|
38
|
+
markShown(): void;
|
|
39
|
+
text(text: string): void;
|
|
40
|
+
bytes(bytes: Uint8Array): void;
|
|
41
|
+
/** A tag's `tagger` line as `Tagger:` (and its date) in the format */
|
|
42
|
+
tagger(ident: PersonIdent): void;
|
|
43
|
+
/** Everything printed */
|
|
44
|
+
result(): Uint8Array;
|
|
45
|
+
/** The `color.diff.commit` color and its reset of a tag's or tree's header ("" without color) */
|
|
46
|
+
readonly commitColor: {
|
|
47
|
+
set: string;
|
|
48
|
+
reset: string;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* The order of the commits listed: git's `--topo-order` (`topo`: no parent before all its
|
|
53
|
+
* children, a line of history kept together), `--date-order` (`date`: no parent before its
|
|
54
|
+
* children, else newest commit date first), `--author-date-order` (`author-date`: as `date`
|
|
55
|
+
* by author date).
|
|
56
|
+
*/
|
|
57
|
+
export type LogOrder = "topo" | "date" | "author-date";
|
|
14
58
|
/**
|
|
15
59
|
* What a path-limited walk did (git's trace2 `bloom` statistics, and the tree work behind
|
|
16
60
|
* them): how often the changed-path filters answered, and how many tree entries the walk read
|
|
@@ -120,12 +164,115 @@ export declare class LogCommand extends GitCommand<AsyncIterable<LogResult>> {
|
|
|
120
164
|
private authorPattern?;
|
|
121
165
|
private committerPattern?;
|
|
122
166
|
private revFilter;
|
|
167
|
+
/** `--grep` patterns */
|
|
168
|
+
private readonly grepMessages;
|
|
169
|
+
/** `--author` patterns */
|
|
170
|
+
private readonly grepAuthors;
|
|
171
|
+
/** `--committer` patterns */
|
|
172
|
+
private readonly grepCommitters;
|
|
173
|
+
private allMatch;
|
|
174
|
+
private invertGrep;
|
|
175
|
+
private regexpIgnoreCase;
|
|
176
|
+
private patternType?;
|
|
177
|
+
private useMailmap?;
|
|
178
|
+
private logConfig;
|
|
179
|
+
private readonly commitFilters;
|
|
180
|
+
/** The filter of the walk under way (git's options and the added filters) */
|
|
181
|
+
private activeFilter?;
|
|
123
182
|
private useBloomFilters;
|
|
124
183
|
private readonly statistics;
|
|
125
184
|
/** The commits of the last walk (for its statistics). */
|
|
126
185
|
private lastWalk;
|
|
127
186
|
/** Set while {@link callBytes} collects the walk for its output */
|
|
128
187
|
private outputWalk;
|
|
188
|
+
/** `-g <ref>...`: the reflogs walked instead of the history (names as given) */
|
|
189
|
+
private reflogWalkNames?;
|
|
190
|
+
/** `--grep-reflog` patterns */
|
|
191
|
+
private readonly grepReflogs;
|
|
192
|
+
/** The git version whose behaviour differs where versions differ */
|
|
193
|
+
private compatibility;
|
|
194
|
+
/** `--topo-order`, `--date-order`, `--author-date-order` */
|
|
195
|
+
private order?;
|
|
196
|
+
/** `--reverse` */
|
|
197
|
+
private reverse;
|
|
198
|
+
/** `--boundary` */
|
|
199
|
+
private boundary;
|
|
200
|
+
/** `--source` */
|
|
201
|
+
private source;
|
|
202
|
+
/**
|
|
203
|
+
* The order of the commits ({@link LogOrder}); undefined is git's default, newest commit
|
|
204
|
+
* date first as the walk meets them. A sorted walk reads the whole history it lists
|
|
205
|
+
* before giving the first commit.
|
|
206
|
+
*
|
|
207
|
+
* @example
|
|
208
|
+
* ```typescript
|
|
209
|
+
* // git rev-list --topo-order main
|
|
210
|
+
* await git.log().add(main).setOrder("topo").call();
|
|
211
|
+
* ```
|
|
212
|
+
*/
|
|
213
|
+
setOrder(order: LogOrder | undefined): this;
|
|
214
|
+
/**
|
|
215
|
+
* `--reverse`: the commits chosen (after `-n` and `--skip`, boundary commits included)
|
|
216
|
+
* given oldest first.
|
|
217
|
+
*/
|
|
218
|
+
setReverse(reverse: boolean): this;
|
|
219
|
+
/**
|
|
220
|
+
* `--boundary`: after the commits listed, the parents of those that are not listed
|
|
221
|
+
* themselves (excluded, cut by `-n`, `--since` or a filter), each with `boundary: true`,
|
|
222
|
+
* as git's get_revision lists them (sorted as `sort_in_topological_order` sorts them).
|
|
223
|
+
*
|
|
224
|
+
* @example
|
|
225
|
+
* ```typescript
|
|
226
|
+
* // git rev-list --boundary main..topic
|
|
227
|
+
* for await (const c of await git.log().addRange(main, topic).setBoundary(true).call())
|
|
228
|
+
* console.log(`${c.boundary ? "-" : ""}${c.id}`);
|
|
229
|
+
* ```
|
|
230
|
+
*/
|
|
231
|
+
setBoundary(boundary: boolean): this;
|
|
232
|
+
/**
|
|
233
|
+
* `--source`: each commit carries the name it was reached from (`source`): the name given
|
|
234
|
+
* to {@link add}/{@link not}, the ref of {@link all}, `HEAD` for the default, passed from
|
|
235
|
+
* child to parent as the walk goes (the first name to reach a commit wins).
|
|
236
|
+
*/
|
|
237
|
+
setSource(source: boolean): this;
|
|
238
|
+
/**
|
|
239
|
+
* `git log -g <ref>` (`--walk-reflogs`) for the printed log ({@link callText}): the
|
|
240
|
+
* commits of `ref`'s reflog, newest entry first, each shown with its entry (`Reflog:`
|
|
241
|
+
* lines, `<sel>: <message>` under `--oneline`, `%gd`/`%gD`/`%gs`/`%gn`/`%ge` in a format,
|
|
242
|
+
* `<ref>@{<date>}` under an explicit `--date`). `-n`, `--skip` and the commit filters
|
|
243
|
+
* (`--grep`, `--author`...) apply; entries whose object is no commit are passed over.
|
|
244
|
+
*/
|
|
245
|
+
setReflogWalk(ref: string): this;
|
|
246
|
+
/**
|
|
247
|
+
* One more reflog of a reflog walk (`git log -g <name>...`): `HEAD`, `main`,
|
|
248
|
+
* `refs/heads/main`, with a selector of its first entry (`main@{2}`, `HEAD@{now}`,
|
|
249
|
+
* `@{0}` for the current branch, `@{-1}`). The walk takes the newest of the logs' entries
|
|
250
|
+
* each time (reflog-walk.c), so several logs interleave by date; a name without a reflog
|
|
251
|
+
* shows nothing. {@link call} gives the commits, {@link callText} the log with each entry.
|
|
252
|
+
*
|
|
253
|
+
* @example
|
|
254
|
+
* ```typescript
|
|
255
|
+
* // git log -g --format='%gd %gs' HEAD main
|
|
256
|
+
* await git.log().addReflogWalk("HEAD").addReflogWalk("main").callText({ pretty: "format:%gd %gs" });
|
|
257
|
+
* ```
|
|
258
|
+
*/
|
|
259
|
+
addReflogWalk(name: string): this;
|
|
260
|
+
/**
|
|
261
|
+
* `-g` / `--walk-reflogs`: walk reflogs instead of history, those {@link addReflogWalk}
|
|
262
|
+
* names, HEAD's when it names none (`git log -g`).
|
|
263
|
+
*/
|
|
264
|
+
setWalkReflogs(walk: boolean): this;
|
|
265
|
+
/**
|
|
266
|
+
* The git version to follow where versions differ (default 2.56): 2.43 refuses a reflog
|
|
267
|
+
* walk's `--reverse` before a sorted walk (`--topo-order`, `--graph`), 2.56 after.
|
|
268
|
+
*/
|
|
269
|
+
setCompatibility(version: "2.43" | "2.56"): this;
|
|
270
|
+
/**
|
|
271
|
+
* `--grep-reflog=<pattern>`: a reflog walk shows only entries whose message matches (a
|
|
272
|
+
* header pattern beside `--author`/`--committer`, combined with `--grep` as git's
|
|
273
|
+
* commit_match). Without a reflog walk the log dies, as git does.
|
|
274
|
+
*/
|
|
275
|
+
addGrepReflog(pattern: string): this;
|
|
129
276
|
/**
|
|
130
277
|
* Add a starting commit for the log.
|
|
131
278
|
*
|
|
@@ -134,8 +281,9 @@ export declare class LogCommand extends GitCommand<AsyncIterable<LogResult>> {
|
|
|
134
281
|
* peels it; with {@link all} the refs are walked besides (`git log --all <commit>`).
|
|
135
282
|
*
|
|
136
283
|
* @param commit ObjectId of commit to start from
|
|
284
|
+
* @param name The name it was given by, which {@link setSource} reports (the id without)
|
|
137
285
|
*/
|
|
138
|
-
add(commit: ObjectId): this;
|
|
286
|
+
add(commit: ObjectId, name?: string): this;
|
|
139
287
|
/**
|
|
140
288
|
* Filter commits to only those affecting the given path.
|
|
141
289
|
*
|
|
@@ -198,8 +346,9 @@ export declare class LogCommand extends GitCommand<AsyncIterable<LogResult>> {
|
|
|
198
346
|
* Useful for finding commits in one branch but not another.
|
|
199
347
|
*
|
|
200
348
|
* @param commit ObjectId to exclude along with its ancestors
|
|
349
|
+
* @param name The name it was given by (see {@link add})
|
|
201
350
|
*/
|
|
202
|
-
not(commit: ObjectId): this;
|
|
351
|
+
not(commit: ObjectId, name?: string): this;
|
|
203
352
|
/**
|
|
204
353
|
* Set minimum commit time (--since/--after).
|
|
205
354
|
*
|
|
@@ -242,6 +391,56 @@ export declare class LogCommand extends GitCommand<AsyncIterable<LogResult>> {
|
|
|
242
391
|
* @param filter Revision filter
|
|
243
392
|
*/
|
|
244
393
|
setRevFilter(filter: RevFilter): this;
|
|
394
|
+
/**
|
|
395
|
+
* `--grep=<pattern>`: commits whose message has a line matching the pattern (several:
|
|
396
|
+
* any of them, every one with {@link setAllMatch}). Patterns are basic POSIX regexes unless
|
|
397
|
+
* {@link setPatternType} or `grep.patternType`/`grep.extendedRegexp` say otherwise, matched
|
|
398
|
+
* as git's grep.c matches them (`--grep=` matches every commit with a message part).
|
|
399
|
+
*
|
|
400
|
+
* @example
|
|
401
|
+
* ```typescript
|
|
402
|
+
* // git log --grep=fix --grep=bug --all-match -i
|
|
403
|
+
* await git.log().addGrep("fix").addGrep("bug").setAllMatch(true).setRegexpIgnoreCase(true).call();
|
|
404
|
+
* ```
|
|
405
|
+
*/
|
|
406
|
+
addGrep(pattern: string): this;
|
|
407
|
+
/**
|
|
408
|
+
* `--author=<pattern>`: commits whose `author` header line (name and email, the date left
|
|
409
|
+
* out; mapped through the mailmap under `log.mailmap`) matches the pattern; several are
|
|
410
|
+
* or-ed. Unlike {@link setAuthorFilter}, the pattern is git's (a basic regex, case-sensitive
|
|
411
|
+
* without {@link setRegexpIgnoreCase}).
|
|
412
|
+
*/
|
|
413
|
+
addAuthor(pattern: string): this;
|
|
414
|
+
/** `--committer=<pattern>`: as {@link addAuthor}, on the `committer` header line. */
|
|
415
|
+
addCommitter(pattern: string): this;
|
|
416
|
+
/** `--all-match`: every `--grep` pattern must match (author and committer patterns always must). */
|
|
417
|
+
setAllMatch(allMatch: boolean): this;
|
|
418
|
+
/** `--invert-grep`: commits whose message matches no `--grep` pattern (not `--author`'s). */
|
|
419
|
+
setInvertGrep(invert: boolean): this;
|
|
420
|
+
/** `-i` / `--regexp-ignore-case`: the patterns fold ASCII case. */
|
|
421
|
+
setRegexpIgnoreCase(ignoreCase: boolean): this;
|
|
422
|
+
/**
|
|
423
|
+
* The patterns' type: `--basic-regexp`, `-E` (`extended`), `-F` (`fixed`) or `-P`
|
|
424
|
+
* (`perl`: refused as a git built without PCRE refuses it, unless the pattern has no regex
|
|
425
|
+
* character). Default: `grep.patternType`, else `grep.extendedRegexp`, else basic.
|
|
426
|
+
*/
|
|
427
|
+
setPatternType(type: GrepPatternType): this;
|
|
428
|
+
/**
|
|
429
|
+
* Whether `--author`/`--committer` match the identities as the mailmap maps them
|
|
430
|
+
* (`--use-mailmap`/`--no-mailmap`; default `log.mailmap`, true, as `git log`).
|
|
431
|
+
*/
|
|
432
|
+
setUseMailmap(use: boolean): this;
|
|
433
|
+
/**
|
|
434
|
+
* Whether the filters read `git log`'s configuration (default true): `grep.patternType`,
|
|
435
|
+
* `grep.extendedRegexp` and `log.mailmap`. False reads none of them, as `git rev-list`.
|
|
436
|
+
*/
|
|
437
|
+
setLogConfig(read: boolean): this;
|
|
438
|
+
/**
|
|
439
|
+
* A filter of the commits shown (see `CommitFilters`); several must all include a commit,
|
|
440
|
+
* as must git's options above. The walk still goes through the commits a filter hides, and
|
|
441
|
+
* `setMaxCount`/`setSkip` count only shown ones.
|
|
442
|
+
*/
|
|
443
|
+
addCommitFilter(filter: CommitFilter): this;
|
|
245
444
|
/**
|
|
246
445
|
* Whether a path-limited walk asks the commit-graph's changed-path Bloom filters before it
|
|
247
446
|
* compares trees (default true, as git does whenever the graph has filters).
|
|
@@ -265,6 +464,25 @@ export declare class LogCommand extends GitCommand<AsyncIterable<LogResult>> {
|
|
|
265
464
|
* @returns AsyncIterable of commits in reverse chronological order
|
|
266
465
|
*/
|
|
267
466
|
call(): Promise<AsyncIterable<LogResult>>;
|
|
467
|
+
/**
|
|
468
|
+
* The walk's filter: git's `--grep`/`--author`/`--committer` options as one `commit_match`
|
|
469
|
+
* (revision.c), then the filters added. The walk reads `grep.patternType` (and refuses a
|
|
470
|
+
* value git does not know) only when a pattern is given; the log output (`callBytes`, git
|
|
471
|
+
* log and git show) reads it on every run, as git does.
|
|
472
|
+
*/
|
|
473
|
+
private buildCommitFilter;
|
|
474
|
+
/**
|
|
475
|
+
* `grep.patternType` as grep_config reads it (`default` is undefined); a value git does not
|
|
476
|
+
* know dies, as every `git log`/`git show` dies on it whatever it is asked.
|
|
477
|
+
*/
|
|
478
|
+
private configuredPatternType;
|
|
479
|
+
/** The bytes of a commit as the walk reads it (the replacement's under replace refs) */
|
|
480
|
+
private rawCommit;
|
|
481
|
+
/**
|
|
482
|
+
* The author date of a commit as commit.c's record_author_date reads it (0 when the
|
|
483
|
+
* header has no well-formed author line).
|
|
484
|
+
*/
|
|
485
|
+
private authorDate;
|
|
268
486
|
/** The commit an annotated tag (or a chain of them) tags; any other id as it is. */
|
|
269
487
|
private peelToCommit;
|
|
270
488
|
/**
|
|
@@ -301,7 +519,8 @@ export declare class LogCommand extends GitCommand<AsyncIterable<LogResult>> {
|
|
|
301
519
|
*/
|
|
302
520
|
private finishOutputWalk;
|
|
303
521
|
/**
|
|
304
|
-
* The log printed as `git log <options>` prints it to a pipe (no colors
|
|
522
|
+
* The log printed as `git log <options>` prints it to a pipe (no pager; colors only when
|
|
523
|
+
* `setDiffOptions({ color })` or `color.ui`/`color.diff` say `always`): the
|
|
305
524
|
* walk set up by this command (start points, ranges, paths, `-n`, `--skip`, filters), each
|
|
306
525
|
* commit in the format asked for, with the graph and the diffs asked for. See
|
|
307
526
|
* {@link LogOutputOptions}.
|
|
@@ -316,18 +535,90 @@ export declare class LogCommand extends GitCommand<AsyncIterable<LogResult>> {
|
|
|
316
535
|
/** {@link callText} as bytes (messages and file contents that are not UTF-8 kept as they are). */
|
|
317
536
|
callBytes(options?: LogOutputOptions): Promise<Uint8Array>;
|
|
318
537
|
private printLog;
|
|
538
|
+
/**
|
|
539
|
+
* `git show`'s output of objects one at a time (builtin/log.c's cmd_show without a walk):
|
|
540
|
+
* one printer for every object, so commits, tags and trees share git's `shown_one`
|
|
541
|
+
* separators. Used by {@link ShowCommand}; the paths and filters set on this command
|
|
542
|
+
* decide which commits show, as revision.c's no-walk mode simplifies each one.
|
|
543
|
+
*
|
|
544
|
+
* @internal
|
|
545
|
+
*/
|
|
546
|
+
showSession(options: LogOutputOptions): Promise<ShowSession>;
|
|
547
|
+
/** revision.c's try_to_simplify_commit for a commit git shows without walking */
|
|
548
|
+
private treesameForShow;
|
|
549
|
+
/**
|
|
550
|
+
* setup_revisions' refusals of a reflog walk: a sorted walk (`--topo-order`, `--graph`
|
|
551
|
+
* without generation numbers: git's `limited`), then `--graph`/`--reverse`, then
|
|
552
|
+
* `--grep-reflog` without `-g`.
|
|
553
|
+
*/
|
|
554
|
+
private checkReflogWalkOptions;
|
|
555
|
+
/**
|
|
556
|
+
* The entries of a reflog walk (reflog-walk.c's next_reflog_entry over the names given,
|
|
557
|
+
* HEAD without): each entry's new commit, filtered as get_revision_1 filters a reflog walk
|
|
558
|
+
* (`--since`/`--until` against the entry's date, path limiting against the commit's parents,
|
|
559
|
+
* get_commit_action), then skipped and counted.
|
|
560
|
+
*/
|
|
561
|
+
private reflogEntries;
|
|
562
|
+
/**
|
|
563
|
+
* try_to_simplify_commit for a commit of a reflog walk (every parent relevant): TREESAME
|
|
564
|
+
* at the paths to a parent (to every parent under `--full-history`), a root commit to the
|
|
565
|
+
* empty tree.
|
|
566
|
+
*/
|
|
567
|
+
private reflogCommitTreesame;
|
|
319
568
|
/** What the log printer reads of the repository. */
|
|
320
569
|
private outputHost;
|
|
321
570
|
private diffOptions;
|
|
571
|
+
/** `--check` found errors in a commit's diff (git's `check_failed`) */
|
|
572
|
+
private checkFailed;
|
|
573
|
+
/**
|
|
574
|
+
* The exit status `git log` ends with: 2 when `--check` ({@link LogOutputOptions.check})
|
|
575
|
+
* found errors in the diffs shown, else 0 (cmd_log_walk)
|
|
576
|
+
*/
|
|
577
|
+
get exitCode(): number;
|
|
578
|
+
/** The colors {@link callBytes} prints with */
|
|
579
|
+
private colorSettings?;
|
|
580
|
+
private readonly outputWarnings;
|
|
581
|
+
/**
|
|
582
|
+
* What git prints on stderr while {@link callBytes} prints the log without dying: the
|
|
583
|
+
* `log.graphColors` colors it cannot parse (`error: invalid color value: <c>`, then
|
|
584
|
+
* `warning: ignored invalid color '<c>' in log.graphColors`)
|
|
585
|
+
*/
|
|
586
|
+
get warnings(): readonly string[];
|
|
587
|
+
/**
|
|
588
|
+
* git_log_config (git_diff_ui_config): the colors, read once for every commit's diff; the
|
|
589
|
+
* palettes of the log's own lines, undefined without color
|
|
590
|
+
*/
|
|
591
|
+
private readColors;
|
|
592
|
+
/**
|
|
593
|
+
* The pickaxe options checked before anything is shown, as git parses them (empty `-S`/
|
|
594
|
+
* `-G`, `--find-object` names resolved once, the combinations, the regex compiled); `-i`
|
|
595
|
+
* (`setRegexpIgnoreCase`) folds `-S`/`-G` too, as revision.c's `--regexp-ignore-case`
|
|
596
|
+
*/
|
|
597
|
+
private preparePickaxe;
|
|
322
598
|
/** `log` stores no objects: its abbreviations read each loose fan-out directory once */
|
|
323
599
|
protected writesNoObjects(): boolean;
|
|
324
600
|
/** Options of the diffs {@link callBytes} prints (context, algorithm, `--stat` widths...) */
|
|
325
601
|
setDiffOptions(options: DiffTextOptions): this;
|
|
602
|
+
private readonly signatureChecks;
|
|
603
|
+
private signatureCwd?;
|
|
604
|
+
/** A commit's bytes as its buffer is read (the replacement's, core.useReplaceRefs) */
|
|
605
|
+
private commitBuffer;
|
|
606
|
+
/** `check_commit_signature` of a commit, made once */
|
|
607
|
+
private signatureOf;
|
|
608
|
+
/** log-tree.c's `show_signature` and `show_mergetag` for one commit */
|
|
609
|
+
private signatureLines;
|
|
326
610
|
/** An object's content as stored (undefined when missing) */
|
|
327
611
|
private readObjectBytes;
|
|
328
612
|
private readBlob;
|
|
329
613
|
/** The blobs of a tree, by path (empty for a missing tree) */
|
|
330
614
|
private flatTree;
|
|
615
|
+
/**
|
|
616
|
+
* The pickaxe of a combined diff: without rename detection `--find-object` keeps the paths
|
|
617
|
+
* with the object in the merge or a parent (combined_objfind); with it, and for `-S`/`-G`,
|
|
618
|
+
* find_paths_generic's way: a diff against each parent through diffcore (renames, pickaxe
|
|
619
|
+
* and `--diff-filter`), keeping the paths every one of them still lists (intersect_paths)
|
|
620
|
+
*/
|
|
621
|
+
private combinedPickaxe;
|
|
331
622
|
/**
|
|
332
623
|
* combine-diff.c's diff_tree_combined for a merge: the paths that differ from every
|
|
333
624
|
* parent (within the pathspec), each as a combined diff of the trees.
|
|
@@ -341,12 +632,6 @@ export declare class LogCommand extends GitCommand<AsyncIterable<LogResult>> {
|
|
|
341
632
|
private loadNotes;
|
|
342
633
|
/** mailmap.c's read_mailmap: `.mailmap` (not in a bare repository), `mailmap.blob`, `mailmap.file` */
|
|
343
634
|
private loadMailmap;
|
|
344
|
-
/**
|
|
345
|
-
* `mailmap.file`, read as git reads it: through the host (a relative path from its current
|
|
346
|
-
* directory). Without a host environment, a relative path is read from the worktree's top
|
|
347
|
-
* (where git usually runs), and an absolute one inside the worktree through it as well.
|
|
348
|
-
*/
|
|
349
|
-
private readMailmapFile;
|
|
350
635
|
/**
|
|
351
636
|
* The tree, parents and date of a commit (git's parse_commit_buffer), from its raw bytes
|
|
352
637
|
* when the store gives them (kept in `raw` to be decoded whole if the commit is shown),
|