@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
|
@@ -17,7 +17,17 @@ export declare enum RebaseOperation {
|
|
|
17
17
|
/** Process steps (for interactive rebase) */
|
|
18
18
|
PROCESS_STEPS = "process-steps",
|
|
19
19
|
/** `--edit-todo`: the rest of the todo list edited (the interactive handler's editTodo) */
|
|
20
|
-
EDIT_TODO = "edit-todo"
|
|
20
|
+
EDIT_TODO = "edit-todo",
|
|
21
|
+
/**
|
|
22
|
+
* `--quit`: the rebase forgotten (its state directory removed, its autostash kept on
|
|
23
|
+
* `refs/stash`), HEAD, the index and the worktree left as they are
|
|
24
|
+
*/
|
|
25
|
+
QUIT = "quit",
|
|
26
|
+
/**
|
|
27
|
+
* `--show-current-patch`: `git show REBASE_HEAD` (merge backend) or `git am
|
|
28
|
+
* --show-current-patch` (apply backend), in {@link RebaseResult.currentPatch}
|
|
29
|
+
*/
|
|
30
|
+
SHOW_CURRENT_PATCH = "show-current-patch"
|
|
21
31
|
}
|
|
22
32
|
/**
|
|
23
33
|
* Handler for interactive rebase (`git rebase -i`): it plays the editors git runs.
|
|
@@ -86,6 +96,8 @@ export declare class RebaseCommand extends GitCommand<RebaseResult> {
|
|
|
86
96
|
private contentStrategy?;
|
|
87
97
|
private preserveMerges;
|
|
88
98
|
private interactiveHandler?;
|
|
99
|
+
/** Whose messages to give where git 2.43 and 2.5x differ (default: the hooks') */
|
|
100
|
+
private compatibility?;
|
|
89
101
|
private committer?;
|
|
90
102
|
/** `--committer-date-is-author-date` (kept in `rebase-merge/cdate_is_adate`) */
|
|
91
103
|
private committerDateIsAuthorDate;
|
|
@@ -93,8 +105,24 @@ export declare class RebaseCommand extends GitCommand<RebaseResult> {
|
|
|
93
105
|
private ignoreDate;
|
|
94
106
|
/** `--signoff` (kept in `rebase-merge/signoff`) */
|
|
95
107
|
private signoff;
|
|
108
|
+
/** `--force-rebase` (REBASE_FORCE) */
|
|
109
|
+
private forceRebase;
|
|
110
|
+
/** `-S[<keyid>]` / `--no-gpg-sign` (undefined: `commit.gpgSign`; kept in `gpg_sign_opt`) */
|
|
111
|
+
private sign?;
|
|
112
|
+
/** What this run signs with (git's opts->gpg_sign), once known */
|
|
113
|
+
private runSign?;
|
|
96
114
|
private autoStash?;
|
|
97
|
-
private reapplyCherryPicks
|
|
115
|
+
private reapplyCherryPicks?;
|
|
116
|
+
/** `--onto <newbase>` as given (`A...B` included) */
|
|
117
|
+
private ontoName?;
|
|
118
|
+
/** The `<branch>` argument: switched to before the rebase */
|
|
119
|
+
private branchArg?;
|
|
120
|
+
/** `--keep-base` */
|
|
121
|
+
private keepBase;
|
|
122
|
+
/** `--[no-]fork-point`; undefined: git's default (on for an implicit upstream) */
|
|
123
|
+
private forkPoint?;
|
|
124
|
+
/** The onto name of the rebase running (git's `onto_name`), for the reflog */
|
|
125
|
+
private runOntoName?;
|
|
98
126
|
/** `--rebase-merges` (undefined: `rebase.rebaseMerges`) */
|
|
99
127
|
private rebaseMerges?;
|
|
100
128
|
/** `--rebase-merges=rebase-cousins` */
|
|
@@ -126,6 +154,19 @@ export declare class RebaseCommand extends GitCommand<RebaseResult> {
|
|
|
126
154
|
/** `--root`: every commit of the branch rebased (onto the upstream given, else a new root) */
|
|
127
155
|
private root;
|
|
128
156
|
private noVerify;
|
|
157
|
+
/** `--trailer` arguments (kept in `rebase-merge/trailer`, one per line) */
|
|
158
|
+
private trailerArgs;
|
|
159
|
+
/**
|
|
160
|
+
* `--trailer <token>[(=|:)<value>]` (git 2.46+): each rebased commit's message gets the
|
|
161
|
+
* trailer as `git interpret-trailers --no-divider --trailer` adds it (`trailer.*`
|
|
162
|
+
* configuration applies; a fixup or squash none, a `fixup -C` the message it takes). Like
|
|
163
|
+
* git, it implies `--force-rebase` and is kept in `rebase-merge/trailer` for `--continue`;
|
|
164
|
+
* an empty argument or one without a key is refused before anything is done, and under
|
|
165
|
+
* 2.43 compatibility the option itself (`error: unknown option \`trailer'`, exit 129).
|
|
166
|
+
* git's apply backend refuses it (`--trailer requires the merge backend`); ours has only
|
|
167
|
+
* the merge backend.
|
|
168
|
+
*/
|
|
169
|
+
addTrailer(trailer: string): this;
|
|
129
170
|
/** `--no-verify`: the pre-rebase hook does not run. */
|
|
130
171
|
setNoVerify(noVerify: boolean): this;
|
|
131
172
|
/** The command after the one running (git's peek_command), for record_in_rewritten */
|
|
@@ -150,6 +191,34 @@ export declare class RebaseCommand extends GitCommand<RebaseResult> {
|
|
|
150
191
|
* an upstream names, or git's "fatal: invalid upstream '<name>'" (exit 128).
|
|
151
192
|
*/
|
|
152
193
|
private resolveUpstream;
|
|
194
|
+
/**
|
|
195
|
+
* `--onto <newbase>`: the commits of `<upstream>..HEAD` go onto `newbase` instead of onto
|
|
196
|
+
* the upstream. Any revision, or `A...B` for the one merge base of A and B (either side
|
|
197
|
+
* empty is HEAD): git's `fatal: '<A...B>': need exactly one merge base` when there are
|
|
198
|
+
* none or several, `fatal: Does not point to a valid commit '<newbase>'` when it names no
|
|
199
|
+
* commit. With {@link setRoot} it is `--root --onto <newbase>`.
|
|
200
|
+
*/
|
|
201
|
+
setOnto(newbase: string): this;
|
|
202
|
+
/**
|
|
203
|
+
* The `<branch>` argument: `git rebase <upstream> <branch>` switches to it first (a local
|
|
204
|
+
* branch, which then moves; or any commit, rebased on a detached HEAD), as
|
|
205
|
+
* `git switch <branch>` would; a branch another worktree has checked out is refused.
|
|
206
|
+
*/
|
|
207
|
+
setBranch(branch: string): this;
|
|
208
|
+
/**
|
|
209
|
+
* `--keep-base`: onto the merge base of the upstream and the branch (`<upstream>...<branch>`),
|
|
210
|
+
* so the commits stay where they are while the upstream's are left out. Implies
|
|
211
|
+
* `--no-fork-point` and `--reapply-cherry-picks` unless set; refused with `--onto` and
|
|
212
|
+
* `--root`.
|
|
213
|
+
*/
|
|
214
|
+
setKeepBase(keepBase: boolean): this;
|
|
215
|
+
/**
|
|
216
|
+
* `--fork-point` / `--no-fork-point`: leave out the commits the upstream's reflog shows
|
|
217
|
+
* were once on it (git's get_fork_point: the one merge base of the branch and the values
|
|
218
|
+
* the upstream's reflog records, when it is one of them). Default: on when no upstream is
|
|
219
|
+
* given (the branch's `@{upstream}`), unless `rebase.forkPoint` is false; off otherwise.
|
|
220
|
+
*/
|
|
221
|
+
setForkPoint(forkPoint: boolean): this;
|
|
153
222
|
/**
|
|
154
223
|
* Set the upstream name for messages.
|
|
155
224
|
*
|
|
@@ -163,6 +232,12 @@ export declare class RebaseCommand extends GitCommand<RebaseResult> {
|
|
|
163
232
|
*
|
|
164
233
|
* @param operation Rebase operation
|
|
165
234
|
*/
|
|
235
|
+
/**
|
|
236
|
+
* Whose messages to give where git 2.43 and 2.5x differ (`fatal: No rebase in progress?`
|
|
237
|
+
* in 2.43, `fatal: no rebase in progress` in 2.5x). Default: the hook runner's
|
|
238
|
+
* compatibility, else 2.56.
|
|
239
|
+
*/
|
|
240
|
+
setCompatibility(version: "2.43" | "2.56"): this;
|
|
166
241
|
setOperation(operation: RebaseOperation): this;
|
|
167
242
|
/**
|
|
168
243
|
* Get the current operation.
|
|
@@ -250,6 +325,37 @@ export declare class RebaseCommand extends GitCommand<RebaseResult> {
|
|
|
250
325
|
* without `--signoff`).
|
|
251
326
|
*/
|
|
252
327
|
setSignoff(value: boolean): this;
|
|
328
|
+
/**
|
|
329
|
+
* `-S` (true) / `--no-gpg-sign` (false): whether to sign the commits the rebase makes;
|
|
330
|
+
* undefined (the default) leaves it to `commit.gpgSign`. Kept in
|
|
331
|
+
* `rebase-merge/gpg_sign_opt` for `--continue`. Every commit the rebase writes is signed
|
|
332
|
+
* through the host's signer (`GitHostEnvironment.signer`) as git's sequencer signs it; when
|
|
333
|
+
* it cannot be signed the step fails as git's does (`error: gpg failed to sign the data:`,
|
|
334
|
+
* `error: failed to write commit object`) and the rebase stops there (2.5x: `Could not
|
|
335
|
+
* apply ...`, the pick to commit; 2.43: the pick rescheduled), the branch untouched.
|
|
336
|
+
* Picks kept as they are (fast-forwarded) sign nothing, as in git.
|
|
337
|
+
*/
|
|
338
|
+
setSign(sign: boolean | undefined): this;
|
|
339
|
+
/** `-S<keyid>`: sign with this key (see {@link setSign}). */
|
|
340
|
+
setSigningKey(keyId: string): this;
|
|
341
|
+
/**
|
|
342
|
+
* The key this run's commits are signed with: the one it started with, else (a
|
|
343
|
+
* `--continue`) `rebase-merge/gpg_sign_opt` over `commit.gpgSign` (read_populate_opts).
|
|
344
|
+
*/
|
|
345
|
+
private signRequest;
|
|
346
|
+
/**
|
|
347
|
+
* commit_tree's signing of a commit the rebase makes, with this run's key (git's
|
|
348
|
+
* opts->gpg_sign), the signing program in the worktree top. When it cannot be signed:
|
|
349
|
+
* {@link SigningFailedError} with gpg's lines alone; the step says what follows.
|
|
350
|
+
*/
|
|
351
|
+
private signedRebaseCommit;
|
|
352
|
+
/** sequencer.c's gpg_sign_opt_quoted: `'-S<key>'` (shell-quoted) when the run signs, else "". */
|
|
353
|
+
private gpgSignOptQuoted;
|
|
354
|
+
/**
|
|
355
|
+
* try_to_commit failing to sign a pick or a fixup: 2.43 reschedules the command (its
|
|
356
|
+
* `error:` lines, the rescheduled advice), 2.5x stops as after a conflict.
|
|
357
|
+
*/
|
|
358
|
+
private signingStop;
|
|
253
359
|
/**
|
|
254
360
|
* `--exec <command>` (`-x`): an `exec <command>` line after each pick (after its fixup and
|
|
255
361
|
* squash chain) and each merge; implies an interactive list (no fast-forward shortcut) and
|
|
@@ -291,6 +397,13 @@ export declare class RebaseCommand extends GitCommand<RebaseResult> {
|
|
|
291
397
|
* interactive rebase.
|
|
292
398
|
*/
|
|
293
399
|
setAutosquash(value: boolean): this;
|
|
400
|
+
/**
|
|
401
|
+
* `--force-rebase` (`-f`, `--no-ff`): every commit is picked again, even one whose parent is
|
|
402
|
+
* already where the rebase puts it (git's REBASE_FORCE: no allow_ff, no up-to-date
|
|
403
|
+
* shortcut, `Current branch <name> is up to date, rebase forced.`). Like git, a `--continue`
|
|
404
|
+
* does not remember it.
|
|
405
|
+
*/
|
|
406
|
+
setForceRebase(value: boolean): this;
|
|
294
407
|
/**
|
|
295
408
|
* `--root`: all the commits of the branch are rebased, its root commit too. With an
|
|
296
409
|
* upstream set ({@link setUpstream}) that is `--root --onto <upstream>`; without one the
|
|
@@ -302,6 +415,27 @@ export declare class RebaseCommand extends GitCommand<RebaseResult> {
|
|
|
302
415
|
private run;
|
|
303
416
|
private context;
|
|
304
417
|
private inProgress;
|
|
418
|
+
/**
|
|
419
|
+
* cmd_rebase's checks of the options among themselves; the fork-point setting as git
|
|
420
|
+
* settles it then (1 on, 0 off, -1 the default: on for an implicit upstream).
|
|
421
|
+
*/
|
|
422
|
+
private checkBeginOptions;
|
|
423
|
+
/**
|
|
424
|
+
* cmd_rebase's names and commits: the upstream (given, else the branch's `@{upstream}`),
|
|
425
|
+
* the branch rebased (the `<branch>` argument, else HEAD's), onto (`--onto`, `A...B`,
|
|
426
|
+
* `--keep-base`, `--root`'s squash-onto), the fork point and the branch base (the one
|
|
427
|
+
* merge base of onto and the branch, which can_fast_forward reads).
|
|
428
|
+
*/
|
|
429
|
+
private settleBegin;
|
|
430
|
+
/**
|
|
431
|
+
* branch_get_upstream for `git rebase` without an upstream: the current branch's
|
|
432
|
+
* `@{upstream}`, else error_on_missing_default_upstream's advice (stdout, exit 1).
|
|
433
|
+
*/
|
|
434
|
+
private defaultUpstream;
|
|
435
|
+
/** What git prints while it reads `name` (an ambiguous refname's warning). */
|
|
436
|
+
private nameWarnings;
|
|
437
|
+
/** repo_get_oid_mb: the one merge base of `A...B` (either side empty is HEAD). */
|
|
438
|
+
private mergeBaseOfDots;
|
|
305
439
|
private begin;
|
|
306
440
|
/** Picks what is left in `git-rebase-todo`, then finishes the rebase (git's pick_commits). */
|
|
307
441
|
private processTodo;
|
|
@@ -409,6 +543,22 @@ export declare class RebaseCommand extends GitCommand<RebaseResult> {
|
|
|
409
543
|
* options and --signoff imply (`cdate_is_adate`, `ignore_date`, `signoff` in the state).
|
|
410
544
|
*/
|
|
411
545
|
private allowFastForward;
|
|
546
|
+
/** The trailer configuration `--trailer` and `--signoff` apply (`trailer.*`). */
|
|
547
|
+
private trailerConfig;
|
|
548
|
+
/**
|
|
549
|
+
* do_pick_commit's message of a pick: `--signoff`'s trailer, then the `--trailer`s
|
|
550
|
+
* (amend_strbuf_with_trailers) kept in `rebase-merge/trailer`.
|
|
551
|
+
*/
|
|
552
|
+
private pickedMessageOf;
|
|
553
|
+
/** amend_strbuf_with_trailers with the run's `--trailer`s (read_trailers), if any. */
|
|
554
|
+
private withTrailers;
|
|
555
|
+
/** read_trailers: the lines of `rebase-merge/trailer` (none without the file). */
|
|
556
|
+
private runTrailers;
|
|
557
|
+
/**
|
|
558
|
+
* print_advice's hints at a conflicting pick (`advice.mergeConflict`, 2.45+: off drops
|
|
559
|
+
* them, unset adds how to turn them off; 2.43 always gives them as they are).
|
|
560
|
+
*/
|
|
561
|
+
private mergeConflictAdvice;
|
|
412
562
|
/** append_signoff's `Signed-off-by: <committer name> <email>` line. */
|
|
413
563
|
private signoffLine;
|
|
414
564
|
/** The labels' refs (`refs-to-delete`) removed, as git's sequencer_remove_state does. */
|
|
@@ -436,6 +586,12 @@ export declare class RebaseCommand extends GitCommand<RebaseResult> {
|
|
|
436
586
|
private commitStagedChanges;
|
|
437
587
|
/** `git rebase --skip`: the stopped pick dropped (`reset --hard`), then as `--continue`. */
|
|
438
588
|
private skip;
|
|
589
|
+
/**
|
|
590
|
+
* `git rebase --quit` and `--show-current-patch` (builtin/rebase.c's ACTION_QUIT and
|
|
591
|
+
* ACTION_SHOW_CURRENT_PATCH): the backend found as cmd_rebase finds it (`rebase-apply/`
|
|
592
|
+
* first, `rebase-apply/applying` being git am's), refused when no rebase is in progress.
|
|
593
|
+
*/
|
|
594
|
+
private quitOrShow;
|
|
439
595
|
/** `git rebase --abort`: back to the original branch and commit (`reset --hard`). */
|
|
440
596
|
private abort;
|
|
441
597
|
/**
|
|
@@ -607,10 +763,16 @@ export declare class RebaseCommand extends GitCommand<RebaseResult> {
|
|
|
607
763
|
/** A commit, read once for the walks that pick the todo list. */
|
|
608
764
|
private loadCommit;
|
|
609
765
|
/**
|
|
610
|
-
* builtin/rebase.c's
|
|
611
|
-
*
|
|
612
|
-
*
|
|
613
|
-
|
|
766
|
+
* builtin/rebase.c's checkout_up_to_date: the `<branch>` argument checked out when there
|
|
767
|
+
* is nothing to rebase (reset_working_tree: the worktree switched from HEAD, the branch
|
|
768
|
+
* and HEAD logged `rebase: checkout <branch>`, the post-checkout hook run).
|
|
769
|
+
*/
|
|
770
|
+
private checkoutUpToDate;
|
|
771
|
+
/**
|
|
772
|
+
* builtin/rebase.c's can_fast_forward: the branch's one merge base with onto is onto
|
|
773
|
+
* (`branchBase`), the fork point (if any) is that base too, the upstream (none with
|
|
774
|
+
* --root) and the branch have one merge base, onto, and the first-parent line from the
|
|
775
|
+
* branch down to onto has no merge (is_linear_history).
|
|
614
776
|
*/
|
|
615
777
|
private canFastForward;
|
|
616
778
|
private isAncestor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rebase-command.d.ts","sourceRoot":"","sources":["../../src/commands/rebase-command.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"rebase-command.d.ts","sourceRoot":"","sources":["../../src/commands/rebase-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,QAAQ,EACb,KAAK,WAAW,EAGjB,MAAM,uBAAuB,CAAC;AAc/B,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EACL,KAAK,oBAAoB,EAIzB,aAAa,EACd,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAqFhF;;GAEG;AACH,oBAAY,eAAe;IACzB,yBAAyB;IACzB,KAAK,UAAU;IACf,yCAAyC;IACzC,QAAQ,aAAa;IACrB,8BAA8B;IAC9B,IAAI,SAAS;IACb,uCAAuC;IACvC,KAAK,UAAU;IACf,6CAA6C;IAC7C,aAAa,kBAAkB;IAC/B,2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IAyDzB,mFAAmF;YACrE,kBAAkB;IAYhC;;;;;;;;;;;OAWG;YACW,kBAAkB;IA0DhC;;;OAGG;YACW,WAAW;IAUzB;;;;OAIG;YACW,SAAS;IAiBvB;;;;OAIG;YACW,aAAa;IAmB3B,0FAA0F;YAC5E,QAAQ;IAKtB;;;OAGG;YACW,mBAAmB;IAuBjC,wFAAwF;YAC1E,WAAW;IAkBzB,wFAAwF;YAC1E,QAAQ;IAWtB;;;;;OAKG;YACW,gBAAgB;IAgB9B,yFAAyF;YAC3E,eAAe;IAS7B,oFAAoF;IACpF,OAAO,CAAC,wBAAwB;IAWhC;;;OAGG;YACW,cAAc;IA6B5B,uFAAuF;YACzE,QAAQ;IAMtB;;;OAGG;YACW,iBAAiB;IA+D/B;;;;OAIG;YACW,QAAQ;IAuEtB,qFAAqF;YACvE,cAAc;IAa5B,uFAAuF;YACzE,eAAe;IAY7B;;;;;OAKG;YACW,oBAAoB;IA6DlC;;;OAGG;YACW,gBAAgB;IAyB9B,kDAAkD;YACpC,eAAe;IAY7B;;;OAGG;YACW,YAAY;IA8B1B;;;;;OAKG;YACW,eAAe;IA4B7B,2FAA2F;IAC3F,OAAO,CAAC,SAAS;IAejB;;;OAGG;YACW,cAAc;IAmB5B;;;;;OAKG;YACW,eAAe;IAmD7B;;;;;;OAMG;YACW,eAAe;IA+D7B;;;;;OAKG;YACW,iBAAiB;IA6D/B,iEAAiE;YACnD,UAAU;IASxB;;;;OAIG;YACW,gBAAgB;IAmC9B;;;;;OAKG;YACW,cAAc;YAqBd,UAAU;CAIzB"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import type { ObjectId } from "@statewalker/vcs-core";
|
|
2
|
+
import { RefListingCommand } from "./ref-listing-command.js";
|
|
3
|
+
import type { RefQuoteStyle } from "./ref-quote.js";
|
|
4
|
+
/** A ref `for-each-ref` showed. */
|
|
5
|
+
export interface ForEachRefEntry {
|
|
6
|
+
/** Its full name */
|
|
7
|
+
refname: string;
|
|
8
|
+
/** The object it names */
|
|
9
|
+
objectId: ObjectId;
|
|
10
|
+
}
|
|
11
|
+
/** What {@link ForEachRefCommand} printed. */
|
|
12
|
+
export interface ForEachRefResult {
|
|
13
|
+
/** git's stdout, each ref's line and its newline (bytes outside UTF-8 as `decodeGitPath` keeps them) */
|
|
14
|
+
output: string;
|
|
15
|
+
/** Each shown ref's expanded format, in order (an empty one left out with `--omit-empty`) */
|
|
16
|
+
lines: string[];
|
|
17
|
+
/** The refs shown, in order */
|
|
18
|
+
refs: ForEachRefEntry[];
|
|
19
|
+
/** git's warnings on stderr (`warning: ignoring broken ref ...`) */
|
|
20
|
+
warnings: string[];
|
|
21
|
+
}
|
|
22
|
+
/** git's default `for-each-ref` format. */
|
|
23
|
+
export declare const DEFAULT_FOR_EACH_REF_FORMAT = "%(objectname) %(objecttype)\t%(refname)";
|
|
24
|
+
/**
|
|
25
|
+
* List refs with git's ref-filter.
|
|
26
|
+
*
|
|
27
|
+
* Equivalent to `git for-each-ref [--count=<n>] [--shell|--perl|--python|--tcl]
|
|
28
|
+
* [(--sort=<key>)...] [--format=<format>] [--include-root-refs] [--points-at=<object>]
|
|
29
|
+
* [--merged[=<commit>]] [--no-merged[=<commit>]] [--contains[=<commit>]]
|
|
30
|
+
* [--no-contains[=<commit>]] [(--exclude=<pattern>)...] [--start-after=<marker>]
|
|
31
|
+
* [--ignore-case] [--omit-empty] [--color] [<pattern>...]`.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```typescript
|
|
35
|
+
* const { output } = await git
|
|
36
|
+
* .forEachRef()
|
|
37
|
+
* .setFormat("%(refname:short) %(upstream:track)")
|
|
38
|
+
* .setSort("-committerdate")
|
|
39
|
+
* .setPatterns("refs/heads/")
|
|
40
|
+
* .call();
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* The format language is git's (`%(refname:short)`, `%(objectname:short=10)`,
|
|
44
|
+
* `%(upstream:track)`, `%(push)`, `%(HEAD)`, `%(authorname:mailmap)`,
|
|
45
|
+
* `%(committerdate:iso)`, `%(subject)`, `%(contents:lines=2)`, `%(trailers:key=...)`,
|
|
46
|
+
* `%(*objectname)` of what a tag peels to, `%(if)...%(then)...%(else)...%(end)`,
|
|
47
|
+
* `%(align:30,middle)...%(end)`, `%(color:red)`, `%(worktreepath)`, `%(describe)`,
|
|
48
|
+
* `%(ahead-behind:<commit>)`, `%(is-base:<commit>)`, `%xx` bytes); patterns match full ref
|
|
49
|
+
* names as paths (`refs/heads` matches `refs/heads/x`) or as globs. Sort keys are given in
|
|
50
|
+
* command-line order (the last one is the primary key), `refname` after them unless
|
|
51
|
+
* {@link setNoSort}; `-key` reverses and `version:key` compares as versions
|
|
52
|
+
* (`versionsort.suffix`). Not supported: `%(objectsize:disk)`, `%(deltabase)` and signature
|
|
53
|
+
* verification (`%(signature)` of a signed commit) refuse with a {@link RefFilterError}.
|
|
54
|
+
*/
|
|
55
|
+
export declare class ForEachRefCommand extends RefListingCommand<ForEachRefResult> {
|
|
56
|
+
private format;
|
|
57
|
+
/** git starts its `--sort` list with `refname`; `--no-sort` clears it */
|
|
58
|
+
private defaultSort;
|
|
59
|
+
private sortKeys;
|
|
60
|
+
private patterns;
|
|
61
|
+
private exclude;
|
|
62
|
+
private pointsAt;
|
|
63
|
+
private contains;
|
|
64
|
+
private noContains;
|
|
65
|
+
private merged;
|
|
66
|
+
private noMerged;
|
|
67
|
+
private count;
|
|
68
|
+
private omitEmpty;
|
|
69
|
+
private quoteStyle;
|
|
70
|
+
private ignoreCase;
|
|
71
|
+
private includeRootRefs;
|
|
72
|
+
private color;
|
|
73
|
+
private startAfter?;
|
|
74
|
+
private now?;
|
|
75
|
+
private compatibility;
|
|
76
|
+
/** `--format=<format>` (default `%(objectname) %(objecttype)\t%(refname)`). */
|
|
77
|
+
setFormat(format: string): this;
|
|
78
|
+
/** `--sort=<key>` for each key, in command-line order (the last is the primary key). */
|
|
79
|
+
setSort(...keys: string[]): this;
|
|
80
|
+
/** `--no-sort`: the keys given so far and the default `refname` dropped. */
|
|
81
|
+
setNoSort(): this;
|
|
82
|
+
/** `<pattern>...`: refs matching one (a path prefix of whole components, or a glob). */
|
|
83
|
+
setPatterns(...patterns: string[]): this;
|
|
84
|
+
/** `--exclude=<pattern>`: refs matching one are left out. */
|
|
85
|
+
setExclude(...patterns: string[]): this;
|
|
86
|
+
/** `--points-at=<object>`: refs naming one of these objects, directly or through tags. */
|
|
87
|
+
setPointsAt(...objects: string[]): this;
|
|
88
|
+
/** `--contains[=<commit>]` (HEAD without one): refs whose commit reaches one of them. */
|
|
89
|
+
setContains(...commits: string[]): this;
|
|
90
|
+
/** `--no-contains[=<commit>]` (HEAD without one): refs whose commit reaches none. */
|
|
91
|
+
setNoContains(...commits: string[]): this;
|
|
92
|
+
/** `--merged[=<commit>]` (HEAD without one): refs one of them reaches. */
|
|
93
|
+
setMerged(...commits: string[]): this;
|
|
94
|
+
/** `--no-merged[=<commit>]` (HEAD without one): refs none of them reaches. */
|
|
95
|
+
setNoMerged(...commits: string[]): this;
|
|
96
|
+
/** `--count=<n>`: at most n refs (0: all). */
|
|
97
|
+
setCount(count: number): this;
|
|
98
|
+
/** `--omit-empty`: no line for a ref whose format expands to nothing. */
|
|
99
|
+
setOmitEmpty(omit: boolean): this;
|
|
100
|
+
/** `--shell`, `--perl`, `--python` or `--tcl`: each atom's value quoted for that language. */
|
|
101
|
+
setQuoteStyle(style: RefQuoteStyle): this;
|
|
102
|
+
/** `--ignore-case`: patterns and sorting without case. */
|
|
103
|
+
setIgnoreCase(ignore: boolean): this;
|
|
104
|
+
/** `--include-root-refs` (git 2.45+): HEAD and the root refs (`ORIG_HEAD`, ...) too. */
|
|
105
|
+
setIncludeRootRefs(include: boolean): this;
|
|
106
|
+
/** `--color[=always]`: `%(color:...)` atoms give their escape sequences. */
|
|
107
|
+
setColor(color: boolean): this;
|
|
108
|
+
/** `--start-after=<marker>` (git 2.51+): only refs sorting after the marker. */
|
|
109
|
+
setStartAfter(marker: string): this;
|
|
110
|
+
/** The time relative and human dates are counted from, in seconds (git's GIT_TEST_DATE_NOW); default the clock. */
|
|
111
|
+
setNow(now: number): this;
|
|
112
|
+
/**
|
|
113
|
+
* The git version whose output to follow where versions differ (default 2.56): 2.43's
|
|
114
|
+
* `%(*atom)` reads the object a tag names, not what nested tags peel to, and its
|
|
115
|
+
* `%(trailers)` miss a signed tag's trailers, and a formatted date sorts by time (see
|
|
116
|
+
* `RefFormatOptions.compatibility`).
|
|
117
|
+
*/
|
|
118
|
+
setCompatibility(version: "2.43" | "2.56"): this;
|
|
119
|
+
call(): Promise<ForEachRefResult>;
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=for-each-ref-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"for-each-ref-command.d.ts","sourceRoot":"","sources":["../../../src/commands/ref-filter/for-each-ref-command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAUtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,mCAAmC;AACnC,MAAM,WAAW,eAAe;IAC9B,oBAAoB;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,0BAA0B;IAC1B,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED,8CAA8C;AAC9C,MAAM,WAAW,gBAAgB;IAC/B,wGAAwG;IACxG,MAAM,EAAE,MAAM,CAAC;IACf,6FAA6F;IAC7F,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,+BAA+B;IAC/B,IAAI,EAAE,eAAe,EAAE,CAAC;IACxB,oEAAoE;IACpE,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,2CAA2C;AAC3C,eAAO,MAAM,2BAA2B,4CAA4C,CAAC;AAErF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,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,GAAG,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAIxC;IAED,0EAA0E;IAC1E,SAAS,CAAC,GAAG,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAIpC;IAED,8EAA8E;IAC9E,WAAW,CAAC,GAAG,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAItC;IAED,8CAA8C;IAC9C,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAI5B;IAED,yEAAyE;IACzE,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAIhC;IAED,8FAA8F;IAC9F,aAAa,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,CAIxC;IAED,0DAA0D;IAC1D,aAAa,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAInC;IAED,wFAAwF;IACxF,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAIzC;IAED,4EAA4E;IAC5E,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAI7B;IAED,gFAAgF;IAChF,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAIlC;IAED,mHAAmH;IACnH,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAIxB;IAED;;;;;OAKG;IACH,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI/C;IAEK,IAAI,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAoEtC;CACF"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from "./for-each-ref-command.js";
|
|
2
|
+
export * from "./ref-atoms.js";
|
|
3
|
+
export * from "./ref-filter.js";
|
|
4
|
+
export * from "./ref-format.js";
|
|
5
|
+
export * from "./ref-listing-command.js";
|
|
6
|
+
export * from "./ref-quote.js";
|
|
7
|
+
export * from "./version-compare.js";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/ref-filter/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `%(atom)` table of git's ref-filter.c: each atom's name, what it reads (the ref alone,
|
|
3
|
+
* the object, or something else), how it sorts, and its argument parser with git's errors.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
import type { TrailerFormatOptions } from "../trailers.js";
|
|
8
|
+
/** ref-filter.c's info_source: what an atom reads. */
|
|
9
|
+
export type AtomSource = "none" | "obj" | "other";
|
|
10
|
+
/** ref-filter.c's cmp_type: how a sort key compares. */
|
|
11
|
+
export type AtomCmpType = "str" | "ulong" | "time";
|
|
12
|
+
/** The atoms git knows (ref-filter.c's `valid_atom`), in its table order. */
|
|
13
|
+
export declare const ATOM_NAMES: readonly ["refname", "objecttype", "objectsize", "objectname", "deltabase", "tree", "parent", "numparent", "object", "type", "tag", "author", "authorname", "authoremail", "authordate", "committer", "committername", "committeremail", "committerdate", "tagger", "taggername", "taggeremail", "taggerdate", "creator", "creatordate", "describe", "subject", "body", "trailers", "contents", "signature", "raw", "upstream", "push", "symref", "flag", "HEAD", "color", "worktreepath", "align", "end", "if", "then", "else", "rest", "ahead-behind", "is-base"];
|
|
14
|
+
/** An atom's kind (git's `enum atom_type`). */
|
|
15
|
+
export type AtomType = (typeof ATOM_NAMES)[number];
|
|
16
|
+
/** The source of an atom (git's `valid_atom[].source`). */
|
|
17
|
+
export declare function atomSource(type: AtomType): AtomSource;
|
|
18
|
+
/** `refname`'s options (and `symref`'s, `upstream`'s, `push`'s): ref-filter.c's refname_atom. */
|
|
19
|
+
export interface RefnameOption {
|
|
20
|
+
option: "normal" | "short" | "lstrip" | "rstrip";
|
|
21
|
+
lstrip?: number;
|
|
22
|
+
rstrip?: number;
|
|
23
|
+
}
|
|
24
|
+
/** The contents options (ref-filter.c's `C_*`). */
|
|
25
|
+
export type ContentsOption = "bare" | "body" | "body-dep" | "length" | "lines" | "sig" | "sub" | "sub-sanitize" | "trailers";
|
|
26
|
+
/** An atom of a format or sort key, parsed (git's `struct used_atom`). */
|
|
27
|
+
export interface UsedAtom {
|
|
28
|
+
type: AtomType;
|
|
29
|
+
/** The atom as written, `*` and arguments included */
|
|
30
|
+
name: string;
|
|
31
|
+
/** Dereferenced (`*name`): read from the object a tag peels to */
|
|
32
|
+
deref: boolean;
|
|
33
|
+
cmpType: AtomCmpType;
|
|
34
|
+
source: AtomSource;
|
|
35
|
+
refname?: RefnameOption;
|
|
36
|
+
remote?: {
|
|
37
|
+
option: "ref" | "track" | "trackshort" | "remotename" | "remoteref";
|
|
38
|
+
nobracket: boolean;
|
|
39
|
+
push: boolean;
|
|
40
|
+
pushRemote: boolean;
|
|
41
|
+
};
|
|
42
|
+
contents?: {
|
|
43
|
+
option: ContentsOption;
|
|
44
|
+
trailers?: TrailerFormatOptions;
|
|
45
|
+
lines?: number;
|
|
46
|
+
};
|
|
47
|
+
raw?: "bare" | "length";
|
|
48
|
+
oid?: {
|
|
49
|
+
option: "full" | "short" | "length";
|
|
50
|
+
length?: number;
|
|
51
|
+
};
|
|
52
|
+
objectsize?: "size" | "disk";
|
|
53
|
+
nameMailmap?: boolean;
|
|
54
|
+
email?: {
|
|
55
|
+
trim: boolean;
|
|
56
|
+
localpart: boolean;
|
|
57
|
+
mailmap: boolean;
|
|
58
|
+
};
|
|
59
|
+
signature?: string;
|
|
60
|
+
describe?: {
|
|
61
|
+
tags?: boolean;
|
|
62
|
+
abbrev?: number;
|
|
63
|
+
match: string[];
|
|
64
|
+
exclude: string[];
|
|
65
|
+
};
|
|
66
|
+
color?: string;
|
|
67
|
+
align?: {
|
|
68
|
+
position: "left" | "middle" | "right";
|
|
69
|
+
width: number;
|
|
70
|
+
};
|
|
71
|
+
ifThenElse?: {
|
|
72
|
+
cmp: "equal" | "unequal" | "none";
|
|
73
|
+
str?: string;
|
|
74
|
+
};
|
|
75
|
+
/** The committish of `%(ahead-behind:<x>)` / `%(is-base:<x>)` */
|
|
76
|
+
base?: string;
|
|
77
|
+
}
|
|
78
|
+
/** What an atom's parser needs of the format. */
|
|
79
|
+
export interface AtomParseContext {
|
|
80
|
+
/** Whether colors are shown (`--color`): `%(color:...)` is empty otherwise */
|
|
81
|
+
useColor: boolean;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* ref-filter.c's parse_ref_filter_atom for one atom (`text` is what stands between `%(` and
|
|
85
|
+
* `)`, the `*` included): the atom, or git's die message as a {@link RefFilterError}.
|
|
86
|
+
*/
|
|
87
|
+
export declare function parseAtom(text: string, context: AtomParseContext): UsedAtom;
|
|
88
|
+
//# sourceMappingURL=ref-atoms.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ref-atoms.d.ts","sourceRoot":"","sources":["../../../src/commands/ref-filter/ref-atoms.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3D,sDAAsD;AACtD,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,CAAC;AAClD,wDAAwD;AACxD,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,CAAC;AAEnD,6EAA6E;AAC7E,eAAO,MAAM,UAAU,YACrB,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,MAAM,EACN,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,MAAM,EACN,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,eA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