@statewalker/vcs-commands 0.6.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/add-command.d.ts +38 -0
- package/dist/commands/add-command.d.ts.map +1 -1
- package/dist/commands/am/am-command.d.ts +55 -1
- package/dist/commands/am/am-command.d.ts.map +1 -1
- package/dist/commands/am/index.d.ts +1 -0
- package/dist/commands/am/index.d.ts.map +1 -1
- package/dist/commands/am/mailsplit.d.ts +88 -0
- package/dist/commands/am/mailsplit.d.ts.map +1 -0
- package/dist/commands/apply/apply-command.d.ts.map +1 -1
- package/dist/commands/apply/apply-engine.d.ts.map +1 -1
- package/dist/commands/apply/apply-parse.d.ts.map +1 -1
- package/dist/commands/bisect/bisect-command.d.ts +2 -0
- package/dist/commands/bisect/bisect-command.d.ts.map +1 -1
- package/dist/commands/bisect/bisect-engine.d.ts.map +1 -1
- package/dist/commands/branch-command.d.ts +148 -18
- package/dist/commands/branch-command.d.ts.map +1 -1
- package/dist/commands/branch-info-command.d.ts +55 -0
- package/dist/commands/branch-info-command.d.ts.map +1 -0
- package/dist/commands/branch-tracking.d.ts +106 -17
- package/dist/commands/branch-tracking.d.ts.map +1 -1
- package/dist/commands/branch-upstream-command.d.ts +83 -0
- package/dist/commands/branch-upstream-command.d.ts.map +1 -0
- package/dist/commands/checkout-command.d.ts +19 -3
- package/dist/commands/checkout-command.d.ts.map +1 -1
- package/dist/commands/cherry-pick-command.d.ts +59 -0
- package/dist/commands/cherry-pick-command.d.ts.map +1 -1
- package/dist/commands/clean-command.d.ts +12 -0
- package/dist/commands/clean-command.d.ts.map +1 -1
- package/dist/commands/clone-command.d.ts +17 -0
- package/dist/commands/clone-command.d.ts.map +1 -1
- package/dist/commands/comment-char-config.d.ts +35 -0
- package/dist/commands/comment-char-config.d.ts.map +1 -0
- package/dist/commands/commit-command.d.ts +191 -5
- package/dist/commands/commit-command.d.ts.map +1 -1
- package/dist/commands/commit-reuse.d.ts +33 -0
- package/dist/commands/commit-reuse.d.ts.map +1 -0
- package/dist/commands/config-command.d.ts +236 -0
- package/dist/commands/config-command.d.ts.map +1 -0
- package/dist/commands/config-value-types.d.ts +91 -0
- package/dist/commands/config-value-types.d.ts.map +1 -0
- package/dist/commands/core-config.d.ts +20 -0
- package/dist/commands/core-config.d.ts.map +1 -1
- package/dist/commands/default-branch.d.ts +70 -0
- package/dist/commands/default-branch.d.ts.map +1 -0
- package/dist/commands/diff-color-config.d.ts +73 -0
- package/dist/commands/diff-color-config.d.ts.map +1 -0
- package/dist/commands/diff-command.d.ts +252 -5
- package/dist/commands/diff-command.d.ts.map +1 -1
- package/dist/commands/fetch-command.d.ts +20 -0
- package/dist/commands/fetch-command.d.ts.map +1 -1
- package/dist/commands/fmt-merge-msg-command.d.ts +124 -0
- package/dist/commands/fmt-merge-msg-command.d.ts.map +1 -0
- package/dist/commands/fork-point.d.ts +38 -0
- package/dist/commands/fork-point.d.ts.map +1 -0
- package/dist/commands/format-patch-command.d.ts +41 -1
- package/dist/commands/format-patch-command.d.ts.map +1 -1
- package/dist/commands/fsck/fetch-fsck.d.ts +51 -0
- package/dist/commands/fsck/fetch-fsck.d.ts.map +1 -1
- package/dist/commands/fsck/fsck-command.d.ts +2 -0
- package/dist/commands/fsck/fsck-command.d.ts.map +1 -1
- package/dist/commands/fsck/fsck-loose.d.ts +3 -0
- package/dist/commands/fsck/fsck-loose.d.ts.map +1 -1
- package/dist/commands/fsck/fsck-object-checks.d.ts +25 -14
- package/dist/commands/fsck/fsck-object-checks.d.ts.map +1 -1
- package/dist/commands/fsck/fsck-object-table.d.ts +15 -7
- package/dist/commands/fsck/fsck-object-table.d.ts.map +1 -1
- package/dist/commands/fsck/fsck-pack.d.ts +11 -4
- package/dist/commands/fsck/fsck-pack.d.ts.map +1 -1
- package/dist/commands/fsck/verify-pack-command.d.ts.map +1 -1
- package/dist/commands/gc-command.d.ts +80 -48
- package/dist/commands/gc-command.d.ts.map +1 -1
- package/dist/commands/git-date.d.ts +1 -65
- package/dist/commands/git-date.d.ts.map +1 -1
- package/dist/commands/git-describe.d.ts +4 -0
- package/dist/commands/git-describe.d.ts.map +1 -1
- package/dist/commands/git-hooks.d.ts +43 -0
- package/dist/commands/git-hooks.d.ts.map +1 -1
- package/dist/commands/grep/grep-command.d.ts +210 -0
- package/dist/commands/grep/grep-command.d.ts.map +1 -0
- package/dist/commands/grep/grep-engine.d.ts +218 -0
- package/dist/commands/grep/grep-engine.d.ts.map +1 -0
- package/dist/commands/grep/index.d.ts +3 -0
- package/dist/commands/grep/index.d.ts.map +1 -0
- package/dist/commands/index-adder.d.ts +15 -2
- package/dist/commands/index-adder.d.ts.map +1 -1
- package/dist/commands/index.d.ts +28 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +3 -3
- package/dist/commands/init-command.d.ts +50 -3
- package/dist/commands/init-command.d.ts.map +1 -1
- package/dist/commands/interpret-trailers-command.d.ts +90 -0
- package/dist/commands/interpret-trailers-command.d.ts.map +1 -0
- package/dist/commands/legacy-remotes.d.ts +55 -0
- package/dist/commands/legacy-remotes.d.ts.map +1 -0
- package/dist/commands/local-transport.d.ts +36 -5
- package/dist/commands/local-transport.d.ts.map +1 -1
- package/dist/commands/log-command.d.ts +296 -11
- package/dist/commands/log-command.d.ts.map +1 -1
- package/dist/commands/log-graph.d.ts +26 -1
- package/dist/commands/log-graph.d.ts.map +1 -1
- package/dist/commands/log-output.d.ts +133 -5
- package/dist/commands/log-output.d.ts.map +1 -1
- package/dist/commands/ls-remote-command.d.ts +2 -0
- package/dist/commands/ls-remote-command.d.ts.map +1 -1
- package/dist/commands/mailmap.d.ts +30 -0
- package/dist/commands/mailmap.d.ts.map +1 -1
- package/dist/commands/merge-base-command.d.ts +60 -0
- package/dist/commands/merge-base-command.d.ts.map +1 -0
- package/dist/commands/merge-bases.d.ts +23 -0
- package/dist/commands/merge-bases.d.ts.map +1 -1
- package/dist/commands/merge-command.d.ts +108 -9
- package/dist/commands/merge-command.d.ts.map +1 -1
- package/dist/commands/merge-support.d.ts +11 -3
- package/dist/commands/merge-support.d.ts.map +1 -1
- package/dist/commands/mv-command.d.ts +4 -0
- package/dist/commands/mv-command.d.ts.map +1 -1
- package/dist/commands/name-rev.d.ts +48 -0
- package/dist/commands/name-rev.d.ts.map +1 -0
- package/dist/commands/notes-command.d.ts.map +1 -1
- package/dist/commands/notes-merge-command.d.ts.map +1 -1
- package/dist/commands/notes-tree.d.ts +11 -1
- package/dist/commands/notes-tree.d.ts.map +1 -1
- package/dist/commands/patch-id.d.ts +3 -0
- package/dist/commands/patch-id.d.ts.map +1 -1
- package/dist/commands/pathspec-file.d.ts +39 -0
- package/dist/commands/pathspec-file.d.ts.map +1 -0
- package/dist/commands/pathspec.d.ts +3 -0
- package/dist/commands/pathspec.d.ts.map +1 -1
- package/dist/commands/pretty-format.d.ts +43 -3
- package/dist/commands/pretty-format.d.ts.map +1 -1
- package/dist/commands/promisor-remote.d.ts.map +1 -1
- package/dist/commands/pull-command.d.ts +28 -0
- package/dist/commands/pull-command.d.ts.map +1 -1
- package/dist/commands/push-command.d.ts +160 -9
- package/dist/commands/push-command.d.ts.map +1 -1
- package/dist/commands/read-tree-command.d.ts +6 -0
- package/dist/commands/read-tree-command.d.ts.map +1 -1
- package/dist/commands/rebase-command.d.ts +168 -6
- package/dist/commands/rebase-command.d.ts.map +1 -1
- package/dist/commands/ref-filter/for-each-ref-command.d.ts +121 -0
- package/dist/commands/ref-filter/for-each-ref-command.d.ts.map +1 -0
- package/dist/commands/ref-filter/index.d.ts +8 -0
- package/dist/commands/ref-filter/index.d.ts.map +1 -0
- package/dist/commands/ref-filter/ref-atoms.d.ts +88 -0
- package/dist/commands/ref-filter/ref-atoms.d.ts.map +1 -0
- package/dist/commands/ref-filter/ref-filter.d.ts +178 -0
- package/dist/commands/ref-filter/ref-filter.d.ts.map +1 -0
- package/dist/commands/ref-filter/ref-format.d.ts +222 -0
- package/dist/commands/ref-filter/ref-format.d.ts.map +1 -0
- package/dist/commands/ref-filter/ref-listing-command.d.ts +56 -0
- package/dist/commands/ref-filter/ref-listing-command.d.ts.map +1 -0
- package/dist/commands/ref-filter/ref-quote.d.ts +20 -0
- package/dist/commands/ref-filter/ref-quote.d.ts.map +1 -0
- package/dist/commands/ref-filter/version-compare.d.ts +20 -0
- package/dist/commands/ref-filter/version-compare.d.ts.map +1 -0
- package/dist/commands/reflog-command.d.ts +120 -0
- package/dist/commands/reflog-command.d.ts.map +1 -1
- package/dist/commands/reflog-walk.d.ts +72 -0
- package/dist/commands/reflog-walk.d.ts.map +1 -0
- package/dist/commands/remote-command.d.ts +138 -29
- package/dist/commands/remote-command.d.ts.map +1 -1
- package/dist/commands/remote-transport.d.ts +7 -1
- package/dist/commands/remote-transport.d.ts.map +1 -1
- package/dist/commands/reset-command.d.ts +2 -3
- package/dist/commands/reset-command.d.ts.map +1 -1
- package/dist/commands/restore-command.d.ts +2 -3
- package/dist/commands/restore-command.d.ts.map +1 -1
- package/dist/commands/rev-filter/commit-filter.d.ts +95 -0
- package/dist/commands/rev-filter/commit-filter.d.ts.map +1 -0
- package/dist/commands/rev-filter/commit-grep.d.ts +91 -0
- package/dist/commands/rev-filter/commit-grep.d.ts.map +1 -0
- package/dist/commands/rev-filter/index.d.ts +3 -0
- package/dist/commands/rev-filter/index.d.ts.map +1 -0
- package/dist/commands/rev-list-command.d.ts +154 -2
- package/dist/commands/rev-list-command.d.ts.map +1 -1
- package/dist/commands/rev-parse-command.d.ts +9 -0
- package/dist/commands/rev-parse-command.d.ts.map +1 -1
- package/dist/commands/revert-command.d.ts +32 -0
- package/dist/commands/revert-command.d.ts.map +1 -1
- package/dist/commands/revision-range.d.ts +32 -1
- package/dist/commands/revision-range.d.ts.map +1 -1
- package/dist/commands/revision-resolver.d.ts +21 -2
- package/dist/commands/revision-resolver.d.ts.map +1 -1
- package/dist/commands/rm-command.d.ts +70 -2
- package/dist/commands/rm-command.d.ts.map +1 -1
- package/dist/commands/sequencer-pick.d.ts +85 -5
- package/dist/commands/sequencer-pick.d.ts.map +1 -1
- package/dist/commands/sequencer-support.d.ts +2 -0
- package/dist/commands/sequencer-support.d.ts.map +1 -1
- package/dist/commands/serve-repository.d.ts +7 -0
- package/dist/commands/serve-repository.d.ts.map +1 -1
- package/dist/commands/show-command.d.ts +130 -0
- package/dist/commands/show-command.d.ts.map +1 -0
- package/dist/commands/show-commit.d.ts +11 -0
- package/dist/commands/show-commit.d.ts.map +1 -0
- package/dist/commands/signature-check.d.ts +164 -0
- package/dist/commands/signature-check.d.ts.map +1 -0
- package/dist/commands/signing.d.ts +160 -0
- package/dist/commands/signing.d.ts.map +1 -0
- package/dist/commands/sparse-checkout-command.d.ts.map +1 -1
- package/dist/commands/sparse-index-view.d.ts +45 -0
- package/dist/commands/sparse-index-view.d.ts.map +1 -0
- package/dist/commands/ssh-signer.d.ts +29 -0
- package/dist/commands/ssh-signer.d.ts.map +1 -0
- package/dist/commands/ssh-verifier.d.ts +42 -0
- package/dist/commands/ssh-verifier.d.ts.map +1 -0
- package/dist/commands/stash-apply-command.d.ts +5 -0
- package/dist/commands/stash-apply-command.d.ts.map +1 -1
- package/dist/commands/stash-branch-command.d.ts +34 -0
- package/dist/commands/stash-branch-command.d.ts.map +1 -0
- package/dist/commands/stash-create-command.d.ts +18 -1
- package/dist/commands/stash-create-command.d.ts.map +1 -1
- package/dist/commands/stash-info.d.ts +93 -0
- package/dist/commands/stash-info.d.ts.map +1 -0
- package/dist/commands/stash-list-command.d.ts +16 -0
- package/dist/commands/stash-list-command.d.ts.map +1 -1
- package/dist/commands/stash-pop-command.d.ts +39 -0
- package/dist/commands/stash-pop-command.d.ts.map +1 -0
- package/dist/commands/stash-show-command.d.ts +48 -0
- package/dist/commands/stash-show-command.d.ts.map +1 -0
- package/dist/commands/stash-store-command.d.ts +29 -0
- package/dist/commands/stash-store-command.d.ts.map +1 -0
- package/dist/commands/stash-working-tree.d.ts.map +1 -1
- package/dist/commands/status-command.d.ts.map +1 -1
- package/dist/commands/status-header.d.ts +5 -0
- package/dist/commands/status-header.d.ts.map +1 -1
- package/dist/commands/submodule-add-command.d.ts +89 -0
- package/dist/commands/submodule-add-command.d.ts.map +1 -0
- package/dist/commands/submodule-auth.d.ts +90 -0
- package/dist/commands/submodule-auth.d.ts.map +1 -0
- package/dist/commands/submodule-commands.d.ts +375 -0
- package/dist/commands/submodule-commands.d.ts.map +1 -0
- package/dist/commands/submodule-model.d.ts +288 -0
- package/dist/commands/submodule-model.d.ts.map +1 -0
- package/dist/commands/submodule-summary-command.d.ts.map +1 -1
- package/dist/commands/submodule-update-command.d.ts +198 -0
- package/dist/commands/submodule-update-command.d.ts.map +1 -0
- package/dist/commands/switch-command.d.ts.map +1 -1
- package/dist/commands/tag-command.d.ts +259 -10
- package/dist/commands/tag-command.d.ts.map +1 -1
- package/dist/commands/trailers.d.ts +218 -17
- package/dist/commands/trailers.d.ts.map +1 -1
- package/dist/commands/tree-restore.d.ts +7 -0
- package/dist/commands/tree-restore.d.ts.map +1 -1
- package/dist/commands/untracked-cache-support.d.ts +2 -1
- package/dist/commands/untracked-cache-support.d.ts.map +1 -1
- package/dist/commands/verify-command.d.ts +92 -0
- package/dist/commands/verify-command.d.ts.map +1 -0
- package/dist/commands/worktree-add-command.d.ts +79 -7
- package/dist/commands/worktree-add-command.d.ts.map +1 -1
- package/dist/commands/worktree-list-command.d.ts.map +1 -1
- package/dist/commands/worktree-path-rules.d.ts +66 -0
- package/dist/commands/worktree-path-rules.d.ts.map +1 -0
- package/dist/commands/worktree-remove-command.d.ts +10 -3
- package/dist/commands/worktree-remove-command.d.ts.map +1 -1
- package/dist/commands/worktree-repair-command.d.ts +15 -2
- package/dist/commands/worktree-repair-command.d.ts.map +1 -1
- package/dist/commands/worktree-support.d.ts +5 -0
- package/dist/commands/worktree-support.d.ts.map +1 -1
- package/dist/{commands-DnmlfwGV.js → commands-ISM52N0n.js} +66120 -49271
- package/dist/errors/checkout-errors.d.ts +19 -0
- package/dist/errors/checkout-errors.d.ts.map +1 -1
- package/dist/errors/command-errors.d.ts.map +1 -1
- package/dist/errors/index.js +57 -3
- package/dist/errors/ref-errors.d.ts +19 -0
- package/dist/errors/ref-errors.d.ts.map +1 -1
- package/dist/errors/worktree-errors.d.ts +6 -1
- package/dist/errors/worktree-errors.d.ts.map +1 -1
- package/dist/{git-command-DxvwPrPB.js → fsck-DLRpbwTj.js} +6863 -1070
- package/dist/git-command.d.ts +43 -2
- package/dist/git-command.d.ts.map +1 -1
- package/dist/git.d.ts +276 -3
- package/dist/git.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/remote-config/index.d.ts +1 -1
- package/dist/remote-config/index.d.ts.map +1 -1
- package/dist/remote-config/remote-config-store.d.ts +117 -3
- package/dist/remote-config/remote-config-store.d.ts.map +1 -1
- package/dist/rename/detect-renames.d.ts.map +1 -1
- package/dist/results/clone-result.d.ts +8 -0
- package/dist/results/clone-result.d.ts.map +1 -1
- package/dist/results/combined-diff.d.ts +3 -0
- package/dist/results/combined-diff.d.ts.map +1 -1
- package/dist/results/diff-check.d.ts +38 -0
- package/dist/results/diff-check.d.ts.map +1 -0
- package/dist/results/diff-color.d.ts +135 -0
- package/dist/results/diff-color.d.ts.map +1 -0
- package/dist/results/diff-output.d.ts +85 -1
- package/dist/results/diff-output.d.ts.map +1 -1
- package/dist/results/diff-pickaxe.d.ts +67 -0
- package/dist/results/diff-pickaxe.d.ts.map +1 -0
- package/dist/results/diff-words.d.ts +55 -0
- package/dist/results/diff-words.d.ts.map +1 -0
- package/dist/results/index.d.ts +4 -0
- package/dist/results/index.d.ts.map +1 -1
- package/dist/results/index.js +2 -2
- package/dist/results/init-result.d.ts +7 -0
- package/dist/results/init-result.d.ts.map +1 -1
- package/dist/results/pull-result.d.ts +5 -0
- package/dist/results/pull-result.d.ts.map +1 -1
- package/dist/results/push-result.d.ts +12 -0
- package/dist/results/push-result.d.ts.map +1 -1
- package/dist/results/rebase-result.d.ts +2 -0
- package/dist/results/rebase-result.d.ts.map +1 -1
- package/dist/results/stash-result.d.ts +6 -0
- package/dist/results/stash-result.d.ts.map +1 -1
- package/dist/results/status-result.d.ts.map +1 -1
- package/dist/{results-BZGa2Z3I.js → results-TB2IJ64h.js} +2178 -412
- package/dist/whitespace/index.d.ts +2 -0
- package/dist/whitespace/index.d.ts.map +1 -0
- package/dist/whitespace/whitespace-rule.d.ts +94 -0
- package/dist/whitespace/whitespace-rule.d.ts.map +1 -0
- package/package.json +12 -12
- package/src/commands/add-command.ts +178 -17
- package/src/commands/add-patch/add-interactive.ts +3 -3
- package/src/commands/am/am-command.ts +263 -43
- package/src/commands/am/index.ts +1 -0
- package/src/commands/am/mailsplit.ts +326 -0
- package/src/commands/apply/apply-command.ts +18 -8
- package/src/commands/apply/apply-engine.ts +6 -7
- package/src/commands/apply/apply-parse.ts +10 -10
- package/src/commands/attributes-source.ts +1 -1
- package/src/commands/bisect/bisect-command.ts +18 -5
- package/src/commands/bisect/bisect-engine.ts +2 -1
- package/src/commands/branch-command.ts +528 -53
- package/src/commands/branch-info-command.ts +150 -0
- package/src/commands/branch-tracking.ts +335 -60
- package/src/commands/branch-upstream-command.ts +218 -0
- package/src/commands/checkout-command.ts +70 -44
- package/src/commands/cherry-pick-command.ts +143 -0
- package/src/commands/clean-command.ts +34 -3
- package/src/commands/clone-command.ts +118 -5
- package/src/commands/comment-char-config.ts +160 -0
- package/src/commands/commit-command.ts +790 -71
- package/src/commands/commit-reuse.ts +94 -0
- package/src/commands/config-command.ts +1256 -0
- package/src/commands/config-value-types.ts +358 -0
- package/src/commands/core-config.ts +47 -2
- package/src/commands/default-branch.ts +196 -0
- package/src/commands/diff-color-config.ts +274 -0
- package/src/commands/diff-command.ts +1053 -75
- package/src/commands/fetch-command.ts +161 -13
- package/src/commands/fmt-merge-msg-command.ts +715 -0
- package/src/commands/fork-point.ts +63 -0
- package/src/commands/format-patch-command.ts +316 -43
- package/src/commands/fsck/fetch-fsck.ts +172 -18
- package/src/commands/fsck/fsck-command.ts +183 -66
- package/src/commands/fsck/fsck-loose.ts +14 -4
- package/src/commands/fsck/fsck-object-checks.ts +87 -46
- package/src/commands/fsck/fsck-object-table.ts +52 -42
- package/src/commands/fsck/fsck-pack.ts +64 -34
- package/src/commands/fsck/verify-pack-command.ts +5 -2
- package/src/commands/gc-command.ts +238 -107
- package/src/commands/git-date.ts +9 -895
- package/src/commands/git-describe.ts +31 -11
- package/src/commands/git-hooks.ts +92 -0
- package/src/commands/grep/grep-command.ts +1077 -0
- package/src/commands/grep/grep-engine.ts +1024 -0
- package/src/commands/grep/index.ts +2 -0
- package/src/commands/index-adder.ts +54 -10
- package/src/commands/index.ts +28 -0
- package/src/commands/init-command.ts +167 -11
- package/src/commands/interpret-trailers-command.ts +256 -0
- package/src/commands/legacy-remotes.ts +224 -0
- package/src/commands/local-transport.ts +109 -10
- package/src/commands/log-command.ts +1283 -232
- package/src/commands/log-graph.ts +123 -26
- package/src/commands/log-output.ts +280 -21
- package/src/commands/ls-remote-command.ts +9 -0
- package/src/commands/mailmap.ts +119 -0
- package/src/commands/merge-base-command.ts +170 -0
- package/src/commands/merge-bases.ts +63 -8
- package/src/commands/merge-command.ts +360 -82
- package/src/commands/merge-support.ts +43 -9
- package/src/commands/mv-command.ts +6 -3
- package/src/commands/name-rev.ts +171 -0
- package/src/commands/notes-command.ts +11 -1
- package/src/commands/notes-merge-command.ts +23 -14
- package/src/commands/notes-tree.ts +28 -13
- package/src/commands/octopus-merge.ts +3 -2
- package/src/commands/patch-id.ts +16 -8
- package/src/commands/pathspec-file.ts +72 -0
- package/src/commands/pathspec.ts +14 -2
- package/src/commands/pretty-format.ts +105 -20
- package/src/commands/promisor-remote.ts +10 -1
- package/src/commands/pull-command.ts +149 -22
- package/src/commands/push-command.ts +704 -72
- package/src/commands/read-tree-command.ts +34 -3
- package/src/commands/rebase-command.ts +957 -142
- package/src/commands/ref-filter/for-each-ref-command.ts +298 -0
- package/src/commands/ref-filter/index.ts +7 -0
- package/src/commands/ref-filter/ref-atoms.ts +581 -0
- package/src/commands/ref-filter/ref-filter.ts +651 -0
- package/src/commands/ref-filter/ref-format.ts +1070 -0
- package/src/commands/ref-filter/ref-listing-command.ts +421 -0
- package/src/commands/ref-filter/ref-quote.ts +69 -0
- package/src/commands/ref-filter/version-compare.ts +177 -0
- package/src/commands/reflog-command.ts +492 -2
- package/src/commands/reflog-walk.ts +234 -0
- package/src/commands/remote-command.ts +484 -74
- package/src/commands/remote-transport.ts +9 -1
- package/src/commands/reset-command.ts +40 -42
- package/src/commands/restore-command.ts +12 -41
- package/src/commands/rev-filter/commit-filter.ts +159 -0
- package/src/commands/rev-filter/commit-grep.ts +444 -0
- package/src/commands/rev-filter/index.ts +2 -0
- package/src/commands/rev-list-command.ts +402 -15
- package/src/commands/rev-parse-command.ts +22 -0
- package/src/commands/revert-command.ts +82 -0
- package/src/commands/revision-range.ts +204 -4
- package/src/commands/revision-resolver.ts +55 -22
- package/src/commands/rm-command.ts +282 -21
- package/src/commands/sequencer-pick.ts +504 -86
- package/src/commands/sequencer-support.ts +30 -5
- package/src/commands/serve-repository.ts +18 -3
- package/src/commands/show-command.ts +490 -0
- package/src/commands/show-commit.ts +24 -0
- package/src/commands/signature-check.ts +657 -0
- package/src/commands/signing.ts +385 -0
- package/src/commands/sparse-checkout-command.ts +2 -9
- package/src/commands/sparse-checkout-support.ts +2 -2
- package/src/commands/sparse-index-view.ts +135 -0
- package/src/commands/ssh-signer.ts +199 -0
- package/src/commands/ssh-verifier.ts +523 -0
- package/src/commands/stash-apply-command.ts +17 -5
- package/src/commands/stash-branch-command.ts +88 -0
- package/src/commands/stash-create-command.ts +30 -2
- package/src/commands/stash-info.ts +243 -0
- package/src/commands/stash-list-command.ts +33 -0
- package/src/commands/stash-pop-command.ts +83 -0
- package/src/commands/stash-show-command.ts +141 -0
- package/src/commands/stash-store-command.ts +82 -0
- package/src/commands/stash-working-tree.ts +2 -2
- package/src/commands/status-command.ts +7 -6
- package/src/commands/status-header.ts +44 -8
- package/src/commands/submodule-add-command.ts +509 -0
- package/src/commands/submodule-auth.ts +276 -0
- package/src/commands/submodule-commands.ts +1517 -0
- package/src/commands/submodule-model.ts +930 -0
- package/src/commands/submodule-summary-command.ts +6 -7
- package/src/commands/submodule-update-command.ts +1092 -0
- package/src/commands/switch-command.ts +3 -1
- package/src/commands/tag-command.ts +876 -64
- package/src/commands/trailers.ts +837 -100
- package/src/commands/tree-restore.ts +38 -10
- package/src/commands/untracked-cache-support.ts +16 -12
- package/src/commands/verify-command.ts +235 -0
- package/src/commands/worktree-add-command.ts +268 -24
- package/src/commands/worktree-list-command.ts +3 -5
- package/src/commands/worktree-path-rules.ts +183 -0
- package/src/commands/worktree-remove-command.ts +39 -5
- package/src/commands/worktree-repair-command.ts +52 -5
- package/src/commands/worktree-support.ts +22 -1
- package/src/core-commands/add.command.impl.ts +1 -1
- package/src/errors/checkout-errors.ts +29 -0
- package/src/errors/command-errors.ts +2 -1
- package/src/errors/ref-errors.ts +23 -0
- package/src/errors/worktree-errors.ts +8 -1
- package/src/git-command.ts +98 -3
- package/src/git.ts +420 -4
- package/src/remote-config/index.ts +4 -0
- package/src/remote-config/remote-config-store.ts +238 -11
- package/src/rename/detect-renames.ts +5 -1
- package/src/results/clone-result.ts +9 -0
- package/src/results/combined-diff.ts +38 -18
- package/src/results/diff-check.ts +185 -0
- package/src/results/diff-color.ts +868 -0
- package/src/results/diff-output.ts +204 -37
- package/src/results/diff-pickaxe.ts +304 -0
- package/src/results/diff-words.ts +395 -0
- package/src/results/index.ts +4 -0
- package/src/results/init-result.ts +9 -0
- package/src/results/pull-result.ts +5 -0
- package/src/results/push-result.ts +12 -0
- package/src/results/rebase-result.ts +3 -0
- package/src/results/stash-result.ts +7 -0
- package/src/results/status-result.ts +5 -2
- package/src/whitespace/index.ts +1 -0
- package/src/{commands/apply/whitespace.ts → whitespace/whitespace-rule.ts} +173 -23
- package/dist/commands/apply/whitespace.d.ts +0 -58
- package/dist/commands/apply/whitespace.d.ts.map +0 -1
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The submodule configuration git's submodule-config.c and submodule.c read: the
|
|
3
|
+
* `.gitmodules` file (from the worktree, the index, HEAD or a commit, with git's precedence
|
|
4
|
+
* and checks), the `submodule.<name>.*` settings of the repository's configuration over it,
|
|
5
|
+
* the lookups by name and by path, a submodule's git directory (`.git/modules/<name>`, or
|
|
6
|
+
* `submodule.<name>.gitdir` under `extensions.submodulePathConfig`) and whether it is
|
|
7
|
+
* active. The submodule commands (`init`, `deinit`, `sync`, `set-url`, `set-branch`,
|
|
8
|
+
* `foreach`) are built on it.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* const model = await SubmoduleModel.load(workingCopy);
|
|
13
|
+
* const sub = model.fromPath("libs/lib"); // { name: "lib", path: "libs/lib", url: "../lib" }
|
|
14
|
+
* model.isActive("libs/lib"); // submodule.lib.active, submodule.active, or a url in .git/config
|
|
15
|
+
* await model.gitDirOf("lib"); // ".git/modules/lib"
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
import { type ObjectId } from "@statewalker/vcs-core";
|
|
19
|
+
import { GitWorkingCopyConfig } from "@statewalker/vcs-store-files";
|
|
20
|
+
import type { FilesApi } from "@statewalker/vcs-utils/files";
|
|
21
|
+
import { type WorkingCopy } from "@statewalker/vcs-working-tree";
|
|
22
|
+
import { GitApiError } from "../errors/index.js";
|
|
23
|
+
import { RemoteConfigStore } from "../remote-config/index.js";
|
|
24
|
+
import { type SubmoduleIgnoreMode } from "./submodule-config.js";
|
|
25
|
+
/** How `git submodule update` brings a submodule to its recorded commit (`submodule.<name>.update`). */
|
|
26
|
+
export type SubmoduleUpdateType = "checkout" | "rebase" | "merge" | "none" | "command";
|
|
27
|
+
/** An update strategy (git's `struct submodule_update_strategy`). */
|
|
28
|
+
export interface SubmoduleUpdateStrategy {
|
|
29
|
+
type: SubmoduleUpdateType;
|
|
30
|
+
/** The command of `!<command>` */
|
|
31
|
+
command?: string;
|
|
32
|
+
}
|
|
33
|
+
/** `submodule.<name>.fetchRecurseSubmodules` as git parses it. */
|
|
34
|
+
export type SubmoduleFetchRecurse = "on" | "off" | "on-demand";
|
|
35
|
+
/** One submodule of a `.gitmodules` (git's `struct submodule`). */
|
|
36
|
+
export interface SubmoduleSettings {
|
|
37
|
+
name: string;
|
|
38
|
+
path?: string;
|
|
39
|
+
url?: string;
|
|
40
|
+
branch?: string;
|
|
41
|
+
ignore?: SubmoduleIgnoreMode;
|
|
42
|
+
update?: SubmoduleUpdateStrategy;
|
|
43
|
+
fetchRecurseSubmodules?: SubmoduleFetchRecurse;
|
|
44
|
+
/** `submodule.<name>.shallow` */
|
|
45
|
+
shallow?: boolean;
|
|
46
|
+
}
|
|
47
|
+
/** git's `parse_submodule_update_strategy`: undefined for a value it refuses. */
|
|
48
|
+
export declare function parseSubmoduleUpdateStrategy(value: string): SubmoduleUpdateStrategy | undefined;
|
|
49
|
+
/** git's `submodule_update_type_to_string`. */
|
|
50
|
+
export declare function submoduleUpdateTypeName(strategy: SubmoduleUpdateStrategy): string;
|
|
51
|
+
/** Where a `.gitmodules` was read from. */
|
|
52
|
+
export type GitmodulesSource = {
|
|
53
|
+
kind: "worktree";
|
|
54
|
+
} | {
|
|
55
|
+
kind: "index";
|
|
56
|
+
id: ObjectId;
|
|
57
|
+
} | {
|
|
58
|
+
kind: "head";
|
|
59
|
+
id: ObjectId;
|
|
60
|
+
} | {
|
|
61
|
+
kind: "commit";
|
|
62
|
+
commit: ObjectId;
|
|
63
|
+
id: ObjectId;
|
|
64
|
+
} | {
|
|
65
|
+
kind: "none";
|
|
66
|
+
};
|
|
67
|
+
/** How {@link Gitmodules.parse} reads a `.gitmodules` text. */
|
|
68
|
+
export interface GitmodulesParseOptions {
|
|
69
|
+
/**
|
|
70
|
+
* The commit the text was read from: git then keeps the first value of each setting
|
|
71
|
+
* (`overwrite = 0`) and warns `<commit>:.gitmodules, multiple configurations found for
|
|
72
|
+
* ...`; without one (the worktree's file, the index's or HEAD's blob) the last one wins.
|
|
73
|
+
*/
|
|
74
|
+
commit?: ObjectId;
|
|
75
|
+
/** How git names the text in its "bad config line" errors (default `file .gitmodules`) */
|
|
76
|
+
origin?: string;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* A parsed `.gitmodules` (git's submodule cache for one `.gitmodules`): the submodules by
|
|
80
|
+
* name and by path, and the warnings git printed while it read them.
|
|
81
|
+
*/
|
|
82
|
+
export declare class Gitmodules {
|
|
83
|
+
/** git's `warning:` lines, in order */
|
|
84
|
+
readonly warnings: string[];
|
|
85
|
+
private readonly names;
|
|
86
|
+
private readonly paths;
|
|
87
|
+
/** The submodules, in the order their names first appear. */
|
|
88
|
+
list(): SubmoduleSettings[];
|
|
89
|
+
/** git's `submodule_from_name`. */
|
|
90
|
+
byName(name: string): SubmoduleSettings | undefined;
|
|
91
|
+
/** git's `submodule_from_path`: the submodule the last `path` setting named `path` gave. */
|
|
92
|
+
byPath(path: string): SubmoduleSettings | undefined;
|
|
93
|
+
/**
|
|
94
|
+
* git's `parse_config` over each `submodule.<name>.<item>` variable of a `.gitmodules`:
|
|
95
|
+
* a suspicious name (empty, a `..` component) is ignored with git's warning, a `path` or
|
|
96
|
+
* `url` starting with `-` too, an unknown `ignore` value warns, an update strategy that
|
|
97
|
+
* is not `checkout`, `rebase`, `merge` or `none` (a `!command` included) and a bad
|
|
98
|
+
* `fetchRecurseSubmodules` or `shallow` fail as git dies.
|
|
99
|
+
*
|
|
100
|
+
* @throws InvalidConfigError where git dies reading the file
|
|
101
|
+
*/
|
|
102
|
+
static parse(text: string | Uint8Array, options?: GitmodulesParseOptions): Promise<Gitmodules>;
|
|
103
|
+
}
|
|
104
|
+
/** How {@link SubmoduleModel.load} reads the configuration. */
|
|
105
|
+
export interface SubmoduleModelOptions {
|
|
106
|
+
/** Read this commit's `.gitmodules` instead of the worktree's (git's `treeish_name`) */
|
|
107
|
+
commit?: ObjectId;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* The submodules of a working copy: its `.gitmodules` (see {@link Gitmodules}) with the
|
|
111
|
+
* `submodule.<name>.*` settings of its configuration over it.
|
|
112
|
+
*/
|
|
113
|
+
export declare class SubmoduleModel {
|
|
114
|
+
private readonly workingCopy;
|
|
115
|
+
/** The parsed `.gitmodules` (empty when there is none) */
|
|
116
|
+
readonly gitmodules: Gitmodules;
|
|
117
|
+
/** Where it was read from */
|
|
118
|
+
readonly source: GitmodulesSource;
|
|
119
|
+
private constructor();
|
|
120
|
+
/**
|
|
121
|
+
* Reads the working copy's `.gitmodules` (see {@link GitmodulesSourceReader}) and parses
|
|
122
|
+
* it as git does.
|
|
123
|
+
*
|
|
124
|
+
* @throws InvalidConfigError where git dies reading it (a bad line, an invalid update strategy)
|
|
125
|
+
*/
|
|
126
|
+
static load(workingCopy: WorkingCopy, options?: SubmoduleModelOptions): Promise<SubmoduleModel>;
|
|
127
|
+
/** The repository's configuration (its whole chain). */
|
|
128
|
+
get config(): RemoteConfigStore;
|
|
129
|
+
/** git's `submodule_from_path`. */
|
|
130
|
+
fromPath(path: string): SubmoduleSettings | undefined;
|
|
131
|
+
/** git's `submodule_from_name`. */
|
|
132
|
+
fromName(name: string): SubmoduleSettings | undefined;
|
|
133
|
+
/**
|
|
134
|
+
* A setting of the repository's configuration, the last value as written: undefined when
|
|
135
|
+
* unset, `null` for a variable without `=`.
|
|
136
|
+
*/
|
|
137
|
+
configText(key: string): string | null | undefined;
|
|
138
|
+
/**
|
|
139
|
+
* The URL the repository's configuration registers for the submodule
|
|
140
|
+
* (`submodule.<name>.url`, set by `init`), undefined when it is not registered.
|
|
141
|
+
*/
|
|
142
|
+
registeredUrl(name: string): string | undefined;
|
|
143
|
+
/** The URL to fetch the submodule from: the registered one, else `.gitmodules`'. */
|
|
144
|
+
url(name: string): string | undefined;
|
|
145
|
+
/** `submodule.<name>.update` of the configuration, else of `.gitmodules`. */
|
|
146
|
+
update(name: string): SubmoduleUpdateStrategy | undefined;
|
|
147
|
+
/** `submodule.<name>.branch` of the configuration, else of `.gitmodules`. */
|
|
148
|
+
branch(name: string): string | undefined;
|
|
149
|
+
/**
|
|
150
|
+
* git's `is_submodule_active`: the submodule `.gitmodules` maps `path` to is active when
|
|
151
|
+
* `submodule.<name>.active` says so; without it, when one of the `submodule.active`
|
|
152
|
+
* pathspecs matches its path; without those, when the configuration registers a URL for it.
|
|
153
|
+
*
|
|
154
|
+
* @throws InvalidConfigError for a `submodule.<name>.active` that is no boolean
|
|
155
|
+
*/
|
|
156
|
+
isActive(path: string): boolean;
|
|
157
|
+
/**
|
|
158
|
+
* git's `submodule_name_to_gitdir`: where the repository of the submodule `name` lives,
|
|
159
|
+
* as a path of the working copy's FilesApi: `<git dir>/modules/<name>` (`modules/` is kept per
|
|
160
|
+
* worktree: a linked worktree's are in `worktrees/<id>/modules/`), or under
|
|
161
|
+
* `extensions.submodulePathConfig` the `submodule.<name>.gitdir` setting (relative to the
|
|
162
|
+
* worktree top). The place is checked as git checks it (`validate_submodule_git_dir`):
|
|
163
|
+
* a legacy git directory inside another submodule's (`modules/hippo/hooks` while
|
|
164
|
+
* `modules/hippo` is a repository: CVE-2019-1387), or an encoded one that names a nested
|
|
165
|
+
* place or another submodule's, is refused.
|
|
166
|
+
*
|
|
167
|
+
* @throws SubmoduleGitDirError where git dies: no `submodule.<name>.gitdir` under the
|
|
168
|
+
* extension, or a git directory the check refuses
|
|
169
|
+
*/
|
|
170
|
+
gitDirOf(name: string): Promise<string | undefined>;
|
|
171
|
+
private get worktreeRoot();
|
|
172
|
+
/** A FilesApi path as git names it from the worktree top (`.git/modules/x`). */
|
|
173
|
+
shownPath(path: string): string;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* A submodule's git directory git refuses to create or use (`submodule_name_to_gitdir`
|
|
177
|
+
* dying): `message` is git's lines; `refusal` the `error:` lines of the check alone.
|
|
178
|
+
*/
|
|
179
|
+
export declare class SubmoduleGitDirError extends GitApiError {
|
|
180
|
+
readonly refusal: readonly string[];
|
|
181
|
+
constructor(message: string, refusal?: readonly string[]);
|
|
182
|
+
}
|
|
183
|
+
/** `path` relative to `from` (FilesApi paths). */
|
|
184
|
+
export declare function relativeFilesPath(from: string, path: string): string;
|
|
185
|
+
/**
|
|
186
|
+
* git's `validate_submodule_git_dir` of the git directory `gitDir` (a FilesApi path) of the
|
|
187
|
+
* submodule `name`: the `error:` lines of a refusal (none for the encoded layout, which git
|
|
188
|
+
* refuses silently), undefined when the place is fine.
|
|
189
|
+
*
|
|
190
|
+
* - Legacy layout (`validate_submodule_legacy_git_dir`): no leading directory of `gitDir`
|
|
191
|
+
* within the name (`modules/hippo` of `modules/hippo/hooks`) may be a repository.
|
|
192
|
+
* - `extensions.submodulePathConfig` (`validate_submodule_encoded_git_dir`): the part after
|
|
193
|
+
* the last `/modules/` holds no `/`, and an existing repository there is no other
|
|
194
|
+
* submodule's `gitdir` (case-folding conflicts are not checked).
|
|
195
|
+
*/
|
|
196
|
+
export declare function validateSubmoduleGitDir(workingCopy: WorkingCopy, gitDir: string, name: string, options: {
|
|
197
|
+
encoded: boolean;
|
|
198
|
+
}): Promise<string[] | undefined>;
|
|
199
|
+
/**
|
|
200
|
+
* git's `validate_submodule_path` (2.5x): the `error:` line refusing a submodule path whose
|
|
201
|
+
* leading component, or itself, is a symbolic link, undefined when none is. Missing
|
|
202
|
+
* components are fine. Read with the FilesApi's `lstat`, else the worktree's entries.
|
|
203
|
+
*/
|
|
204
|
+
export declare function validateSubmodulePath(workingCopy: WorkingCopy, path: string): Promise<string | undefined>;
|
|
205
|
+
/** Whether the repository's format has `extensions.submodulePathConfig` (git 2.52 and later). */
|
|
206
|
+
export declare function submodulePathConfigOf(workingCopy: WorkingCopy): Promise<boolean>;
|
|
207
|
+
/**
|
|
208
|
+
* A FilesApi path with every symbolic link on it followed, as `realpath(3)` resolves a host
|
|
209
|
+
* path (the last component too, a dangling link to where it points), through the FilesApi's
|
|
210
|
+
* `lstat`/`readlink`: the physical path the FilesApi can then act on, since it never acts
|
|
211
|
+
* through a link itself. Undefined where a link leads beyond the FilesApi's root (`..` above
|
|
212
|
+
* it, an absolute target outside its `rootDirectory`) or more than 40 links are met (ELOOP).
|
|
213
|
+
* Without `lstat`/`readlink` the path is returned as it is.
|
|
214
|
+
*/
|
|
215
|
+
export declare function physicalFilesPath(files: FilesApi, path: string): Promise<string | undefined>;
|
|
216
|
+
/**
|
|
217
|
+
* {@link physicalFilesPath}, telling why a path does not resolve: `"loop"` past 40 links
|
|
218
|
+
* (the ELOOP `stat(2)` and `open(2)` fail with), `"outside"` where a link leads beyond the
|
|
219
|
+
* FilesApi's root.
|
|
220
|
+
*/
|
|
221
|
+
export declare function resolveFilesLinks(files: FilesApi, path: string): Promise<string | "loop" | "outside">;
|
|
222
|
+
/** The kind of the entry itself at `path` (a link as `symlink`), where the FilesApi tells it. */
|
|
223
|
+
export declare function lstatKind(files: FilesApi, path: string): Promise<string | undefined>;
|
|
224
|
+
/**
|
|
225
|
+
* git's `safe_create_leading_directories` for the FilesApi path `path`: each leading
|
|
226
|
+
* component (never `path` itself) that `stat(2)` finds a directory, links followed, is kept;
|
|
227
|
+
* a missing one is created, only below the last real directory; anything else refuses, with
|
|
228
|
+
* nothing created at or past it: a file in the way, a link whose target is missing (git's
|
|
229
|
+
* `mkdir` fails there with EEXIST: the target of a dangling link is never created), a link
|
|
230
|
+
* leading beyond the FilesApi or looping. True when every leading directory is there.
|
|
231
|
+
*/
|
|
232
|
+
export declare function safeCreateLeadingDirectories(files: FilesApi, path: string): Promise<boolean>;
|
|
233
|
+
/** Whether the directory holding the physical FilesApi path `path` is there (a real one). */
|
|
234
|
+
export declare function parentIsDirectory(files: FilesApi, path: string): Promise<boolean>;
|
|
235
|
+
/** `path` joined to `base` with `.` and `..` resolved (FilesApi paths). */
|
|
236
|
+
export declare function joinFilesPath(base: string, path: string): string;
|
|
237
|
+
/** git's `url_is_local_not_ssh`. */
|
|
238
|
+
export declare function urlIsLocalNotSsh(url: string): boolean;
|
|
239
|
+
/** A URL starting with `./` or `../` (either separator): one relative to the superproject's remote. */
|
|
240
|
+
export declare function isRelativeSubmoduleUrl(url: string): boolean;
|
|
241
|
+
/**
|
|
242
|
+
* git's `relative_url` (remote.c): `url` (`../sub`, `./sub`) resolved against the
|
|
243
|
+
* superproject's remote URL `remoteUrl`, then, when the remote URL is itself relative,
|
|
244
|
+
* prefixed with `upPath` (the way from a submodule's directory back to the superproject's).
|
|
245
|
+
* A URL that is not relative is returned as it is.
|
|
246
|
+
*
|
|
247
|
+
* @throws GitApiError "cannot strip one component off url" where git dies
|
|
248
|
+
*
|
|
249
|
+
* @example
|
|
250
|
+
* ```typescript
|
|
251
|
+
* relativeUrl("https://example.com/org/super", "../lib"); // "https://example.com/org/lib"
|
|
252
|
+
* relativeUrl("user@host:repo", "../sub"); // "user@host:sub"
|
|
253
|
+
* relativeUrl("../super", "../sub", "../"); // "../../sub"
|
|
254
|
+
* ```
|
|
255
|
+
*/
|
|
256
|
+
export declare function relativeUrl(remoteUrl: string, url: string, upPath?: string): string;
|
|
257
|
+
/** git's `get_up_path`: one `../` per component of `path`. */
|
|
258
|
+
export declare function upPathOf(path: string): string;
|
|
259
|
+
/** The host's path of the working copy's worktree top (git's `xgetcwd()` there). */
|
|
260
|
+
export declare function worktreeHostPath(workingCopy: WorkingCopy): Promise<string | undefined>;
|
|
261
|
+
/** git's `repo_default_remote`: HEAD's branch's remote, the only remote, else `origin`. */
|
|
262
|
+
export declare function defaultRemoteOf(workingCopy: WorkingCopy): Promise<string>;
|
|
263
|
+
/**
|
|
264
|
+
* git 2.5x's `repo_remote_from_url`: the first remote (in configuration order) one of whose
|
|
265
|
+
* URLs is `url` (rewritten by `insteadOf`), undefined when none is.
|
|
266
|
+
*/
|
|
267
|
+
export declare function remoteFromUrl(workingCopy: WorkingCopy, url: string): string | undefined;
|
|
268
|
+
/**
|
|
269
|
+
* builtin/submodule--helper.c's `resolve_relative_url`: `url` resolved against the URL of
|
|
270
|
+
* the working copy's default remote; without one, against the worktree's own directory, with
|
|
271
|
+
* git's warning (unless `quiet`) added to `warnings`.
|
|
272
|
+
*/
|
|
273
|
+
export declare function resolveRelativeUrl(workingCopy: WorkingCopy, url: string, upPath: string | undefined, options?: {
|
|
274
|
+
quiet?: boolean;
|
|
275
|
+
warnings?: string[];
|
|
276
|
+
}): Promise<string>;
|
|
277
|
+
/**
|
|
278
|
+
* A config file of the working copy's FilesApi opened for editing (git's
|
|
279
|
+
* `git_config_set_in_file`): `.gitmodules`, a submodule's `config`.
|
|
280
|
+
*/
|
|
281
|
+
export declare function openConfigFile(workingCopy: WorkingCopy, path: string): Promise<GitWorkingCopyConfig | undefined>;
|
|
282
|
+
/**
|
|
283
|
+
* git's `git_config_set_in_file_gently` of one variable (`value` undefined unsets it):
|
|
284
|
+
* false when there was nothing to unset (git's `CONFIG_NOTHING_SET`) or no such file to
|
|
285
|
+
* write.
|
|
286
|
+
*/
|
|
287
|
+
export declare function setInConfigFile(workingCopy: WorkingCopy, path: string, key: string, value: string | undefined): Promise<boolean>;
|
|
288
|
+
//# sourceMappingURL=submodule-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"submodule-model.d.ts","sourceRoot":"","sources":["../../src/commands/submodule-model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAY,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAGL,oBAAoB,EAErB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EAAE,QAAQ,EAAiB,MAAM,8BAA8B,CAAC;AAC5E,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAEhF,OAAO,EAAE,WAAW,EAAsB,MAAM,oBAAoB,CAAC;AAErE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAK9D,OAAO,EAAyB,KAAK,m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.ts","sourceRoot":"","sources":["../../src/commands/submodule-summary-command.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"submodule-summary-command.d.ts","sourceRoot":"","sources":["../../src/commands/submodule-summary-command.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAyB/C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,uBAAwB,SAAQ,UAAU,CAAC,MAAM,CAAC;IAC7D,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,YAAY,CAAM;IAC1B,OAAO,CAAC,MAAM,CAAC,CAAS;IACxB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IAEtC,0FAA0F;IAC1F,SAAS,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAI/B;IAED,mFAAmF;IACnF,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAI7B;IAED,oFAAoF;IACpF,YAAY,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,CAIrC;IAED;;;OAGG;IACH,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAInC;IAED;;;OAGG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAI9B;IAED,oEAAoE;IACpE,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAI1B;IAED,kEAAkE;IAC5D,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CA0C5B;IAED,gFAAgF;YAClE,WAAW;IAQzB;;;OAGG;YACW,UAAU;IAwCxB,6FAA6F;YAC/E,SAAS;IAYvB;;;;;;;;;;;OAWG;YACW,YAAY;IAO1B,mFAAmF;YACrE,MAAM;IAepB,gFAAgF;YAClE,QAAQ;IA8DtB,wFAAwF;YAC1E,IAAI;CAgBnB"}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { type Credentials, type GitTransportRegistry } from "@statewalker/vcs-transport";
|
|
2
|
+
import { type CredentialsForUrl, type HeadersForUrl, type SubmoduleAuthFor } from "./submodule-auth.js";
|
|
3
|
+
import { SubmoduleCommandBase, type SubmoduleCommandResult } from "./submodule-commands.js";
|
|
4
|
+
/** The update strategies `submodule update` takes on its command line. */
|
|
5
|
+
export type SubmoduleUpdateMode = "checkout" | "merge" | "rebase";
|
|
6
|
+
/**
|
|
7
|
+
* `git submodule update [--init] [--remote] [-N] [-f] [--checkout|--merge|--rebase]
|
|
8
|
+
* [--recursive] [--depth <n>] [--[no-]recommend-shallow] [--reference <repo>] [<path>...]`:
|
|
9
|
+
* each active submodule of the index (matching the paths) brought to the commit the index
|
|
10
|
+
* records. One not yet cloned is cloned into `.git/modules/<name>` first (or its kept git
|
|
11
|
+
* directory reconnected), and is then checked out detached at that commit; one already there
|
|
12
|
+
* is updated by its strategy (the command line's, else `submodule.<name>.update` of the
|
|
13
|
+
* configuration, else of `.gitmodules`, else `checkout`): `checkout -q` (`-f` when just
|
|
14
|
+
* cloned or forced), `rebase`, `merge`, `none` (skipped) or, from the configuration only,
|
|
15
|
+
* `!<command>` run through the host's command runner with the commit appended. A commit the
|
|
16
|
+
* submodule lacks is fetched first (`fetch`, then `fetch <remote> <commit>`).
|
|
17
|
+
*
|
|
18
|
+
* `--remote` takes the commit from the submodule's remote-tracking branch instead
|
|
19
|
+
* (`submodule.<name>.branch`, `.` for the superproject's branch, default `HEAD`), fetched
|
|
20
|
+
* first unless `--no-fetch`. `--init` runs `submodule init` first; `--recursive` goes on in
|
|
21
|
+
* each submodule's own submodules. Fetches and clones go through the transports given here;
|
|
22
|
+
* credentials and headers reach only the URLs they are given for (see {@link setCredentials},
|
|
23
|
+
* {@link setCredentialsForUrl}): `.gitmodules` is repository content, and can name any host.
|
|
24
|
+
*
|
|
25
|
+
* Output, refusals and the exit status are git's (stdout, stderr); where git returns 128
|
|
26
|
+
* the command throws {@link SubmoduleCommandError}.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```typescript
|
|
30
|
+
* const { stdout } = await git.submoduleUpdate().setInit(true).setRecursive(true).call();
|
|
31
|
+
* // "Submodule path 'lib': checked out '1a2b...'\n"
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export declare class SubmoduleUpdateCommand extends SubmoduleCommandBase {
|
|
35
|
+
private readonly paths;
|
|
36
|
+
private init;
|
|
37
|
+
private remote;
|
|
38
|
+
private recursive;
|
|
39
|
+
private noFetch;
|
|
40
|
+
private force;
|
|
41
|
+
private mode?;
|
|
42
|
+
private depth;
|
|
43
|
+
private recommendShallow?;
|
|
44
|
+
private references;
|
|
45
|
+
private requireInit;
|
|
46
|
+
private transports?;
|
|
47
|
+
private credentials?;
|
|
48
|
+
private headers?;
|
|
49
|
+
private readonly credentialOrigins;
|
|
50
|
+
private credentialsFor?;
|
|
51
|
+
private headersFor?;
|
|
52
|
+
/** Set once at the top superproject, handed to nested updates unchanged */
|
|
53
|
+
private authPolicy?;
|
|
54
|
+
private timeout?;
|
|
55
|
+
/** A path (pathspec element) limiting the submodules; uninitialized ones are then reported. */
|
|
56
|
+
addPath(path: string): this;
|
|
57
|
+
/** `--init`: `submodule init` the submodules first. */
|
|
58
|
+
setInit(init: boolean): this;
|
|
59
|
+
/** `--require-init`: `--init`, refusing to clone into a non-empty directory. */
|
|
60
|
+
setRequireInit(requireInit: boolean): this;
|
|
61
|
+
/** `--remote`: the commit of the submodule's remote-tracking branch. */
|
|
62
|
+
setRemote(remote: boolean): this;
|
|
63
|
+
/** `--recursive`: nested submodules too. */
|
|
64
|
+
setRecursive(recursive: boolean): this;
|
|
65
|
+
/** `-N` / `--no-fetch`: never fetch. */
|
|
66
|
+
setNoFetch(noFetch: boolean): this;
|
|
67
|
+
/** `-f`: run the update even at the recorded commit; checkout with `-f`. */
|
|
68
|
+
setForce(force: boolean): this;
|
|
69
|
+
/** `--checkout`, `--merge` or `--rebase`: the strategy for every submodule. */
|
|
70
|
+
setMode(mode: SubmoduleUpdateMode | undefined): this;
|
|
71
|
+
/** `--depth <n>`: shallow clones and fetches. */
|
|
72
|
+
setDepth(depth: number): this;
|
|
73
|
+
/**
|
|
74
|
+
* `--[no-]recommend-shallow`: whether a clone honours `submodule.<name>.shallow` (depth 1);
|
|
75
|
+
* by default it does.
|
|
76
|
+
*/
|
|
77
|
+
setRecommendShallow(recommend: boolean): this;
|
|
78
|
+
/** `--reference <repository>`: borrow objects in clones. */
|
|
79
|
+
addReference(reference: string): this;
|
|
80
|
+
/** The transports clones and fetches reach non-local URLs through. */
|
|
81
|
+
setTransports(transports: GitTransportRegistry): this;
|
|
82
|
+
/**
|
|
83
|
+
* Credentials for clones and fetches of the trusted origins only: those named with
|
|
84
|
+
* {@link addCredentialOrigin}, or, when none is named, the origin (scheme, host, port) of
|
|
85
|
+
* the superproject's own remote, against which relative submodule URLs resolve. A
|
|
86
|
+
* submodule (at any depth) whose URL names another origin gets none; a local path or
|
|
87
|
+
* `file:` URL has no origin and gets none either. Use {@link setCredentialsForUrl} to
|
|
88
|
+
* decide per URL.
|
|
89
|
+
*/
|
|
90
|
+
setCredentials(credentials: Credentials): this;
|
|
91
|
+
/** HTTP headers for clones and fetches of the trusted origins only (as {@link setCredentials}). */
|
|
92
|
+
setHeaders(headers: Record<string, string>): this;
|
|
93
|
+
/**
|
|
94
|
+
* An origin the static credentials and headers are for: a URL whose `<scheme>://<host>[:<port>]`
|
|
95
|
+
* is taken (`https://git.example.com`, or any URL of that host). Once one is named, the
|
|
96
|
+
* superproject's remote is no longer trusted by default.
|
|
97
|
+
*/
|
|
98
|
+
addCredentialOrigin(url: string): this;
|
|
99
|
+
/**
|
|
100
|
+
* Asked with the URL of each clone and fetch (after `insteadOf`, at any depth, git's
|
|
101
|
+
* credential helpers' per-URL match): its credentials, or undefined for the static ones'
|
|
102
|
+
* rule ({@link setCredentials}).
|
|
103
|
+
*/
|
|
104
|
+
setCredentialsForUrl(provider: CredentialsForUrl): this;
|
|
105
|
+
/** Asked with the URL of each clone and fetch: its headers (as {@link setCredentialsForUrl}). */
|
|
106
|
+
setHeadersForUrl(provider: HeadersForUrl): this;
|
|
107
|
+
/** @internal The top superproject's policy, for a nested update. */
|
|
108
|
+
setAuthPolicy(policy: SubmoduleAuthFor): this;
|
|
109
|
+
private guarded?;
|
|
110
|
+
/**
|
|
111
|
+
* The transports clones and fetches go through: the given ones (default
|
|
112
|
+
* `createDefaultTransports()`) with every connector attaching the policy's credentials and
|
|
113
|
+
* headers itself, per URL and origin (`guardSubmoduleTransports`); the commands are given
|
|
114
|
+
* none, so nothing else can send them anywhere.
|
|
115
|
+
*/
|
|
116
|
+
private guardedTransports;
|
|
117
|
+
/** The policy: inherited, else built from the setters and the superproject's remote. */
|
|
118
|
+
private auth;
|
|
119
|
+
/** The timeout of clones and fetches, in milliseconds. */
|
|
120
|
+
setTimeout(timeout: number): this;
|
|
121
|
+
call(): Promise<SubmoduleCommandResult>;
|
|
122
|
+
/** git returned 128 after its `fatal:` line: thrown as git's death, that line the message. */
|
|
123
|
+
private dieWithLastLine;
|
|
124
|
+
/** `module_update`'s `--init`: `submodule init` of the same paths. */
|
|
125
|
+
private runInit;
|
|
126
|
+
private warnMissing;
|
|
127
|
+
/**
|
|
128
|
+
* `update_submodules`' clone pass: each submodule looked at (`prepare_to_clone_next_submodule`),
|
|
129
|
+
* those without a `.git` cloned; a failed clone retried once after the others, undefined
|
|
130
|
+
* when it fails again (git's quickstop).
|
|
131
|
+
*/
|
|
132
|
+
private cloneAll;
|
|
133
|
+
/** git's `prepare_to_clone_next_submodule`: the record and URL, undefined when skipped. */
|
|
134
|
+
private prepare;
|
|
135
|
+
/**
|
|
136
|
+
* Whether a worktree path exists as `stat` sees it: symbolic links on the way followed
|
|
137
|
+
* (relative ones, inside the storage; an absolute target counts as missing).
|
|
138
|
+
*/
|
|
139
|
+
private existsThroughLinks;
|
|
140
|
+
/** submodule--helper's `clone` child: false when it failed (its lines printed). */
|
|
141
|
+
private clone;
|
|
142
|
+
/** The submodule's working copy, opened as git-submodule.sh runs its children. */
|
|
143
|
+
private openInner;
|
|
144
|
+
/** submodule--helper.c's `ensure_core_worktree`. */
|
|
145
|
+
private ensureCoreWorktree;
|
|
146
|
+
/** `update_submodules`' second pass for one submodule: its exit code (0 when done). */
|
|
147
|
+
private updateRecord;
|
|
148
|
+
/** die_message: git's `fatal:` line printed, 128 returned. */
|
|
149
|
+
private fatal;
|
|
150
|
+
/** submodule--helper.c's `remote_submodule_branch`: the branch, or an exit code. */
|
|
151
|
+
private remoteBranch;
|
|
152
|
+
/** submodule--helper.c's `fetch_in_submodule`: `git fetch [--quiet] [--depth] [<remote> <id>]`. */
|
|
153
|
+
private fetchIn;
|
|
154
|
+
/** submodule--helper.c's `run_update_procedure`. */
|
|
155
|
+
private runUpdateProcedure;
|
|
156
|
+
/** submodule--helper.c's `run_update_command`. */
|
|
157
|
+
private runUpdateCommand;
|
|
158
|
+
/** `git rebase [--quiet] <id>` in the submodule. */
|
|
159
|
+
private rebase;
|
|
160
|
+
/** `git merge [--quiet] <id>` in the submodule: its stdout, the diffstat included. */
|
|
161
|
+
private merge;
|
|
162
|
+
/** `git diff --stat --summary <from> <to>`, as git merge prints it after a merge. */
|
|
163
|
+
private diffstat;
|
|
164
|
+
/** `!command`: `sh -c '<command> "$@"' <command> <id>` in the submodule. */
|
|
165
|
+
private runCommand;
|
|
166
|
+
/** `submodule--helper update --recursive --super-prefix=<dp>/ ...` in the submodule. */
|
|
167
|
+
private recurse;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* `git submodule status [-q] [--cached] [--recursive] [<path>...]`: one line per submodule
|
|
171
|
+
* of the index, `<state><commit> <path>[ (<name>)]`: `-` not initialized or not checked out,
|
|
172
|
+
* `+` its HEAD (with `--cached`, the index's commit) is not the commit the index records,
|
|
173
|
+
* `U` unmerged (a null id), else a space; the name is the first of `describe`, `describe
|
|
174
|
+
* --tags`, `describe --contains` and `describe --all --always` that answers in the
|
|
175
|
+
* submodule. `--recursive` lists each checked-out submodule's own submodules after it.
|
|
176
|
+
*
|
|
177
|
+
* @example
|
|
178
|
+
* ```typescript
|
|
179
|
+
* const { stdout } = await git.submoduleStatus().call();
|
|
180
|
+
* // " 1a2b3c... lib (v1.0-2-g1a2b3c4)\n"
|
|
181
|
+
* ```
|
|
182
|
+
*/
|
|
183
|
+
export declare class SubmoduleStatusCommand extends SubmoduleCommandBase {
|
|
184
|
+
private readonly paths;
|
|
185
|
+
private cached;
|
|
186
|
+
private recursive;
|
|
187
|
+
/** A path (pathspec element) limiting the submodules. */
|
|
188
|
+
addPath(path: string): this;
|
|
189
|
+
/** `--cached`: the index's commit for a submodule whose HEAD moved. */
|
|
190
|
+
setCached(cached: boolean): this;
|
|
191
|
+
/** `--recursive`: nested submodules too. */
|
|
192
|
+
setRecursive(recursive: boolean): this;
|
|
193
|
+
call(): Promise<SubmoduleCommandResult>;
|
|
194
|
+
private statusOne;
|
|
195
|
+
/** submodule--helper.c's `print_status`. */
|
|
196
|
+
private print;
|
|
197
|
+
}
|
|
198
|
+
//# sourceMappingURL=submodule-update-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"submodule-update-command.d.ts","sourceRoot":"","sources":["../../src/commands/submodule-update-command.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,oBAAoB,EAC1B,MAAM,4BAA4B,CAAC;AAiBpC,OAAO,EACL,KAAK,iBAAiB,EAGtB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EAEtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAGL,oBAAoB,EAEpB,KAAK,sBAAsB,EAG5B,MAAM,yBAAyB,CAAC;AAcjC,0EAA0E;AAC1E,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,OAAO,GAAG,QAAQ,CAAC;AAmIlE;;;;;;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