@statewalker/vcs-commands 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/add-command.d.ts +38 -0
- package/dist/commands/add-command.d.ts.map +1 -1
- package/dist/commands/am/am-command.d.ts +55 -1
- package/dist/commands/am/am-command.d.ts.map +1 -1
- package/dist/commands/am/index.d.ts +1 -0
- package/dist/commands/am/index.d.ts.map +1 -1
- package/dist/commands/am/mailsplit.d.ts +88 -0
- package/dist/commands/am/mailsplit.d.ts.map +1 -0
- package/dist/commands/apply/apply-command.d.ts.map +1 -1
- package/dist/commands/apply/apply-engine.d.ts.map +1 -1
- package/dist/commands/apply/apply-parse.d.ts.map +1 -1
- package/dist/commands/bisect/bisect-command.d.ts +2 -0
- package/dist/commands/bisect/bisect-command.d.ts.map +1 -1
- package/dist/commands/branch-command.d.ts +148 -18
- package/dist/commands/branch-command.d.ts.map +1 -1
- package/dist/commands/branch-info-command.d.ts +55 -0
- package/dist/commands/branch-info-command.d.ts.map +1 -0
- package/dist/commands/branch-tracking.d.ts +106 -17
- package/dist/commands/branch-tracking.d.ts.map +1 -1
- package/dist/commands/branch-upstream-command.d.ts +83 -0
- package/dist/commands/branch-upstream-command.d.ts.map +1 -0
- package/dist/commands/checkout-command.d.ts +19 -3
- package/dist/commands/checkout-command.d.ts.map +1 -1
- package/dist/commands/cherry-pick-command.d.ts +59 -0
- package/dist/commands/cherry-pick-command.d.ts.map +1 -1
- package/dist/commands/clean-command.d.ts +12 -0
- package/dist/commands/clean-command.d.ts.map +1 -1
- package/dist/commands/clone-command.d.ts.map +1 -1
- package/dist/commands/commit-command.d.ts +191 -5
- package/dist/commands/commit-command.d.ts.map +1 -1
- package/dist/commands/commit-reuse.d.ts +33 -0
- package/dist/commands/commit-reuse.d.ts.map +1 -0
- package/dist/commands/config-command.d.ts +236 -0
- package/dist/commands/config-command.d.ts.map +1 -0
- package/dist/commands/config-value-types.d.ts +91 -0
- package/dist/commands/config-value-types.d.ts.map +1 -0
- package/dist/commands/core-config.d.ts +20 -0
- package/dist/commands/core-config.d.ts.map +1 -1
- package/dist/commands/diff-color-config.d.ts +73 -0
- package/dist/commands/diff-color-config.d.ts.map +1 -0
- package/dist/commands/diff-command.d.ts +252 -5
- package/dist/commands/diff-command.d.ts.map +1 -1
- package/dist/commands/fetch-command.d.ts +20 -0
- package/dist/commands/fetch-command.d.ts.map +1 -1
- package/dist/commands/fmt-merge-msg-command.d.ts +124 -0
- package/dist/commands/fmt-merge-msg-command.d.ts.map +1 -0
- package/dist/commands/fork-point.d.ts +38 -0
- package/dist/commands/fork-point.d.ts.map +1 -0
- package/dist/commands/format-patch-command.d.ts +41 -1
- package/dist/commands/format-patch-command.d.ts.map +1 -1
- package/dist/commands/fsck/fetch-fsck.d.ts +51 -0
- package/dist/commands/fsck/fetch-fsck.d.ts.map +1 -1
- package/dist/commands/gc-command.d.ts +8 -0
- package/dist/commands/gc-command.d.ts.map +1 -1
- package/dist/commands/git-describe.d.ts +4 -0
- package/dist/commands/git-describe.d.ts.map +1 -1
- package/dist/commands/git-hooks.d.ts +35 -0
- package/dist/commands/git-hooks.d.ts.map +1 -1
- package/dist/commands/grep/grep-command.d.ts +210 -0
- package/dist/commands/grep/grep-command.d.ts.map +1 -0
- package/dist/commands/grep/grep-engine.d.ts +218 -0
- package/dist/commands/grep/grep-engine.d.ts.map +1 -0
- package/dist/commands/grep/index.d.ts +3 -0
- package/dist/commands/grep/index.d.ts.map +1 -0
- package/dist/commands/index-adder.d.ts +13 -2
- package/dist/commands/index-adder.d.ts.map +1 -1
- package/dist/commands/index.d.ts +26 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +3 -3
- package/dist/commands/interpret-trailers-command.d.ts +90 -0
- package/dist/commands/interpret-trailers-command.d.ts.map +1 -0
- package/dist/commands/local-transport.d.ts +36 -5
- package/dist/commands/local-transport.d.ts.map +1 -1
- package/dist/commands/log-command.d.ts +296 -11
- package/dist/commands/log-command.d.ts.map +1 -1
- package/dist/commands/log-graph.d.ts +26 -1
- package/dist/commands/log-graph.d.ts.map +1 -1
- package/dist/commands/log-output.d.ts +133 -5
- package/dist/commands/log-output.d.ts.map +1 -1
- package/dist/commands/ls-remote-command.d.ts +2 -0
- package/dist/commands/ls-remote-command.d.ts.map +1 -1
- package/dist/commands/mailmap.d.ts +30 -0
- package/dist/commands/mailmap.d.ts.map +1 -1
- package/dist/commands/merge-base-command.d.ts +60 -0
- package/dist/commands/merge-base-command.d.ts.map +1 -0
- package/dist/commands/merge-bases.d.ts +23 -0
- package/dist/commands/merge-bases.d.ts.map +1 -1
- package/dist/commands/merge-command.d.ts +96 -9
- package/dist/commands/merge-command.d.ts.map +1 -1
- package/dist/commands/merge-support.d.ts.map +1 -1
- package/dist/commands/mv-command.d.ts +4 -0
- package/dist/commands/mv-command.d.ts.map +1 -1
- package/dist/commands/name-rev.d.ts +48 -0
- package/dist/commands/name-rev.d.ts.map +1 -0
- package/dist/commands/notes-command.d.ts.map +1 -1
- package/dist/commands/pathspec-file.d.ts +39 -0
- package/dist/commands/pathspec-file.d.ts.map +1 -0
- package/dist/commands/pathspec.d.ts +3 -0
- package/dist/commands/pathspec.d.ts.map +1 -1
- package/dist/commands/pretty-format.d.ts +43 -3
- package/dist/commands/pretty-format.d.ts.map +1 -1
- package/dist/commands/promisor-remote.d.ts.map +1 -1
- package/dist/commands/pull-command.d.ts +10 -0
- package/dist/commands/pull-command.d.ts.map +1 -1
- package/dist/commands/push-command.d.ts +160 -9
- package/dist/commands/push-command.d.ts.map +1 -1
- package/dist/commands/read-tree-command.d.ts +6 -0
- package/dist/commands/read-tree-command.d.ts.map +1 -1
- package/dist/commands/rebase-command.d.ts +168 -6
- package/dist/commands/rebase-command.d.ts.map +1 -1
- package/dist/commands/ref-filter/for-each-ref-command.d.ts +121 -0
- package/dist/commands/ref-filter/for-each-ref-command.d.ts.map +1 -0
- package/dist/commands/ref-filter/index.d.ts +8 -0
- package/dist/commands/ref-filter/index.d.ts.map +1 -0
- package/dist/commands/ref-filter/ref-atoms.d.ts +88 -0
- package/dist/commands/ref-filter/ref-atoms.d.ts.map +1 -0
- package/dist/commands/ref-filter/ref-filter.d.ts +178 -0
- package/dist/commands/ref-filter/ref-filter.d.ts.map +1 -0
- package/dist/commands/ref-filter/ref-format.d.ts +222 -0
- package/dist/commands/ref-filter/ref-format.d.ts.map +1 -0
- package/dist/commands/ref-filter/ref-listing-command.d.ts +56 -0
- package/dist/commands/ref-filter/ref-listing-command.d.ts.map +1 -0
- package/dist/commands/ref-filter/ref-quote.d.ts +20 -0
- package/dist/commands/ref-filter/ref-quote.d.ts.map +1 -0
- package/dist/commands/ref-filter/version-compare.d.ts +20 -0
- package/dist/commands/ref-filter/version-compare.d.ts.map +1 -0
- package/dist/commands/reflog-command.d.ts +120 -0
- package/dist/commands/reflog-command.d.ts.map +1 -1
- package/dist/commands/reflog-walk.d.ts +72 -0
- package/dist/commands/reflog-walk.d.ts.map +1 -0
- package/dist/commands/remote-command.d.ts +138 -29
- package/dist/commands/remote-command.d.ts.map +1 -1
- package/dist/commands/remote-transport.d.ts +7 -1
- package/dist/commands/remote-transport.d.ts.map +1 -1
- package/dist/commands/reset-command.d.ts +2 -3
- package/dist/commands/reset-command.d.ts.map +1 -1
- package/dist/commands/restore-command.d.ts +2 -3
- package/dist/commands/restore-command.d.ts.map +1 -1
- package/dist/commands/rev-filter/commit-filter.d.ts +95 -0
- package/dist/commands/rev-filter/commit-filter.d.ts.map +1 -0
- package/dist/commands/rev-filter/commit-grep.d.ts +91 -0
- package/dist/commands/rev-filter/commit-grep.d.ts.map +1 -0
- package/dist/commands/rev-filter/index.d.ts +3 -0
- package/dist/commands/rev-filter/index.d.ts.map +1 -0
- package/dist/commands/rev-list-command.d.ts +154 -2
- package/dist/commands/rev-list-command.d.ts.map +1 -1
- package/dist/commands/revert-command.d.ts +32 -0
- package/dist/commands/revert-command.d.ts.map +1 -1
- package/dist/commands/revision-range.d.ts +32 -1
- package/dist/commands/revision-range.d.ts.map +1 -1
- package/dist/commands/revision-resolver.d.ts +15 -0
- package/dist/commands/revision-resolver.d.ts.map +1 -1
- package/dist/commands/rm-command.d.ts +70 -2
- package/dist/commands/rm-command.d.ts.map +1 -1
- package/dist/commands/sequencer-pick.d.ts +84 -4
- package/dist/commands/sequencer-pick.d.ts.map +1 -1
- package/dist/commands/sequencer-support.d.ts +2 -0
- package/dist/commands/sequencer-support.d.ts.map +1 -1
- package/dist/commands/serve-repository.d.ts +7 -0
- package/dist/commands/serve-repository.d.ts.map +1 -1
- package/dist/commands/show-command.d.ts +130 -0
- package/dist/commands/show-command.d.ts.map +1 -0
- package/dist/commands/show-commit.d.ts +11 -0
- package/dist/commands/show-commit.d.ts.map +1 -0
- package/dist/commands/signature-check.d.ts +164 -0
- package/dist/commands/signature-check.d.ts.map +1 -0
- package/dist/commands/signing.d.ts +160 -0
- package/dist/commands/signing.d.ts.map +1 -0
- package/dist/commands/sparse-checkout-command.d.ts.map +1 -1
- package/dist/commands/sparse-index-view.d.ts +45 -0
- package/dist/commands/sparse-index-view.d.ts.map +1 -0
- package/dist/commands/ssh-signer.d.ts +29 -0
- package/dist/commands/ssh-signer.d.ts.map +1 -0
- package/dist/commands/ssh-verifier.d.ts +42 -0
- package/dist/commands/ssh-verifier.d.ts.map +1 -0
- package/dist/commands/stash-apply-command.d.ts +5 -0
- package/dist/commands/stash-apply-command.d.ts.map +1 -1
- package/dist/commands/stash-branch-command.d.ts +34 -0
- package/dist/commands/stash-branch-command.d.ts.map +1 -0
- package/dist/commands/stash-create-command.d.ts +17 -0
- package/dist/commands/stash-create-command.d.ts.map +1 -1
- package/dist/commands/stash-info.d.ts +93 -0
- package/dist/commands/stash-info.d.ts.map +1 -0
- package/dist/commands/stash-list-command.d.ts +16 -0
- package/dist/commands/stash-list-command.d.ts.map +1 -1
- package/dist/commands/stash-pop-command.d.ts +39 -0
- package/dist/commands/stash-pop-command.d.ts.map +1 -0
- package/dist/commands/stash-show-command.d.ts +48 -0
- package/dist/commands/stash-show-command.d.ts.map +1 -0
- package/dist/commands/stash-store-command.d.ts +29 -0
- package/dist/commands/stash-store-command.d.ts.map +1 -0
- package/dist/commands/stash-working-tree.d.ts.map +1 -1
- package/dist/commands/status-command.d.ts.map +1 -1
- package/dist/commands/status-header.d.ts +5 -0
- package/dist/commands/status-header.d.ts.map +1 -1
- package/dist/commands/submodule-add-command.d.ts +89 -0
- package/dist/commands/submodule-add-command.d.ts.map +1 -0
- package/dist/commands/submodule-auth.d.ts +90 -0
- package/dist/commands/submodule-auth.d.ts.map +1 -0
- package/dist/commands/submodule-commands.d.ts +375 -0
- package/dist/commands/submodule-commands.d.ts.map +1 -0
- package/dist/commands/submodule-model.d.ts +288 -0
- package/dist/commands/submodule-model.d.ts.map +1 -0
- package/dist/commands/submodule-update-command.d.ts +198 -0
- package/dist/commands/submodule-update-command.d.ts.map +1 -0
- package/dist/commands/switch-command.d.ts.map +1 -1
- package/dist/commands/tag-command.d.ts +259 -10
- package/dist/commands/tag-command.d.ts.map +1 -1
- package/dist/commands/trailers.d.ts +218 -17
- package/dist/commands/trailers.d.ts.map +1 -1
- package/dist/commands/tree-restore.d.ts +7 -0
- package/dist/commands/tree-restore.d.ts.map +1 -1
- package/dist/commands/verify-command.d.ts +92 -0
- package/dist/commands/verify-command.d.ts.map +1 -0
- package/dist/commands/worktree-add-command.d.ts +79 -7
- package/dist/commands/worktree-add-command.d.ts.map +1 -1
- package/dist/commands/worktree-path-rules.d.ts +66 -0
- package/dist/commands/worktree-path-rules.d.ts.map +1 -0
- package/dist/commands/worktree-remove-command.d.ts +10 -3
- package/dist/commands/worktree-remove-command.d.ts.map +1 -1
- package/dist/commands/worktree-repair-command.d.ts +15 -2
- package/dist/commands/worktree-repair-command.d.ts.map +1 -1
- package/dist/commands/worktree-support.d.ts +5 -0
- package/dist/commands/worktree-support.d.ts.map +1 -1
- package/dist/{commands-DIJ91NnD.js → commands-ISM52N0n.js} +70736 -54492
- package/dist/errors/checkout-errors.d.ts +19 -0
- package/dist/errors/checkout-errors.d.ts.map +1 -1
- package/dist/errors/command-errors.d.ts.map +1 -1
- package/dist/errors/index.js +57 -3
- package/dist/errors/ref-errors.d.ts +19 -0
- package/dist/errors/ref-errors.d.ts.map +1 -1
- package/dist/errors/worktree-errors.d.ts +6 -1
- package/dist/errors/worktree-errors.d.ts.map +1 -1
- package/dist/{git-command-BGiOJ8Zk.js → fsck-DLRpbwTj.js} +6230 -71
- package/dist/git-command.d.ts +27 -1
- package/dist/git-command.d.ts.map +1 -1
- package/dist/git.d.ts +267 -1
- package/dist/git.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/remote-config/index.d.ts +1 -1
- package/dist/remote-config/index.d.ts.map +1 -1
- package/dist/remote-config/remote-config-store.d.ts +55 -0
- package/dist/remote-config/remote-config-store.d.ts.map +1 -1
- package/dist/results/combined-diff.d.ts +3 -0
- package/dist/results/combined-diff.d.ts.map +1 -1
- package/dist/results/diff-check.d.ts +38 -0
- package/dist/results/diff-check.d.ts.map +1 -0
- package/dist/results/diff-color.d.ts +135 -0
- package/dist/results/diff-color.d.ts.map +1 -0
- package/dist/results/diff-output.d.ts +85 -1
- package/dist/results/diff-output.d.ts.map +1 -1
- package/dist/results/diff-pickaxe.d.ts +67 -0
- package/dist/results/diff-pickaxe.d.ts.map +1 -0
- package/dist/results/diff-words.d.ts +55 -0
- package/dist/results/diff-words.d.ts.map +1 -0
- package/dist/results/index.d.ts +4 -0
- package/dist/results/index.d.ts.map +1 -1
- package/dist/results/index.js +2 -2
- package/dist/results/push-result.d.ts +7 -0
- package/dist/results/push-result.d.ts.map +1 -1
- package/dist/results/rebase-result.d.ts +2 -0
- package/dist/results/rebase-result.d.ts.map +1 -1
- package/dist/results/stash-result.d.ts +6 -0
- package/dist/results/stash-result.d.ts.map +1 -1
- package/dist/{results-WVlBhVb1.js → results-TB2IJ64h.js} +2168 -403
- package/dist/whitespace/index.d.ts +2 -0
- package/dist/whitespace/index.d.ts.map +1 -0
- package/dist/whitespace/whitespace-rule.d.ts +94 -0
- package/dist/whitespace/whitespace-rule.d.ts.map +1 -0
- package/package.json +12 -12
- package/src/commands/add-command.ts +178 -17
- package/src/commands/am/am-command.ts +262 -42
- package/src/commands/am/index.ts +1 -0
- package/src/commands/am/mailsplit.ts +326 -0
- package/src/commands/apply/apply-command.ts +6 -6
- package/src/commands/apply/apply-engine.ts +1 -1
- package/src/commands/apply/apply-parse.ts +7 -8
- package/src/commands/bisect/bisect-command.ts +18 -5
- package/src/commands/branch-command.ts +528 -53
- package/src/commands/branch-info-command.ts +150 -0
- package/src/commands/branch-tracking.ts +335 -60
- package/src/commands/branch-upstream-command.ts +218 -0
- package/src/commands/checkout-command.ts +69 -43
- package/src/commands/cherry-pick-command.ts +143 -0
- package/src/commands/clean-command.ts +34 -3
- package/src/commands/clone-command.ts +2 -1
- package/src/commands/commit-command.ts +782 -64
- package/src/commands/commit-reuse.ts +94 -0
- package/src/commands/config-command.ts +1256 -0
- package/src/commands/config-value-types.ts +358 -0
- package/src/commands/core-config.ts +40 -0
- package/src/commands/diff-color-config.ts +274 -0
- package/src/commands/diff-command.ts +1009 -49
- package/src/commands/fetch-command.ts +142 -8
- package/src/commands/fmt-merge-msg-command.ts +715 -0
- package/src/commands/fork-point.ts +63 -0
- package/src/commands/format-patch-command.ts +314 -46
- package/src/commands/fsck/fetch-fsck.ts +172 -18
- package/src/commands/gc-command.ts +31 -1
- package/src/commands/git-describe.ts +31 -11
- package/src/commands/git-hooks.ts +81 -0
- package/src/commands/grep/grep-command.ts +1077 -0
- package/src/commands/grep/grep-engine.ts +1024 -0
- package/src/commands/grep/index.ts +2 -0
- package/src/commands/index-adder.ts +46 -7
- package/src/commands/index.ts +26 -0
- package/src/commands/interpret-trailers-command.ts +256 -0
- package/src/commands/local-transport.ts +109 -10
- package/src/commands/log-command.ts +1246 -210
- package/src/commands/log-graph.ts +123 -26
- package/src/commands/log-output.ts +280 -21
- package/src/commands/ls-remote-command.ts +5 -0
- package/src/commands/mailmap.ts +119 -0
- package/src/commands/merge-base-command.ts +170 -0
- package/src/commands/merge-bases.ts +63 -8
- package/src/commands/merge-command.ts +330 -82
- package/src/commands/merge-support.ts +14 -1
- package/src/commands/mv-command.ts +6 -3
- package/src/commands/name-rev.ts +171 -0
- package/src/commands/notes-command.ts +11 -1
- package/src/commands/pathspec-file.ts +72 -0
- package/src/commands/pathspec.ts +14 -2
- package/src/commands/pretty-format.ts +103 -19
- package/src/commands/promisor-remote.ts +10 -1
- package/src/commands/pull-command.ts +26 -7
- package/src/commands/push-command.ts +682 -65
- package/src/commands/read-tree-command.ts +28 -1
- package/src/commands/rebase-command.ts +933 -129
- package/src/commands/ref-filter/for-each-ref-command.ts +298 -0
- package/src/commands/ref-filter/index.ts +7 -0
- package/src/commands/ref-filter/ref-atoms.ts +581 -0
- package/src/commands/ref-filter/ref-filter.ts +651 -0
- package/src/commands/ref-filter/ref-format.ts +1070 -0
- package/src/commands/ref-filter/ref-listing-command.ts +421 -0
- package/src/commands/ref-filter/ref-quote.ts +69 -0
- package/src/commands/ref-filter/version-compare.ts +177 -0
- package/src/commands/reflog-command.ts +492 -2
- package/src/commands/reflog-walk.ts +234 -0
- package/src/commands/remote-command.ts +449 -69
- package/src/commands/remote-transport.ts +9 -1
- package/src/commands/reset-command.ts +36 -31
- package/src/commands/restore-command.ts +12 -41
- package/src/commands/rev-filter/commit-filter.ts +159 -0
- package/src/commands/rev-filter/commit-grep.ts +444 -0
- package/src/commands/rev-filter/index.ts +2 -0
- package/src/commands/rev-list-command.ts +402 -15
- package/src/commands/revert-command.ts +82 -0
- package/src/commands/revision-range.ts +204 -4
- package/src/commands/revision-resolver.ts +23 -8
- package/src/commands/rm-command.ts +282 -21
- package/src/commands/sequencer-pick.ts +498 -85
- package/src/commands/sequencer-support.ts +20 -2
- package/src/commands/serve-repository.ts +18 -3
- package/src/commands/show-command.ts +490 -0
- package/src/commands/show-commit.ts +24 -0
- package/src/commands/signature-check.ts +657 -0
- package/src/commands/signing.ts +385 -0
- package/src/commands/sparse-checkout-command.ts +2 -9
- package/src/commands/sparse-checkout-support.ts +2 -2
- package/src/commands/sparse-index-view.ts +135 -0
- package/src/commands/ssh-signer.ts +199 -0
- package/src/commands/ssh-verifier.ts +523 -0
- package/src/commands/stash-apply-command.ts +16 -4
- package/src/commands/stash-branch-command.ts +88 -0
- package/src/commands/stash-create-command.ts +28 -0
- package/src/commands/stash-info.ts +243 -0
- package/src/commands/stash-list-command.ts +33 -0
- package/src/commands/stash-pop-command.ts +83 -0
- package/src/commands/stash-show-command.ts +141 -0
- package/src/commands/stash-store-command.ts +82 -0
- package/src/commands/stash-working-tree.ts +2 -2
- package/src/commands/status-command.ts +5 -2
- package/src/commands/status-header.ts +41 -7
- package/src/commands/submodule-add-command.ts +509 -0
- package/src/commands/submodule-auth.ts +276 -0
- package/src/commands/submodule-commands.ts +1517 -0
- package/src/commands/submodule-model.ts +930 -0
- package/src/commands/submodule-update-command.ts +1092 -0
- package/src/commands/switch-command.ts +3 -1
- package/src/commands/tag-command.ts +876 -64
- package/src/commands/trailers.ts +837 -100
- package/src/commands/tree-restore.ts +38 -10
- package/src/commands/verify-command.ts +235 -0
- package/src/commands/worktree-add-command.ts +268 -24
- package/src/commands/worktree-path-rules.ts +183 -0
- package/src/commands/worktree-remove-command.ts +39 -5
- package/src/commands/worktree-repair-command.ts +52 -5
- package/src/commands/worktree-support.ts +22 -1
- package/src/errors/checkout-errors.ts +29 -0
- package/src/errors/command-errors.ts +2 -1
- package/src/errors/ref-errors.ts +23 -0
- package/src/errors/worktree-errors.ts +8 -1
- package/src/git-command.ts +66 -1
- package/src/git.ts +404 -1
- package/src/remote-config/index.ts +2 -0
- package/src/remote-config/remote-config-store.ts +101 -0
- package/src/results/combined-diff.ts +38 -18
- package/src/results/diff-check.ts +185 -0
- package/src/results/diff-color.ts +868 -0
- package/src/results/diff-output.ts +195 -30
- package/src/results/diff-pickaxe.ts +304 -0
- package/src/results/diff-words.ts +395 -0
- package/src/results/index.ts +4 -0
- package/src/results/push-result.ts +7 -0
- package/src/results/rebase-result.ts +3 -0
- package/src/results/stash-result.ts +7 -0
- package/src/whitespace/index.ts +1 -0
- package/src/{commands/apply/whitespace.ts → whitespace/whitespace-rule.ts} +173 -23
- package/dist/commands/apply/whitespace.d.ts +0 -58
- package/dist/commands/apply/whitespace.d.ts.map +0 -1
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `git submodule init`, `deinit`, `sync`, `set-url`, `set-branch` and `foreach`
|
|
3
|
+
* (builtin/submodule--helper.c), over the submodule model of `submodule-model.ts`.
|
|
4
|
+
*
|
|
5
|
+
* Each command gives what git prints (`stdout`, `stderr`) and its exit status; where git dies
|
|
6
|
+
* (`fatal:`, exit 128; a usage error, 129) the command throws {@link SubmoduleCommandError},
|
|
7
|
+
* whose `result` holds what was printed before.
|
|
8
|
+
*/
|
|
9
|
+
import { type ObjectId } from "@statewalker/vcs-core";
|
|
10
|
+
import type { GitTransportRegistry } from "@statewalker/vcs-transport";
|
|
11
|
+
import { type FilesApi } from "@statewalker/vcs-utils/files";
|
|
12
|
+
import type { GitHostEnvironment, WorkingCopy } from "@statewalker/vcs-working-tree";
|
|
13
|
+
import { GitApiError } from "../errors/index.js";
|
|
14
|
+
import { GitCommand } from "../git-command.js";
|
|
15
|
+
import { SubmoduleModel, type SubmoduleSettings } from "./submodule-model.js";
|
|
16
|
+
/** How {@link SubmoduleCommandBase.cloneSubmodule} clones (submodule--helper's `clone`). */
|
|
17
|
+
export interface SubmoduleCloneOptions {
|
|
18
|
+
/** `--depth=<n>` */
|
|
19
|
+
depth?: number;
|
|
20
|
+
/** `--reference <repository>`s */
|
|
21
|
+
references?: string[];
|
|
22
|
+
/** `--require-init`: a non-empty directory at the path is refused */
|
|
23
|
+
requireInit?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* The transports and timeout the clone reaches its remote with. No credentials or headers
|
|
26
|
+
* are taken: a submodule's URL comes from the repository's content, so they are attached
|
|
27
|
+
* by the transports themselves, per URL and origin (`guardSubmoduleTransports`).
|
|
28
|
+
*/
|
|
29
|
+
transports?: GitTransportRegistry;
|
|
30
|
+
timeout?: number;
|
|
31
|
+
}
|
|
32
|
+
/** What a submodule command printed, and its exit status. */
|
|
33
|
+
export interface SubmoduleCommandResult {
|
|
34
|
+
stdout: string;
|
|
35
|
+
stderr: string;
|
|
36
|
+
/** 0, or 1 where git returns 1 without dying (a pathspec that matched nothing) */
|
|
37
|
+
exitCode: number;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* A submodule command died as git dies: `message` is git's last lines (`fatal: ...`, or
|
|
41
|
+
* `error: ...` and the usage), `result` what it printed before them.
|
|
42
|
+
*/
|
|
43
|
+
export declare class SubmoduleCommandError extends GitApiError {
|
|
44
|
+
readonly result: SubmoduleCommandResult;
|
|
45
|
+
constructor(message: string, result: SubmoduleCommandResult, exitCode?: number);
|
|
46
|
+
}
|
|
47
|
+
/** One gitlink of the index (submodule--helper.c's `module_list` entry). */
|
|
48
|
+
export interface SubmoduleListEntry {
|
|
49
|
+
path: string;
|
|
50
|
+
/** The commit the index records */
|
|
51
|
+
id: ObjectId;
|
|
52
|
+
/** The entry's stage (0 unless the path is unmerged: git lists its first gitlink stage) */
|
|
53
|
+
stage: number;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The variables git clears for a submodule's child process (`local_repo_env`, config kept).
|
|
57
|
+
*
|
|
58
|
+
* @internal
|
|
59
|
+
*/
|
|
60
|
+
export declare const SUBMODULE_UNSET_ENV: string[];
|
|
61
|
+
/** git's `sq_quote_buf`: `'...'`, a `'` or `!` inside written as `'\''` / `'\!'`. */
|
|
62
|
+
export declare function shellQuote(text: string): string;
|
|
63
|
+
/**
|
|
64
|
+
* The parts every submodule command shares: output, the index's gitlinks, the model.
|
|
65
|
+
*
|
|
66
|
+
* @internal
|
|
67
|
+
*/
|
|
68
|
+
export declare abstract class SubmoduleCommandBase extends GitCommand<SubmoduleCommandResult> {
|
|
69
|
+
protected quiet: boolean;
|
|
70
|
+
protected superPrefix: string;
|
|
71
|
+
protected compatibility: "2.43" | "2.56";
|
|
72
|
+
protected out: SubmoduleCommandResult;
|
|
73
|
+
private modelLoad?;
|
|
74
|
+
/** The `.gitmodules` warnings were printed already (by a command run before this one) */
|
|
75
|
+
protected modelWarningsShown: boolean;
|
|
76
|
+
/** `-q` / `--quiet`: leave out the progress lines. */
|
|
77
|
+
setQuiet(quiet: boolean): this;
|
|
78
|
+
/**
|
|
79
|
+
* The git version whose behaviour is reproduced where versions differ (default 2.56):
|
|
80
|
+
* `sync` looks up a submodule's remote by its URL first in 2.5x only.
|
|
81
|
+
*/
|
|
82
|
+
setCompatibility(version: "2.43" | "2.56"): this;
|
|
83
|
+
/** @internal git's `--super-prefix`: what nested submodules' display paths start with. */
|
|
84
|
+
setSuperPrefix(prefix: string): this;
|
|
85
|
+
/** git's `validate_submodule_path`: dies (its `error:` line, exit 128) on a symlinked path. */
|
|
86
|
+
protected validatePath(path: string): Promise<void>;
|
|
87
|
+
protected displayPath(path: string): string;
|
|
88
|
+
/** Dies as git does: what was printed so far, then `message`. */
|
|
89
|
+
protected die(message: string, exitCode?: number): never;
|
|
90
|
+
/** The submodule model, read (and its warnings printed) when first asked for. */
|
|
91
|
+
protected model(): Promise<SubmoduleModel>;
|
|
92
|
+
/** Reads `.gitmodules` again on the next {@link model} (`repo_read_gitmodules`). */
|
|
93
|
+
protected forgetModel(): void;
|
|
94
|
+
/**
|
|
95
|
+
* git's `module_list_compute`: the index's gitlinks matching the pathspec, each once, in
|
|
96
|
+
* index order; a pathspec element matching nothing (whatever it matched: files count)
|
|
97
|
+
* gives git's error and exit status 1, and an empty list.
|
|
98
|
+
*/
|
|
99
|
+
protected moduleList(paths: readonly string[]): Promise<SubmoduleListEntry[] | undefined>;
|
|
100
|
+
/** `git config <key> <value>` in the repository's own file (`repo_config_set_gently`). */
|
|
101
|
+
protected setConfig(key: string, value: string): Promise<void>;
|
|
102
|
+
/** The FilesApi path of a worktree path. */
|
|
103
|
+
protected filesPath(path: string): string;
|
|
104
|
+
protected kindOf(path: string): Promise<string | undefined>;
|
|
105
|
+
/** git's `stat(2)` kind of a worktree path: symbolic links on the way followed. */
|
|
106
|
+
protected kindThroughLinks(path: string): Promise<string | undefined>;
|
|
107
|
+
/** git's `config_set_in_gitmodules_file_gently` (`value` undefined unsets). */
|
|
108
|
+
protected setInGitmodules(key: string, value: string | undefined): Promise<boolean>;
|
|
109
|
+
/** The working copy of the populated submodule at `path`, undefined when not populated. */
|
|
110
|
+
protected openSubmodule(path: string): Promise<WorkingCopy | undefined>;
|
|
111
|
+
/**
|
|
112
|
+
* submodule--helper.c's `sync_submodule`: an active submodule's URL registered again from
|
|
113
|
+
* `.gitmodules` (resolved against the superproject's remote), and, when it is populated,
|
|
114
|
+
* written to the submodule's default remote (resolved from the submodule's place).
|
|
115
|
+
*/
|
|
116
|
+
protected syncSubmodule(path: string, recursive: boolean): Promise<void>;
|
|
117
|
+
/**
|
|
118
|
+
* submodule--helper.c's `get_default_remote_submodule`: in git 2.5x the submodule's
|
|
119
|
+
* remote whose URL is the one `.gitmodules` gives, else (and always in 2.43) its default
|
|
120
|
+
* remote.
|
|
121
|
+
*/
|
|
122
|
+
protected defaultRemoteOfSubmodule(sub: SubmoduleSettings, inner: WorkingCopy): Promise<string>;
|
|
123
|
+
/**
|
|
124
|
+
* submodule--helper.c's `create_default_gitdir_config`: the first of git's candidates for
|
|
125
|
+
* the submodule's git directory that no other submodule's `gitdir` names (the plain name,
|
|
126
|
+
* then its RFC 3986 encodings, with a digit appended, then the hash of the name) written to
|
|
127
|
+
* `submodule.<name>.gitdir`, unless that is set.
|
|
128
|
+
*/
|
|
129
|
+
protected createDefaultGitdirConfig(name: string): Promise<void>;
|
|
130
|
+
/**
|
|
131
|
+
* submodule--helper.c's `clone_submodule`: `git clone --no-checkout --separate-git-dir
|
|
132
|
+
* <gitdir> -- <url> <path>` with `GIT_PROTOCOL_FROM_USER=0` (or, with the git directory
|
|
133
|
+
* kept, its index dropped), then `connect_work_tree_and_git_dir`.
|
|
134
|
+
*/
|
|
135
|
+
protected cloneSubmodule(path: string, realrepo: string, gitDir: string, gitFiles: FilesApi, kept: boolean, options?: SubmoduleCloneOptions): Promise<void>;
|
|
136
|
+
/**
|
|
137
|
+
* submodule.c's `absorb_git_dir_into_superproject`: the submodule at `path` whose
|
|
138
|
+
* repository is a `.git` directory in its worktree gets it moved into the superproject's
|
|
139
|
+
* git directory (`.git/modules/<name>`, or `submodule.<name>.gitdir` under
|
|
140
|
+
* `extensions.submodulePathConfig`) and a gitfile in its place; one whose gitfile names no
|
|
141
|
+
* repository (its superproject's git directory moved under it) is connected again to
|
|
142
|
+
* where the repository now lives; nothing for one not populated. Then the same in its own
|
|
143
|
+
* submodules (`--super-prefix=<path>/`), as git's child `submodule--helper absorbgitdirs`.
|
|
144
|
+
*/
|
|
145
|
+
protected absorbGitDirIntoSuperproject(path: string): Promise<void>;
|
|
146
|
+
private filesOrFail;
|
|
147
|
+
/**
|
|
148
|
+
* submodule.c's `relocate_single_git_dir_into_superproject`: the `.git` directory moved
|
|
149
|
+
* (git's `rename`, its result checked before anything else changes) to the submodule's
|
|
150
|
+
* place in the superproject's git directory, then the gitfile written and `core.worktree`
|
|
151
|
+
* set (`connect_work_tree_and_git_dir`). A gitfile needs no migration.
|
|
152
|
+
*/
|
|
153
|
+
private relocateSingleGitDir;
|
|
154
|
+
/** `submodule_name_to_gitdir`, its deaths (and 2.43's refusal to move) as git's. */
|
|
155
|
+
private submoduleGitDir;
|
|
156
|
+
/**
|
|
157
|
+
* dir.c's `connect_work_tree_and_git_dir` (no nested ones): the gitfile at `<path>/.git`
|
|
158
|
+
* naming `gitDir` relative to the worktree, then `core.worktree` in `<gitDir>/config`
|
|
159
|
+
* naming the worktree relative to it (the directory created when missing, as git's
|
|
160
|
+
* `safe_create_leading_directories` of the config file).
|
|
161
|
+
*/
|
|
162
|
+
protected connectWorkTreeAndGitDir(path: string, gitDir: string): Promise<void>;
|
|
163
|
+
/** git's child `submodule--helper absorbgitdirs --super-prefix=<prefix><path>/` there. */
|
|
164
|
+
private absorbNested;
|
|
165
|
+
/**
|
|
166
|
+
* setup.c's `resolve_gitdir_gently` of `<path>/.git`: a `.git` directory that is a
|
|
167
|
+
* repository, else what `read_gitfile_gently` makes of it (the repository a gitfile names,
|
|
168
|
+
* `gitDir` null when it lies beyond this FilesApi, or git's error code).
|
|
169
|
+
*/
|
|
170
|
+
private resolveGitdirGently;
|
|
171
|
+
/**
|
|
172
|
+
* worktree.c's `submodule_uses_worktrees`: whether the submodule's common git directory
|
|
173
|
+
* (its `commondir`) has anything in `worktrees/`.
|
|
174
|
+
*/
|
|
175
|
+
private usesWorktrees;
|
|
176
|
+
/** git's `real_pathdup` of a FilesApi path: its host path, links resolved where possible. */
|
|
177
|
+
private realHostPath;
|
|
178
|
+
protected append(result: SubmoduleCommandResult): void;
|
|
179
|
+
protected start(): void;
|
|
180
|
+
protected finish(): SubmoduleCommandResult;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* `git submodule init [-q] [<path>...]`: each submodule of the index (matching the paths)
|
|
184
|
+
* registered in `.git/config` from `.gitmodules`: `submodule.<name>.active` unless already
|
|
185
|
+
* active, its URL (a relative one resolved against the superproject's default remote, else
|
|
186
|
+
* its own directory with git's warning) unless one is registered, its update strategy unless
|
|
187
|
+
* one is set, and under `extensions.submodulePathConfig` its `submodule.<name>.gitdir`. With
|
|
188
|
+
* no paths and `submodule.active` set, only the active submodules.
|
|
189
|
+
*
|
|
190
|
+
* @example
|
|
191
|
+
* ```typescript
|
|
192
|
+
* const { stderr } = await git.submoduleInit().call();
|
|
193
|
+
* // "Submodule 'lib' (https://example.com/lib) registered for path 'lib'\n"
|
|
194
|
+
* ```
|
|
195
|
+
*/
|
|
196
|
+
export declare class SubmoduleInitCommand extends SubmoduleCommandBase {
|
|
197
|
+
private readonly paths;
|
|
198
|
+
/** A path (pathspec element) limiting the submodules. */
|
|
199
|
+
addPath(path: string): this;
|
|
200
|
+
call(): Promise<SubmoduleCommandResult>;
|
|
201
|
+
private initSubmodule;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* `git submodule deinit [-q] [-f] (--all | <path>...)`: each submodule's worktree emptied
|
|
205
|
+
* (a `.git` directory first absorbed into `.git/modules/<name>`, local changes refused
|
|
206
|
+
* without `-f` as `git rm -n` refuses them), its repository's `core.worktree` unset, an empty
|
|
207
|
+
* directory left, and its `submodule.<name>` section removed from `.git/config`.
|
|
208
|
+
*
|
|
209
|
+
* @example
|
|
210
|
+
* ```typescript
|
|
211
|
+
* const { stdout } = await git.submoduleDeinit().addPath("lib").call();
|
|
212
|
+
* // "Cleared directory 'lib'\nSubmodule 'lib' (../lib) unregistered for path 'lib'\n"
|
|
213
|
+
* ```
|
|
214
|
+
*/
|
|
215
|
+
export declare class SubmoduleDeinitCommand extends SubmoduleCommandBase {
|
|
216
|
+
private readonly paths;
|
|
217
|
+
private force;
|
|
218
|
+
private all;
|
|
219
|
+
/** A path (pathspec element) naming the submodules to deinitialize. */
|
|
220
|
+
addPath(path: string): this;
|
|
221
|
+
/** `-f`: remove the worktrees even with local changes. */
|
|
222
|
+
setForce(force: boolean): this;
|
|
223
|
+
/** `--all`: every submodule (no path may be given). */
|
|
224
|
+
setAll(all: boolean): this;
|
|
225
|
+
call(): Promise<SubmoduleCommandResult>;
|
|
226
|
+
private deinitSubmodule;
|
|
227
|
+
/**
|
|
228
|
+
* Whether the configuration holds a `submodule.<name>.*` variable (git runs `git config
|
|
229
|
+
* --get-regexp 'submodule.<name>\.'`; the name is compared as a string, never compiled
|
|
230
|
+
* into a pattern: a name from `.gitmodules` is untrusted).
|
|
231
|
+
*/
|
|
232
|
+
private registered;
|
|
233
|
+
/** submodule.c's `submodule_unset_core_worktree`. */
|
|
234
|
+
private unsetCoreWorktree;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* `git submodule absorbgitdirs [-q] [<path>...]` (submodule--helper's `absorbgitdirs`): each
|
|
238
|
+
* submodule of the index (matching the paths) whose repository is a `.git` directory in its
|
|
239
|
+
* worktree gets it moved into the superproject's git directory (`.git/modules/<name>`, or
|
|
240
|
+
* `submodule.<name>.gitdir` under `extensions.submodulePathConfig`), a gitfile and
|
|
241
|
+
* `core.worktree` linking the two, then the same for its own submodules, at every depth.
|
|
242
|
+
* git prints each move on stderr whatever `-q` says.
|
|
243
|
+
*
|
|
244
|
+
* @example
|
|
245
|
+
* ```typescript
|
|
246
|
+
* const { stderr } = await git.submoduleAbsorbGitDirs().call();
|
|
247
|
+
* // "Migrating git directory of 'lib' from\n'/w/sup/lib/.git' to\n'/w/sup/.git/modules/lib'\n"
|
|
248
|
+
* ```
|
|
249
|
+
*/
|
|
250
|
+
export declare class SubmoduleAbsorbGitDirsCommand extends SubmoduleCommandBase {
|
|
251
|
+
private readonly paths;
|
|
252
|
+
/** A path (pathspec element) limiting the submodules. */
|
|
253
|
+
addPath(path: string): this;
|
|
254
|
+
call(): Promise<SubmoduleCommandResult>;
|
|
255
|
+
/**
|
|
256
|
+
* @internal `absorb_git_dir_into_superproject` of the submodule at `path` alone (no
|
|
257
|
+
* pathspec, no module list), as `git rm` runs it before removing a submodule.
|
|
258
|
+
*/
|
|
259
|
+
callForPath(path: string): Promise<SubmoduleCommandResult>;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* `git submodule sync [-q] [--recursive] [<path>...]`: each active submodule's URL
|
|
263
|
+
* registered again in `.git/config` from `.gitmodules`, and written to the default remote of
|
|
264
|
+
* a populated submodule (a relative URL resolved from the submodule's own place; in git 2.5x
|
|
265
|
+
* the remote already naming that URL first). `--recursive` goes on in each populated
|
|
266
|
+
* submodule's own submodules.
|
|
267
|
+
*
|
|
268
|
+
* @example
|
|
269
|
+
* ```typescript
|
|
270
|
+
* const { stdout } = await git.submoduleSync().setRecursive(true).call();
|
|
271
|
+
* // "Synchronizing submodule url for 'lib'\nSynchronizing submodule url for 'lib/nested'\n"
|
|
272
|
+
* ```
|
|
273
|
+
*/
|
|
274
|
+
export declare class SubmoduleSyncCommand extends SubmoduleCommandBase {
|
|
275
|
+
private readonly paths;
|
|
276
|
+
private recursive;
|
|
277
|
+
/** A path (pathspec element) limiting the submodules. */
|
|
278
|
+
addPath(path: string): this;
|
|
279
|
+
/** `--recursive`: sync nested submodules too. */
|
|
280
|
+
setRecursive(recursive: boolean): this;
|
|
281
|
+
call(): Promise<SubmoduleCommandResult>;
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* `git submodule set-url [-q] <path> <newurl>`: the submodule's `url` in `.gitmodules` set
|
|
285
|
+
* (the file is not staged), then synced as `git submodule sync` does.
|
|
286
|
+
*
|
|
287
|
+
* @example
|
|
288
|
+
* ```typescript
|
|
289
|
+
* await git.submoduleSetUrl().setPath("lib").setUrl("../new-lib").call();
|
|
290
|
+
* ```
|
|
291
|
+
*/
|
|
292
|
+
export declare class SubmoduleSetUrlCommand extends SubmoduleCommandBase {
|
|
293
|
+
private path?;
|
|
294
|
+
private url?;
|
|
295
|
+
setPath(path: string): this;
|
|
296
|
+
setUrl(url: string): this;
|
|
297
|
+
call(): Promise<SubmoduleCommandResult>;
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* `git submodule set-branch (-b <branch> | -d) <path>`: the submodule's `branch` in
|
|
301
|
+
* `.gitmodules` set, or removed with `-d` (exit status 1 when there was none).
|
|
302
|
+
*
|
|
303
|
+
* @example
|
|
304
|
+
* ```typescript
|
|
305
|
+
* await git.submoduleSetBranch().setPath("lib").setBranch("stable").call();
|
|
306
|
+
* ```
|
|
307
|
+
*/
|
|
308
|
+
export declare class SubmoduleSetBranchCommand extends SubmoduleCommandBase {
|
|
309
|
+
private path?;
|
|
310
|
+
private branch?;
|
|
311
|
+
private useDefault;
|
|
312
|
+
setPath(path: string): this;
|
|
313
|
+
/** `-b <branch>`. */
|
|
314
|
+
setBranch(branch: string): this;
|
|
315
|
+
/** `-d`: back to the default (the setting removed). */
|
|
316
|
+
setDefault(useDefault: boolean): this;
|
|
317
|
+
call(): Promise<SubmoduleCommandResult>;
|
|
318
|
+
}
|
|
319
|
+
/** What a {@link SubmoduleForeachCommand} callback is given (git's variables). */
|
|
320
|
+
export interface SubmoduleForeachContext {
|
|
321
|
+
/** `$name`: the submodule's name in `.gitmodules` */
|
|
322
|
+
name: string;
|
|
323
|
+
/** `$sm_path`: its path in the superproject running the command */
|
|
324
|
+
path: string;
|
|
325
|
+
/** `$displaypath`: its path from the top superproject */
|
|
326
|
+
displayPath: string;
|
|
327
|
+
/** `$sha1`: the commit the superproject's index records */
|
|
328
|
+
sha1: ObjectId;
|
|
329
|
+
/** `$toplevel`: the host path of the superproject running the command */
|
|
330
|
+
toplevel: string | undefined;
|
|
331
|
+
/** The submodule's working copy */
|
|
332
|
+
workingCopy: WorkingCopy;
|
|
333
|
+
}
|
|
334
|
+
/** A callback run in each submodule in place of a command. */
|
|
335
|
+
export type SubmoduleForeachCallback = (context: SubmoduleForeachContext) => Promise<SubmoduleForeachOutcome | undefined | void>;
|
|
336
|
+
/** What a callback reports back: a non-zero `exitCode` stops the walk as git dies. */
|
|
337
|
+
export interface SubmoduleForeachOutcome {
|
|
338
|
+
exitCode?: number;
|
|
339
|
+
stdout?: string;
|
|
340
|
+
stderr?: string;
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* `git submodule foreach [-q] [--recursive] <command>`: in each populated submodule (index
|
|
344
|
+
* order), `Entering '<displaypath>'` and the command, run through the host's command runner
|
|
345
|
+
* (`GitHostEnvironment.hookRunner`) as git runs it: one argument through the shell with
|
|
346
|
+
* `$name`, `$sm_path`, `$displaypath`, `$sha1`, `$toplevel` (and `$path`) set, several as
|
|
347
|
+
* an argument list; `GIT_DIR=.git` and the repository variables cleared. A callback may take
|
|
348
|
+
* the command's place. A command that fails stops the walk (git's "run_command returned
|
|
349
|
+
* non-zero status"); `--recursive` runs it in nested submodules after their parent.
|
|
350
|
+
*
|
|
351
|
+
* @example
|
|
352
|
+
* ```typescript
|
|
353
|
+
* await git.submoduleForeach().setCommand(["git pull"]).call();
|
|
354
|
+
* await git.submoduleForeach().setCallback(async ({ name, sha1 }) => {
|
|
355
|
+
* console.log(name, sha1);
|
|
356
|
+
* }).call();
|
|
357
|
+
* ```
|
|
358
|
+
*/
|
|
359
|
+
export declare class SubmoduleForeachCommand extends SubmoduleCommandBase {
|
|
360
|
+
private command;
|
|
361
|
+
private callback?;
|
|
362
|
+
private recursive;
|
|
363
|
+
/** The command and its arguments (git's `<command>...`). */
|
|
364
|
+
setCommand(command: string[]): this;
|
|
365
|
+
/** A callback run in place of a command. */
|
|
366
|
+
setCallback(callback: SubmoduleForeachCallback): this;
|
|
367
|
+
/** `--recursive`: nested submodules too. */
|
|
368
|
+
setRecursive(recursive: boolean): this;
|
|
369
|
+
call(): Promise<SubmoduleCommandResult>;
|
|
370
|
+
/** The command in the submodule, through the host's runner; its exit status. */
|
|
371
|
+
private runCommand;
|
|
372
|
+
}
|
|
373
|
+
/** The environment with `GIT_PROTOCOL_FROM_USER=0` (git-submodule.sh exports it). */
|
|
374
|
+
export declare function notFromUser(environment: GitHostEnvironment): GitHostEnvironment;
|
|
375
|
+
//# sourceMappingURL=submodule-commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"submodule-commands.d.ts","sourceRoot":"","sources":["../../src/commands/submodule-commands.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAY,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,OAAO,EAAE,KAAK,QAAQ,EAAgC,MAAM,8BAA8B,CAAC;AAE3F,OAAO,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAErF,OAA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