@statewalker/vcs-commands 0.4.0 → 0.6.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/README.md +123 -8
- package/dist/commands/add-command.d.ts +265 -34
- package/dist/commands/add-command.d.ts.map +1 -1
- package/dist/commands/add-patch/add-interactive.d.ts +46 -0
- package/dist/commands/add-patch/add-interactive.d.ts.map +1 -0
- package/dist/commands/add-patch/add-patch.d.ts +139 -0
- package/dist/commands/add-patch/add-patch.d.ts.map +1 -0
- package/dist/commands/add-patch/index.d.ts +6 -0
- package/dist/commands/add-patch/index.d.ts.map +1 -0
- package/dist/commands/add-patch/patch-backend.d.ts +80 -0
- package/dist/commands/add-patch/patch-backend.d.ts.map +1 -0
- package/dist/commands/add-patch/patch-modes.d.ts +71 -0
- package/dist/commands/add-patch/patch-modes.d.ts.map +1 -0
- package/dist/commands/add-patch/patch-session.d.ts +49 -0
- package/dist/commands/add-patch/patch-session.d.ts.map +1 -0
- package/dist/commands/am/am-command.d.ts +175 -0
- package/dist/commands/am/am-command.d.ts.map +1 -0
- package/dist/commands/am/index.d.ts +3 -0
- package/dist/commands/am/index.d.ts.map +1 -0
- package/dist/commands/am/mailinfo.d.ts +58 -0
- package/dist/commands/am/mailinfo.d.ts.map +1 -0
- package/dist/commands/am/patch-format.d.ts +24 -0
- package/dist/commands/am/patch-format.d.ts.map +1 -0
- package/dist/commands/apply/apply-command.d.ts +153 -0
- package/dist/commands/apply/apply-command.d.ts.map +1 -0
- package/dist/commands/apply/apply-engine.d.ts +195 -0
- package/dist/commands/apply/apply-engine.d.ts.map +1 -0
- package/dist/commands/apply/apply-parse.d.ts +86 -0
- package/dist/commands/apply/apply-parse.d.ts.map +1 -0
- package/dist/commands/apply/apply-types.d.ts +70 -0
- package/dist/commands/apply/apply-types.d.ts.map +1 -0
- package/dist/commands/apply/index.d.ts +6 -0
- package/dist/commands/apply/index.d.ts.map +1 -0
- package/dist/commands/apply/latin1.d.ts +32 -0
- package/dist/commands/apply/latin1.d.ts.map +1 -0
- package/dist/commands/apply/whitespace.d.ts +58 -0
- package/dist/commands/apply/whitespace.d.ts.map +1 -0
- package/dist/commands/attributes-source.d.ts +26 -0
- package/dist/commands/attributes-source.d.ts.map +1 -0
- package/dist/commands/backfill-command.d.ts +110 -0
- package/dist/commands/backfill-command.d.ts.map +1 -0
- package/dist/commands/bisect/bisect-checkout.d.ts +64 -0
- package/dist/commands/bisect/bisect-checkout.d.ts.map +1 -0
- package/dist/commands/bisect/bisect-command.d.ts +201 -0
- package/dist/commands/bisect/bisect-command.d.ts.map +1 -0
- package/dist/commands/bisect/bisect-engine.d.ts +219 -0
- package/dist/commands/bisect/bisect-engine.d.ts.map +1 -0
- package/dist/commands/bisect/bisect-graph.d.ts +127 -0
- package/dist/commands/bisect/bisect-graph.d.ts.map +1 -0
- package/dist/commands/bisect/bisect-quote.d.ts +27 -0
- package/dist/commands/bisect/bisect-quote.d.ts.map +1 -0
- package/dist/commands/bisect/index.d.ts +5 -0
- package/dist/commands/bisect/index.d.ts.map +1 -0
- package/dist/commands/blame-command.d.ts +122 -131
- package/dist/commands/blame-command.d.ts.map +1 -1
- package/dist/commands/branch-command.d.ts +52 -2
- package/dist/commands/branch-command.d.ts.map +1 -1
- package/dist/commands/branch-tracking.d.ts +98 -0
- package/dist/commands/branch-tracking.d.ts.map +1 -0
- package/dist/commands/checkout-command.d.ts +299 -34
- package/dist/commands/checkout-command.d.ts.map +1 -1
- package/dist/commands/checkout-paths.d.ts +124 -0
- package/dist/commands/checkout-paths.d.ts.map +1 -0
- package/dist/commands/cherry-pick-command.d.ts +50 -42
- package/dist/commands/cherry-pick-command.d.ts.map +1 -1
- package/dist/commands/clean-command.d.ts +67 -4
- package/dist/commands/clean-command.d.ts.map +1 -1
- package/dist/commands/clone-command.d.ts +179 -7
- package/dist/commands/clone-command.d.ts.map +1 -1
- package/dist/commands/commit-command.d.ts +311 -17
- package/dist/commands/commit-command.d.ts.map +1 -1
- package/dist/commands/core-config.d.ts +93 -0
- package/dist/commands/core-config.d.ts.map +1 -0
- package/dist/commands/date-format.d.ts +58 -0
- package/dist/commands/date-format.d.ts.map +1 -0
- package/dist/commands/describe-command.d.ts.map +1 -1
- package/dist/commands/diff-command.d.ts +377 -30
- package/dist/commands/diff-command.d.ts.map +1 -1
- package/dist/commands/diff-textconv.d.ts +40 -0
- package/dist/commands/diff-textconv.d.ts.map +1 -0
- package/dist/commands/fetch-command.d.ts +244 -23
- package/dist/commands/fetch-command.d.ts.map +1 -1
- package/dist/commands/format-patch-command.d.ts +164 -0
- package/dist/commands/format-patch-command.d.ts.map +1 -0
- package/dist/commands/fsck/fetch-fsck.d.ts +60 -0
- package/dist/commands/fsck/fetch-fsck.d.ts.map +1 -0
- package/dist/commands/fsck/fsck-command.d.ts +225 -0
- package/dist/commands/fsck/fsck-command.d.ts.map +1 -0
- package/dist/commands/fsck/fsck-loose.d.ts +68 -0
- package/dist/commands/fsck/fsck-loose.d.ts.map +1 -0
- package/dist/commands/fsck/fsck-msg-ids.d.ts +122 -0
- package/dist/commands/fsck/fsck-msg-ids.d.ts.map +1 -0
- package/dist/commands/fsck/fsck-object-checks.d.ts +148 -0
- package/dist/commands/fsck/fsck-object-checks.d.ts.map +1 -0
- package/dist/commands/fsck/fsck-object-table.d.ts +132 -0
- package/dist/commands/fsck/fsck-object-table.d.ts.map +1 -0
- package/dist/commands/fsck/fsck-pack.d.ts +115 -0
- package/dist/commands/fsck/fsck-pack.d.ts.map +1 -0
- package/dist/commands/fsck/index.d.ts +6 -0
- package/dist/commands/fsck/index.d.ts.map +1 -0
- package/dist/commands/fsck/verify-pack-command.d.ts +81 -0
- package/dist/commands/fsck/verify-pack-command.d.ts.map +1 -0
- package/dist/commands/gc-command.d.ts +43 -0
- package/dist/commands/gc-command.d.ts.map +1 -1
- package/dist/commands/git-date.d.ts +66 -0
- package/dist/commands/git-date.d.ts.map +1 -0
- package/dist/commands/git-describe.d.ts +67 -0
- package/dist/commands/git-describe.d.ts.map +1 -0
- package/dist/commands/git-hooks.d.ts +416 -0
- package/dist/commands/git-hooks.d.ts.map +1 -0
- package/dist/commands/git-ident.d.ts +128 -0
- package/dist/commands/git-ident.d.ts.map +1 -0
- package/dist/commands/hook-command.d.ts +96 -0
- package/dist/commands/hook-command.d.ts.map +1 -0
- package/dist/commands/index-adder.d.ts +231 -0
- package/dist/commands/index-adder.d.ts.map +1 -0
- package/dist/commands/index-host.d.ts +86 -0
- package/dist/commands/index-host.d.ts.map +1 -0
- package/dist/commands/index.d.ts +55 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +3 -2
- package/dist/commands/init-command.d.ts +12 -1
- package/dist/commands/init-command.d.ts.map +1 -1
- package/dist/commands/local-clone.d.ts +60 -0
- package/dist/commands/local-clone.d.ts.map +1 -0
- package/dist/commands/local-transport.d.ts +117 -0
- package/dist/commands/local-transport.d.ts.map +1 -0
- package/dist/commands/log-command.d.ts +216 -24
- package/dist/commands/log-command.d.ts.map +1 -1
- package/dist/commands/log-graph.d.ts +120 -0
- package/dist/commands/log-graph.d.ts.map +1 -0
- package/dist/commands/log-output.d.ts +323 -0
- package/dist/commands/log-output.d.ts.map +1 -0
- package/dist/commands/ls-remote-command.d.ts +23 -7
- package/dist/commands/ls-remote-command.d.ts.map +1 -1
- package/dist/commands/mailmap.d.ts +31 -0
- package/dist/commands/mailmap.d.ts.map +1 -0
- package/dist/commands/merge-bases.d.ts +85 -0
- package/dist/commands/merge-bases.d.ts.map +1 -0
- package/dist/commands/merge-command.d.ts +209 -74
- package/dist/commands/merge-command.d.ts.map +1 -1
- package/dist/commands/merge-config.d.ts +13 -0
- package/dist/commands/merge-config.d.ts.map +1 -0
- package/dist/commands/merge-drivers.d.ts +130 -0
- package/dist/commands/merge-drivers.d.ts.map +1 -0
- package/dist/commands/merge-support.d.ts +252 -0
- package/dist/commands/merge-support.d.ts.map +1 -0
- package/dist/commands/message-cleanup.d.ts +86 -0
- package/dist/commands/message-cleanup.d.ts.map +1 -0
- package/dist/commands/mv-command.d.ts +94 -0
- package/dist/commands/mv-command.d.ts.map +1 -0
- package/dist/commands/notes-command.d.ts +256 -0
- package/dist/commands/notes-command.d.ts.map +1 -0
- package/dist/commands/notes-commands.d.ts +41 -0
- package/dist/commands/notes-commands.d.ts.map +1 -0
- package/dist/commands/notes-merge-command.d.ts +105 -0
- package/dist/commands/notes-merge-command.d.ts.map +1 -0
- package/dist/commands/notes-support.d.ts +125 -0
- package/dist/commands/notes-support.d.ts.map +1 -0
- package/dist/commands/notes-tree.d.ts +106 -0
- package/dist/commands/notes-tree.d.ts.map +1 -0
- package/dist/commands/object-id-input.d.ts +20 -0
- package/dist/commands/object-id-input.d.ts.map +1 -0
- package/dist/commands/octopus-merge.d.ts +59 -0
- package/dist/commands/octopus-merge.d.ts.map +1 -0
- package/dist/commands/ort-merge.d.ts +126 -0
- package/dist/commands/ort-merge.d.ts.map +1 -0
- package/dist/commands/ort-recursive.d.ts +53 -0
- package/dist/commands/ort-recursive.d.ts.map +1 -0
- package/dist/commands/pack-refs-command.d.ts +20 -0
- package/dist/commands/pack-refs-command.d.ts.map +1 -1
- package/dist/commands/patch-id.d.ts +41 -0
- package/dist/commands/patch-id.d.ts.map +1 -0
- package/dist/commands/pathspec-attributes.d.ts +64 -0
- package/dist/commands/pathspec-attributes.d.ts.map +1 -0
- package/dist/commands/pathspec.d.ts +324 -0
- package/dist/commands/pathspec.d.ts.map +1 -0
- package/dist/commands/post-index-change.d.ts +33 -0
- package/dist/commands/post-index-change.d.ts.map +1 -0
- package/dist/commands/pretty-format.d.ts +222 -0
- package/dist/commands/pretty-format.d.ts.map +1 -0
- package/dist/commands/promisor-remote.d.ts +80 -0
- package/dist/commands/promisor-remote.d.ts.map +1 -0
- package/dist/commands/pull-command.d.ts +41 -8
- package/dist/commands/pull-command.d.ts.map +1 -1
- package/dist/commands/push-command.d.ts +24 -8
- package/dist/commands/push-command.d.ts.map +1 -1
- package/dist/commands/read-tree-command.d.ts +112 -0
- package/dist/commands/read-tree-command.d.ts.map +1 -0
- package/dist/commands/rebase-command.d.ts +507 -75
- package/dist/commands/rebase-command.d.ts.map +1 -1
- package/dist/commands/rebase-todo.d.ts +130 -0
- package/dist/commands/rebase-todo.d.ts.map +1 -0
- package/dist/commands/ref-decoration-filter.d.ts +53 -0
- package/dist/commands/ref-decoration-filter.d.ts.map +1 -0
- package/dist/commands/reflog-messages.d.ts +98 -0
- package/dist/commands/reflog-messages.d.ts.map +1 -0
- package/dist/commands/remote-command.d.ts +146 -6
- package/dist/commands/remote-command.d.ts.map +1 -1
- package/dist/commands/remote-transport.d.ts +120 -0
- package/dist/commands/remote-transport.d.ts.map +1 -0
- package/dist/commands/reset-command.d.ts +161 -7
- package/dist/commands/reset-command.d.ts.map +1 -1
- package/dist/commands/restore-command.d.ts +103 -0
- package/dist/commands/restore-command.d.ts.map +1 -0
- package/dist/commands/rev-list-command.d.ts +78 -0
- package/dist/commands/rev-list-command.d.ts.map +1 -0
- package/dist/commands/rev-parse-command.d.ts +80 -0
- package/dist/commands/rev-parse-command.d.ts.map +1 -0
- package/dist/commands/revert-command.d.ts +46 -38
- package/dist/commands/revert-command.d.ts.map +1 -1
- package/dist/commands/revision-filenames.d.ts +95 -0
- package/dist/commands/revision-filenames.d.ts.map +1 -0
- package/dist/commands/revision-range.d.ts +67 -0
- package/dist/commands/revision-range.d.ts.map +1 -0
- package/dist/commands/revision-resolver.d.ts +321 -0
- package/dist/commands/revision-resolver.d.ts.map +1 -0
- package/dist/commands/rm-command.d.ts +69 -7
- package/dist/commands/rm-command.d.ts.map +1 -1
- package/dist/commands/sequencer-pick.d.ts +191 -0
- package/dist/commands/sequencer-pick.d.ts.map +1 -0
- package/dist/commands/sequencer-support.d.ts +125 -0
- package/dist/commands/sequencer-support.d.ts.map +1 -0
- package/dist/commands/serve-repository.d.ts +52 -0
- package/dist/commands/serve-repository.d.ts.map +1 -0
- package/dist/commands/sparse-checkout-command.d.ts +190 -0
- package/dist/commands/sparse-checkout-command.d.ts.map +1 -0
- package/dist/commands/sparse-checkout-support.d.ts +268 -0
- package/dist/commands/sparse-checkout-support.d.ts.map +1 -0
- package/dist/commands/stash-apply-command.d.ts +69 -13
- package/dist/commands/stash-apply-command.d.ts.map +1 -1
- package/dist/commands/stash-create-command.d.ts +214 -26
- package/dist/commands/stash-create-command.d.ts.map +1 -1
- package/dist/commands/stash-drop-command.d.ts +10 -2
- package/dist/commands/stash-drop-command.d.ts.map +1 -1
- package/dist/commands/stash-list-command.d.ts +2 -4
- package/dist/commands/stash-list-command.d.ts.map +1 -1
- package/dist/commands/stash-working-tree.d.ts +95 -0
- package/dist/commands/stash-working-tree.d.ts.map +1 -0
- package/dist/commands/status-command.d.ts +320 -28
- package/dist/commands/status-command.d.ts.map +1 -1
- package/dist/commands/status-format.d.ts +155 -0
- package/dist/commands/status-format.d.ts.map +1 -0
- package/dist/commands/status-header.d.ts +64 -0
- package/dist/commands/status-header.d.ts.map +1 -0
- package/dist/commands/strerror.d.ts +7 -0
- package/dist/commands/strerror.d.ts.map +1 -0
- package/dist/commands/submodule-config.d.ts +38 -0
- package/dist/commands/submodule-config.d.ts.map +1 -0
- package/dist/commands/submodule-summary-command.d.ts +80 -0
- package/dist/commands/submodule-summary-command.d.ts.map +1 -0
- package/dist/commands/submodule-summary.d.ts +150 -0
- package/dist/commands/submodule-summary.d.ts.map +1 -0
- package/dist/commands/switch-command.d.ts +132 -0
- package/dist/commands/switch-command.d.ts.map +1 -0
- package/dist/commands/tag-command.d.ts +23 -2
- package/dist/commands/tag-command.d.ts.map +1 -1
- package/dist/commands/tracking-info.d.ts +64 -0
- package/dist/commands/tracking-info.d.ts.map +1 -0
- package/dist/commands/trailers.d.ts +73 -0
- package/dist/commands/trailers.d.ts.map +1 -0
- package/dist/commands/tree-restore.d.ts +137 -6
- package/dist/commands/tree-restore.d.ts.map +1 -1
- package/dist/commands/untracked-cache-support.d.ts +53 -0
- package/dist/commands/untracked-cache-support.d.ts.map +1 -0
- package/dist/commands/worktree-add-command.d.ts +108 -0
- package/dist/commands/worktree-add-command.d.ts.map +1 -0
- package/dist/commands/worktree-list-command.d.ts +69 -0
- package/dist/commands/worktree-list-command.d.ts.map +1 -0
- package/dist/commands/worktree-lock-command.d.ts +44 -0
- package/dist/commands/worktree-lock-command.d.ts.map +1 -0
- package/dist/commands/worktree-overwrite-checks.d.ts +204 -0
- package/dist/commands/worktree-overwrite-checks.d.ts.map +1 -0
- package/dist/commands/worktree-prune-command.d.ts +48 -0
- package/dist/commands/worktree-prune-command.d.ts.map +1 -0
- package/dist/commands/worktree-remove-command.d.ts +59 -0
- package/dist/commands/worktree-remove-command.d.ts.map +1 -0
- package/dist/commands/worktree-repair-command.d.ts +35 -0
- package/dist/commands/worktree-repair-command.d.ts.map +1 -0
- package/dist/commands/worktree-support.d.ts +64 -0
- package/dist/commands/worktree-support.d.ts.map +1 -0
- package/dist/commands-DnmlfwGV.js +61620 -0
- package/dist/core-commands/add.command.impl.d.ts.map +1 -1
- package/dist/core-commands/index.d.ts +0 -3
- package/dist/core-commands/index.d.ts.map +1 -1
- package/dist/errors/add-errors.d.ts +55 -0
- package/dist/errors/add-errors.d.ts.map +1 -1
- package/dist/errors/checkout-errors.d.ts +29 -0
- package/dist/errors/checkout-errors.d.ts.map +1 -1
- package/dist/errors/command-errors.d.ts +77 -0
- package/dist/errors/command-errors.d.ts.map +1 -1
- package/dist/errors/commit-errors.d.ts +9 -0
- package/dist/errors/commit-errors.d.ts.map +1 -1
- package/dist/errors/git-api-error.d.ts +59 -2
- package/dist/errors/git-api-error.d.ts.map +1 -1
- package/dist/errors/index.d.ts +1 -0
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/index.js +371 -19
- package/dist/errors/rebase-errors.d.ts +9 -0
- package/dist/errors/rebase-errors.d.ts.map +1 -1
- package/dist/errors/ref-errors.d.ts +32 -0
- package/dist/errors/ref-errors.d.ts.map +1 -1
- package/dist/errors/transport-errors.d.ts +12 -2
- package/dist/errors/transport-errors.d.ts.map +1 -1
- package/dist/errors/worktree-errors.d.ts +35 -0
- package/dist/errors/worktree-errors.d.ts.map +1 -0
- package/dist/git-command-DxvwPrPB.js +7612 -0
- package/dist/git-command.d.ts +422 -32
- package/dist/git-command.d.ts.map +1 -1
- package/dist/git.d.ts +326 -5
- package/dist/git.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/remote-config/index.d.ts +1 -0
- package/dist/remote-config/index.d.ts.map +1 -1
- package/dist/remote-config/remote-config-store.d.ts +123 -3
- package/dist/remote-config/remote-config-store.d.ts.map +1 -1
- package/dist/remote-config/remote-refs.d.ts +41 -0
- package/dist/remote-config/remote-refs.d.ts.map +1 -0
- package/dist/rename/detect-renames.d.ts +148 -0
- package/dist/rename/detect-renames.d.ts.map +1 -0
- package/dist/rename/git-similarity.d.ts +44 -0
- package/dist/rename/git-similarity.d.ts.map +1 -0
- package/dist/rename/index.d.ts +2 -0
- package/dist/rename/index.d.ts.map +1 -1
- package/dist/results/binary-patch.d.ts +11 -0
- package/dist/results/binary-patch.d.ts.map +1 -0
- package/dist/results/blame-format.d.ts +55 -0
- package/dist/results/blame-format.d.ts.map +1 -0
- package/dist/results/cherry-pick-result.d.ts +10 -0
- package/dist/results/cherry-pick-result.d.ts.map +1 -1
- package/dist/results/clone-result.d.ts +16 -0
- package/dist/results/clone-result.d.ts.map +1 -1
- package/dist/results/combined-diff.d.ts +77 -0
- package/dist/results/combined-diff.d.ts.map +1 -0
- package/dist/results/diff-entry.d.ts +32 -0
- package/dist/results/diff-entry.d.ts.map +1 -1
- package/dist/results/diff-formatter.d.ts +34 -60
- package/dist/results/diff-formatter.d.ts.map +1 -1
- package/dist/results/diff-order.d.ts +25 -0
- package/dist/results/diff-order.d.ts.map +1 -0
- package/dist/results/diff-output.d.ts +249 -0
- package/dist/results/diff-output.d.ts.map +1 -0
- package/dist/results/fetch-result.d.ts +24 -1
- package/dist/results/fetch-result.d.ts.map +1 -1
- package/dist/results/index.d.ts +5 -0
- package/dist/results/index.d.ts.map +1 -1
- package/dist/results/index.js +2 -252
- package/dist/results/merge-result.d.ts +15 -1
- package/dist/results/merge-result.d.ts.map +1 -1
- package/dist/results/pull-result.d.ts +12 -3
- package/dist/results/pull-result.d.ts.map +1 -1
- package/dist/results/push-result.d.ts +42 -0
- package/dist/results/push-result.d.ts.map +1 -1
- package/dist/results/quote-path.d.ts +27 -0
- package/dist/results/quote-path.d.ts.map +1 -0
- package/dist/results/rebase-result.d.ts +28 -1
- package/dist/results/rebase-result.d.ts.map +1 -1
- package/dist/results/revert-result.d.ts +10 -0
- package/dist/results/revert-result.d.ts.map +1 -1
- package/dist/results/stash-result.d.ts +5 -0
- package/dist/results/stash-result.d.ts.map +1 -1
- package/dist/results/status-result.d.ts +143 -18
- package/dist/results/status-result.d.ts.map +1 -1
- package/dist/results-BZGa2Z3I.js +2934 -0
- package/dist/transport-command.d.ts +56 -1
- package/dist/transport-command.d.ts.map +1 -1
- package/package.json +15 -10
- package/src/commands/add-command.ts +1291 -224
- package/src/commands/add-patch/add-interactive.ts +941 -0
- package/src/commands/add-patch/add-patch.ts +1169 -0
- package/src/commands/add-patch/index.ts +5 -0
- package/src/commands/add-patch/patch-backend.ts +239 -0
- package/src/commands/add-patch/patch-modes.ts +249 -0
- package/src/commands/add-patch/patch-session.ts +159 -0
- package/src/commands/am/am-command.ts +1111 -0
- package/src/commands/am/index.ts +2 -0
- package/src/commands/am/mailinfo.ts +1015 -0
- package/src/commands/am/patch-format.ts +121 -0
- package/src/commands/apply/apply-command.ts +832 -0
- package/src/commands/apply/apply-engine.ts +1603 -0
- package/src/commands/apply/apply-parse.ts +1209 -0
- package/src/commands/apply/apply-types.ts +112 -0
- package/src/commands/apply/index.ts +5 -0
- package/src/commands/apply/latin1.ts +171 -0
- package/src/commands/apply/whitespace.ts +260 -0
- package/src/commands/attributes-source.ts +96 -0
- package/src/commands/backfill-command.ts +694 -0
- package/src/commands/bisect/bisect-checkout.ts +217 -0
- package/src/commands/bisect/bisect-command.ts +788 -0
- package/src/commands/bisect/bisect-engine.ts +1079 -0
- package/src/commands/bisect/bisect-graph.ts +595 -0
- package/src/commands/bisect/bisect-quote.ts +92 -0
- package/src/commands/bisect/index.ts +4 -0
- package/src/commands/blame-command.ts +711 -986
- package/src/commands/branch-command.ts +354 -32
- package/src/commands/branch-tracking.ts +331 -0
- package/src/commands/checkout-command.ts +1426 -297
- package/src/commands/checkout-paths.ts +784 -0
- package/src/commands/cherry-pick-command.ts +156 -396
- package/src/commands/clean-command.ts +532 -85
- package/src/commands/clone-command.ts +826 -55
- package/src/commands/commit-command.ts +1781 -166
- package/src/commands/core-config.ts +196 -0
- package/src/commands/date-format.ts +668 -0
- package/src/commands/describe-command.ts +2 -0
- package/src/commands/diff-command.ts +1898 -110
- package/src/commands/diff-textconv.ts +50 -0
- package/src/commands/fetch-command.ts +1038 -79
- package/src/commands/format-patch-command.ts +969 -0
- package/src/commands/fsck/fetch-fsck.ts +229 -0
- package/src/commands/fsck/fsck-command.ts +3347 -0
- package/src/commands/fsck/fsck-loose.ts +287 -0
- package/src/commands/fsck/fsck-msg-ids.ts +176 -0
- package/src/commands/fsck/fsck-object-checks.ts +1044 -0
- package/src/commands/fsck/fsck-object-table.ts +363 -0
- package/src/commands/fsck/fsck-pack.ts +604 -0
- package/src/commands/fsck/index.ts +5 -0
- package/src/commands/fsck/verify-pack-command.ts +249 -0
- package/src/commands/gc-command.ts +147 -1
- package/src/commands/git-date.ts +895 -0
- package/src/commands/git-describe.ts +316 -0
- package/src/commands/git-hooks.ts +1472 -0
- package/src/commands/git-ident.ts +344 -0
- package/src/commands/hook-command.ts +247 -0
- package/src/commands/index-adder.ts +706 -0
- package/src/commands/index-host.ts +291 -0
- package/src/commands/index.ts +83 -0
- package/src/commands/init-command.ts +60 -11
- package/src/commands/local-clone.ts +183 -0
- package/src/commands/local-transport.ts +762 -0
- package/src/commands/log-command.ts +1915 -170
- package/src/commands/log-graph.ts +671 -0
- package/src/commands/log-output.ts +1359 -0
- package/src/commands/ls-remote-command.ts +101 -58
- package/src/commands/mailmap.ts +129 -0
- package/src/commands/merge-bases.ts +296 -0
- package/src/commands/merge-command.ts +1386 -491
- package/src/commands/merge-config.ts +25 -0
- package/src/commands/merge-drivers.ts +306 -0
- package/src/commands/merge-support.ts +1198 -0
- package/src/commands/message-cleanup.ts +275 -0
- package/src/commands/mv-command.ts +976 -0
- package/src/commands/notes-command.ts +890 -0
- package/src/commands/notes-commands.ts +87 -0
- package/src/commands/notes-merge-command.ts +768 -0
- package/src/commands/notes-support.ts +402 -0
- package/src/commands/notes-tree.ts +602 -0
- package/src/commands/object-id-input.ts +27 -0
- package/src/commands/octopus-merge.ts +377 -0
- package/src/commands/ort-merge.ts +1660 -0
- package/src/commands/ort-recursive.ts +160 -0
- package/src/commands/pack-refs-command.ts +39 -22
- package/src/commands/patch-id.ts +196 -0
- package/src/commands/pathspec-attributes.ts +162 -0
- package/src/commands/pathspec.ts +1199 -0
- package/src/commands/post-index-change.ts +62 -0
- package/src/commands/pretty-format.ts +1431 -0
- package/src/commands/promisor-remote.ts +298 -0
- package/src/commands/pull-command.ts +207 -22
- package/src/commands/push-command.ts +236 -23
- package/src/commands/read-tree-command.ts +857 -0
- package/src/commands/rebase-command.ts +3808 -371
- package/src/commands/rebase-todo.ts +584 -0
- package/src/commands/ref-decoration-filter.ts +118 -0
- package/src/commands/reflog-messages.ts +177 -0
- package/src/commands/remote-command.ts +500 -19
- package/src/commands/remote-transport.ts +383 -0
- package/src/commands/reset-command.ts +828 -91
- package/src/commands/restore-command.ts +350 -0
- package/src/commands/rev-list-command.ts +167 -0
- package/src/commands/rev-parse-command.ts +277 -0
- package/src/commands/revert-command.ts +152 -399
- package/src/commands/revision-filenames.ts +254 -0
- package/src/commands/revision-range.ts +222 -0
- package/src/commands/revision-resolver.ts +1379 -0
- package/src/commands/rm-command.ts +613 -67
- package/src/commands/sequencer-pick.ts +869 -0
- package/src/commands/sequencer-support.ts +869 -0
- package/src/commands/serve-repository.ts +125 -0
- package/src/commands/sparse-checkout-command.ts +1389 -0
- package/src/commands/sparse-checkout-support.ts +793 -0
- package/src/commands/stash-apply-command.ts +692 -124
- package/src/commands/stash-create-command.ts +752 -89
- package/src/commands/stash-drop-command.ts +67 -6
- package/src/commands/stash-list-command.ts +10 -4
- package/src/commands/stash-working-tree.ts +387 -0
- package/src/commands/status-command.ts +1426 -97
- package/src/commands/status-format.ts +775 -0
- package/src/commands/status-header.ts +330 -0
- package/src/commands/strerror.ts +29 -0
- package/src/commands/submodule-config.ts +94 -0
- package/src/commands/submodule-summary-command.ts +334 -0
- package/src/commands/submodule-summary.ts +446 -0
- package/src/commands/switch-command.ts +402 -0
- package/src/commands/tag-command.ts +129 -41
- package/src/commands/tracking-info.ts +201 -0
- package/src/commands/trailers.ts +417 -0
- package/src/commands/tree-restore.ts +344 -15
- package/src/commands/untracked-cache-support.ts +194 -0
- package/src/commands/worktree-add-command.ts +458 -0
- package/src/commands/worktree-list-command.ts +208 -0
- package/src/commands/worktree-lock-command.ts +96 -0
- package/src/commands/worktree-overwrite-checks.ts +641 -0
- package/src/commands/worktree-prune-command.ts +99 -0
- package/src/commands/worktree-remove-command.ts +186 -0
- package/src/commands/worktree-repair-command.ts +59 -0
- package/src/commands/worktree-support.ts +214 -0
- package/src/core-commands/add.command.impl.ts +9 -5
- package/src/core-commands/index.ts +0 -8
- package/src/errors/add-errors.ts +45 -0
- package/src/errors/checkout-errors.ts +46 -2
- package/src/errors/command-errors.ts +101 -1
- package/src/errors/commit-errors.ts +18 -2
- package/src/errors/git-api-error.ts +82 -2
- package/src/errors/index.ts +1 -0
- package/src/errors/merge-errors.ts +2 -2
- package/src/errors/rebase-errors.ts +12 -0
- package/src/errors/ref-errors.ts +56 -2
- package/src/errors/remote-errors.ts +2 -2
- package/src/errors/stash-errors.ts +1 -1
- package/src/errors/transport-errors.ts +20 -4
- package/src/errors/worktree-errors.ts +49 -0
- package/src/git-command.ts +1218 -118
- package/src/git.ts +552 -11
- package/src/index.ts +1 -1
- package/src/remote-config/index.ts +1 -0
- package/src/remote-config/remote-config-store.ts +326 -16
- package/src/remote-config/remote-refs.ts +119 -0
- package/src/rename/detect-renames.ts +711 -0
- package/src/rename/git-similarity.ts +116 -0
- package/src/rename/index.ts +2 -0
- package/src/results/binary-patch.ts +401 -0
- package/src/results/blame-format.ts +239 -0
- package/src/results/cherry-pick-result.ts +10 -0
- package/src/results/clone-result.ts +18 -0
- package/src/results/combined-diff.ts +585 -0
- package/src/results/diff-entry.ts +35 -0
- package/src/results/diff-formatter.ts +152 -288
- package/src/results/diff-order.ts +64 -0
- package/src/results/diff-output.ts +1051 -0
- package/src/results/fetch-result.ts +24 -1
- package/src/results/index.ts +5 -0
- package/src/results/merge-result.ts +15 -1
- package/src/results/pull-result.ts +12 -3
- package/src/results/push-result.ts +43 -0
- package/src/results/quote-path.ts +103 -0
- package/src/results/rebase-result.ts +37 -0
- package/src/results/revert-result.ts +10 -0
- package/src/results/stash-result.ts +6 -0
- package/src/results/status-result.ts +288 -27
- package/src/transport-command.ts +139 -2
- package/dist/commands-BpeXZTC3.js +0 -10278
- package/dist/core-commands/checkout.command.d.ts +0 -103
- package/dist/core-commands/checkout.command.d.ts.map +0 -1
- package/dist/core-commands/checkout.command.impl.d.ts +0 -110
- package/dist/core-commands/checkout.command.impl.d.ts.map +0 -1
- package/dist/status-result-BapZoQaR.js +0 -411
- package/src/core-commands/checkout.command.impl.ts +0 -564
- package/src/core-commands/checkout.command.ts +0 -125
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* git's `checkout_paths` (builtin/checkout.c), shared by `git checkout [<tree-ish>] --
|
|
3
|
+
* <pathspec>` and `git restore`: the index entries a pathspec names are checked out to the
|
|
4
|
+
* worktree, from the index or from a tree (`read_tree_some` puts the tree's entries into the
|
|
5
|
+
* index first), in overlay mode or not, with `--ours`/`--theirs`/`--merge` for unmerged
|
|
6
|
+
* paths and skip-worktree entries passed over unless `--ignore-skip-worktree-bits`.
|
|
7
|
+
*/
|
|
8
|
+
import { type Blobs, type ObjectId } from "@statewalker/vcs-core";
|
|
9
|
+
import { type ConflictStyle } from "@statewalker/vcs-utils";
|
|
10
|
+
import { type Staging, type WorkingCopy, type Worktree } from "@statewalker/vcs-working-tree";
|
|
11
|
+
import type { CommandTrees } from "../git-command.js";
|
|
12
|
+
import { type GlobalPathspecMagic, type PathspecItem } from "./pathspec.js";
|
|
13
|
+
/** What {@link checkoutPaths} reads and writes. */
|
|
14
|
+
export interface CheckoutPathsContext {
|
|
15
|
+
workingCopy: WorkingCopy;
|
|
16
|
+
staging: Staging;
|
|
17
|
+
trees: CommandTrees;
|
|
18
|
+
blobs: Blobs;
|
|
19
|
+
worktree: Worktree | undefined;
|
|
20
|
+
/** An object id abbreviated as git prints it (`repo_find_unique_abbrev`) */
|
|
21
|
+
abbreviate(id: ObjectId): Promise<string>;
|
|
22
|
+
}
|
|
23
|
+
/** The `checkout_opts` that `checkout_paths` reads. */
|
|
24
|
+
export interface CheckoutPathsOptions {
|
|
25
|
+
/** The parsed pathspec */
|
|
26
|
+
items: PathspecItem[];
|
|
27
|
+
/** The elements as given, for `report_path_error` */
|
|
28
|
+
originals: readonly string[];
|
|
29
|
+
/** Report elements that matched nothing (off for a whole-index checkout) */
|
|
30
|
+
reportUnmatched?: boolean;
|
|
31
|
+
/** The tree checked out of (`opts->source_tree`); none: the index */
|
|
32
|
+
sourceTree?: ObjectId;
|
|
33
|
+
/** Update the index (`checkout_index`) */
|
|
34
|
+
checkoutIndex: boolean;
|
|
35
|
+
/** Update the worktree (`checkout_worktree`) */
|
|
36
|
+
checkoutWorktree: boolean;
|
|
37
|
+
/** Overlay mode: entries the tree lacks are kept (checkout's default) */
|
|
38
|
+
overlay: boolean;
|
|
39
|
+
/** `--ignore-skip-worktree-bits` */
|
|
40
|
+
ignoreSkipWorktree?: boolean;
|
|
41
|
+
/** `--ours` (2) / `--theirs` (3) */
|
|
42
|
+
writeoutStage?: number;
|
|
43
|
+
/** `-m` / `--merge` / `--conflict`: unmerged paths re-created */
|
|
44
|
+
merge?: boolean;
|
|
45
|
+
/** `--conflict=<style>`; default `merge.conflictStyle` */
|
|
46
|
+
conflictStyle?: ConflictStyle;
|
|
47
|
+
/** `--ignore-unmerged` (`restore`), or `checkout -f` */
|
|
48
|
+
ignoreUnmerged?: boolean;
|
|
49
|
+
/** `-q`: no "path is unmerged" warning, no counts */
|
|
50
|
+
quiet?: boolean;
|
|
51
|
+
/** `count_checkout_paths`: "Updated N paths from ..." (checkout without `--`) */
|
|
52
|
+
countCheckoutPaths?: boolean;
|
|
53
|
+
}
|
|
54
|
+
/** What {@link checkoutPaths} did. */
|
|
55
|
+
export interface CheckoutPathsOutcome {
|
|
56
|
+
/** false where git returns 1 (an error was reported) */
|
|
57
|
+
ok: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* git's exit status where it is neither 0 nor 1: 255 once `checkout_worktree` reported an
|
|
60
|
+
* error (an entry it could not write: its `error()` returns -1)
|
|
61
|
+
*/
|
|
62
|
+
exitCode?: number;
|
|
63
|
+
/** git's `error: ...` lines */
|
|
64
|
+
errors: string[];
|
|
65
|
+
/** The other stderr lines: warnings and the counts */
|
|
66
|
+
warnings: string[];
|
|
67
|
+
/** The paths written to the worktree */
|
|
68
|
+
updated: string[];
|
|
69
|
+
/** The paths unlinked from the worktree */
|
|
70
|
+
removed: string[];
|
|
71
|
+
/** The elements that matched nothing, or the paths an error named */
|
|
72
|
+
conflicts: string[];
|
|
73
|
+
}
|
|
74
|
+
/** A path checkout as `checkout` or `restore` was asked for it (`checkout_opts`). */
|
|
75
|
+
export interface PathCheckoutRequest {
|
|
76
|
+
/** Which command: its option checks and messages differ */
|
|
77
|
+
command: "checkout" | "restore";
|
|
78
|
+
/** The pathspec elements as given */
|
|
79
|
+
paths: readonly string[];
|
|
80
|
+
/** The whole index (or tree), whatever the paths: nothing is reported unmatched */
|
|
81
|
+
allPaths?: boolean;
|
|
82
|
+
/** The tree-ish checked out of (`checkout <tree-ish> --`, `restore --source`) */
|
|
83
|
+
source?: string;
|
|
84
|
+
/** `restore --staged` (checkout: always) */
|
|
85
|
+
staged?: boolean;
|
|
86
|
+
/** `restore --worktree` (checkout: always; restore's default without `--staged`) */
|
|
87
|
+
worktree?: boolean;
|
|
88
|
+
/** `--overlay` / `--no-overlay`; default: on for checkout, off for restore */
|
|
89
|
+
overlay?: boolean;
|
|
90
|
+
ignoreSkipWorktree?: boolean;
|
|
91
|
+
/** `--ours` (2) / `--theirs` (3) */
|
|
92
|
+
stage?: number;
|
|
93
|
+
merge?: boolean;
|
|
94
|
+
conflictStyle?: ConflictStyle;
|
|
95
|
+
/** `checkout -f`: unmerged entries are passed over with a warning */
|
|
96
|
+
force?: boolean;
|
|
97
|
+
/** `restore --ignore-unmerged` */
|
|
98
|
+
ignoreUnmerged?: boolean;
|
|
99
|
+
quiet?: boolean;
|
|
100
|
+
countCheckoutPaths?: boolean;
|
|
101
|
+
/** The global pathspec magic (`GIT_LITERAL_PATHSPECS`, ...) */
|
|
102
|
+
globalMagic?: GlobalPathspecMagic;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* `checkout_main`'s and `checkout_paths`' option checks (git's `die()`s, thrown), the
|
|
106
|
+
* pathspec parsed, the source resolved, then {@link checkoutPaths}.
|
|
107
|
+
*
|
|
108
|
+
* @param resolveTree The object a revision names and its tree (`parse_tree_indirect`), the
|
|
109
|
+
* tree undefined when the object is no tree-ish; throws {@link RefNotFoundError} when it
|
|
110
|
+
* names nothing
|
|
111
|
+
*/
|
|
112
|
+
export declare function runPathCheckout(ctx: CheckoutPathsContext & {
|
|
113
|
+
resolveTree(rev: string): Promise<{
|
|
114
|
+
id: ObjectId;
|
|
115
|
+
tree: ObjectId | undefined;
|
|
116
|
+
}>;
|
|
117
|
+
}, req: PathCheckoutRequest): Promise<CheckoutPathsOutcome>;
|
|
118
|
+
/**
|
|
119
|
+
* Runs git's `checkout_paths` past its option checks: `read_tree_some`, `unmerge_index`,
|
|
120
|
+
* the marking (`mark_ce_for_checkout_overlay` / `_no_overlay`), `report_path_error`, the
|
|
121
|
+
* unmerged-path checks, `checkout_worktree` and the index write.
|
|
122
|
+
*/
|
|
123
|
+
export declare function checkoutPaths(ctx: CheckoutPathsContext, o: CheckoutPathsOptions): Promise<CheckoutPathsOutcome>;
|
|
124
|
+
//# sourceMappingURL=checkout-paths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkout-paths.d.ts","sourceRoot":"","sources":["../../src/commands/checkout-paths.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
+
import type { PersonIdent } from "@statewalker/vcs-core";
|
|
1
2
|
import { GitCommand } from "../git-command.js";
|
|
2
3
|
import { type CherryPickResult } from "../results/cherry-pick-result.js";
|
|
3
4
|
import { type ContentMergeStrategy, MergeStrategy } from "../results/merge-result.js";
|
|
5
|
+
import { type CommitEditor } from "./commit-command.js";
|
|
6
|
+
import { SequencerOperation } from "./sequencer-pick.js";
|
|
4
7
|
/**
|
|
5
8
|
* Cherry-pick commits onto current branch.
|
|
6
9
|
*
|
|
7
|
-
* Equivalent to `git cherry-pick
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
+
* Equivalent to `git cherry-pick`: each commit's change merged into HEAD by git's merge-ort,
|
|
11
|
+
* written to the index and the working tree, and committed with the commit's author and
|
|
12
|
+
* message. Refused, with git's messages, on staged changes, unmerged entries, or where the
|
|
13
|
+
* change would overwrite local changes or untracked files. A conflict stops with git's
|
|
14
|
+
* markers (`<<<<<<< HEAD` / `>>>>>>> <abbrev> (<subject>)`), stages 1-3 and git's state
|
|
15
|
+
* (`CHERRY_PICK_HEAD`, `MERGE_MSG`, `AUTO_MERGE`, and `sequencer/` for several commits), so
|
|
16
|
+
* native git can `--continue`, `--skip` or `--abort` it, and the other way round
|
|
17
|
+
* ({@link setOperation}).
|
|
10
18
|
*
|
|
11
19
|
* @example
|
|
12
20
|
* ```typescript
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* .call();
|
|
17
|
-
*
|
|
18
|
-
* // Cherry-pick without committing
|
|
19
|
-
* const result = await git.cherryPick()
|
|
20
|
-
* .include(commitId)
|
|
21
|
-
* .setNoCommit(true)
|
|
22
|
-
* .call();
|
|
21
|
+
* const result = await git.cherryPick().include(commitId).call();
|
|
22
|
+
* if (result.status === CherryPickStatus.CONFLICTING) {
|
|
23
|
+
* // resolve, `git add`, then
|
|
24
|
+
* await git.cherryPick().setOperation(SequencerOperation.CONTINUE).call();
|
|
25
|
+
* }
|
|
23
26
|
*
|
|
24
27
|
* // Cherry-pick a merge commit
|
|
25
|
-
*
|
|
26
|
-
* .include(mergeCommitId)
|
|
27
|
-
* .setMainlineParentNumber(1)
|
|
28
|
-
* .call();
|
|
28
|
+
* await git.cherryPick().include(mergeCommitId).setMainlineParentNumber(1).call();
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
31
|
export declare class CherryPickCommand extends GitCommand<CherryPickResult> {
|
|
@@ -36,6 +36,10 @@ export declare class CherryPickCommand extends GitCommand<CherryPickResult> {
|
|
|
36
36
|
private contentStrategy?;
|
|
37
37
|
private ourCommitName?;
|
|
38
38
|
private reflogPrefix;
|
|
39
|
+
private operation;
|
|
40
|
+
private committer?;
|
|
41
|
+
private edit?;
|
|
42
|
+
private editor?;
|
|
39
43
|
/**
|
|
40
44
|
* Add a commit to cherry-pick.
|
|
41
45
|
*
|
|
@@ -43,9 +47,8 @@ export declare class CherryPickCommand extends GitCommand<CherryPickResult> {
|
|
|
43
47
|
*/
|
|
44
48
|
include(refOrId: string): this;
|
|
45
49
|
/**
|
|
46
|
-
* Set whether to commit after cherry-pick
|
|
47
|
-
*
|
|
48
|
-
* When true, changes are staged but not committed.
|
|
50
|
+
* Set whether to commit after cherry-pick (`--no-commit` when true: the change is left in
|
|
51
|
+
* the index and the worktree, with `MERGE_MSG`).
|
|
49
52
|
*
|
|
50
53
|
* @param noCommit Whether to skip committing (default: false)
|
|
51
54
|
*/
|
|
@@ -53,16 +56,11 @@ export declare class CherryPickCommand extends GitCommand<CherryPickResult> {
|
|
|
53
56
|
/**
|
|
54
57
|
* Set mainline parent number for cherry-picking merge commits.
|
|
55
58
|
*
|
|
56
|
-
* For regular commits, this is not needed. For merge commits,
|
|
57
|
-
* this specifies which parent to diff against (1-indexed).
|
|
58
|
-
*
|
|
59
59
|
* @param parent Parent number (1 = first parent, 2 = second parent)
|
|
60
60
|
*/
|
|
61
61
|
setMainlineParentNumber(parent: number): this;
|
|
62
62
|
/**
|
|
63
|
-
* Set the merge strategy.
|
|
64
|
-
*
|
|
65
|
-
* Default is "recursive".
|
|
63
|
+
* Set the merge strategy (only git's merge-ort is run; kept for compatibility).
|
|
66
64
|
*
|
|
67
65
|
* @param strategy Merge strategy to use
|
|
68
66
|
*/
|
|
@@ -72,7 +70,7 @@ export declare class CherryPickCommand extends GitCommand<CherryPickResult> {
|
|
|
72
70
|
*/
|
|
73
71
|
getStrategy(): MergeStrategy;
|
|
74
72
|
/**
|
|
75
|
-
* Set the content merge strategy for handling conflicts.
|
|
73
|
+
* Set the content merge strategy for handling conflicts (`-X ours`, `-X theirs`).
|
|
76
74
|
*
|
|
77
75
|
* @param contentStrategy Content merge strategy
|
|
78
76
|
*/
|
|
@@ -101,28 +99,38 @@ export declare class CherryPickCommand extends GitCommand<CherryPickResult> {
|
|
|
101
99
|
* Get the reflog prefix.
|
|
102
100
|
*/
|
|
103
101
|
getReflogPrefix(): string;
|
|
104
|
-
call(): Promise<CherryPickResult>;
|
|
105
102
|
/**
|
|
106
|
-
*
|
|
103
|
+
* Pick the included commits (default), or `--continue`, `--skip`, `--abort`, `--quit`
|
|
104
|
+
* the cherry-pick in progress.
|
|
107
105
|
*/
|
|
108
|
-
|
|
106
|
+
setOperation(operation: SequencerOperation): this;
|
|
107
|
+
/** The committer of the commits made (default: resolved as git resolves it). */
|
|
108
|
+
setCommitter(committer: PersonIdent): this;
|
|
109
109
|
/**
|
|
110
|
-
*
|
|
110
|
+
* `--edit` (`-e`): each cherry-pick that applies cleanly is committed as git commits it then,
|
|
111
|
+
* by `git commit -n -e`: the message goes through the editor ({@link setEditor}) in git
|
|
112
|
+
* commit's template (with its help and status, as `commit.status` says), with git
|
|
113
|
+
* commit's prepare-commit-msg (told `merge`) and post-commit hooks, and without pre-commit
|
|
114
|
+
* or commit-msg. `false` (`--no-edit`) commits the message as it is, as does leaving it unset
|
|
115
|
+
* (the default). Given either way, it is saved in `sequencer/opts` (`options.edit`) for a
|
|
116
|
+
* run of several commits: `--continue` then commits a resolved conflict under `--edit` by
|
|
117
|
+
* plain `git commit` (its editor, every hook), and edits the picks after it.
|
|
111
118
|
*/
|
|
112
|
-
|
|
119
|
+
setEdit(edit: boolean): this;
|
|
113
120
|
/**
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
* The cherry-pick merge is: apply changes from parent->commit onto head.
|
|
121
|
+
* The editor of {@link setEdit} (git's `core.editor` / `GIT_EDITOR`): see
|
|
122
|
+
* `CommitCommand.setEditor`. Without one the template is kept as it is (comments stripped).
|
|
117
123
|
*/
|
|
118
|
-
|
|
124
|
+
setEditor(editor: CommitEditor): this;
|
|
119
125
|
/**
|
|
120
|
-
*
|
|
126
|
+
* The sequencer's `git commit`: run_git_commit's `git commit -n -e` for an edited cherry-pick
|
|
127
|
+
* (GIT_REFLOG_ACTION set), or continue_single_pick's `git commit` for a resolved conflict
|
|
128
|
+
* (`--no-edit --cleanup=strip` unless edited; every hook, its own reflog message).
|
|
121
129
|
*/
|
|
122
|
-
private
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
private
|
|
130
|
+
private gitCommit;
|
|
131
|
+
call(): Promise<CherryPickResult>;
|
|
132
|
+
/** What the sparse checkout printed while the result was written. */
|
|
133
|
+
private readonly sparseWarnings;
|
|
134
|
+
private run;
|
|
127
135
|
}
|
|
128
136
|
//# sourceMappingURL=cherry-pick-command.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cherry-pick-command.d.ts","sourceRoot":"","sources":["../../src/commands/cherry-pick-command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cherry-pick-command.d.ts","sourceRoot":"","sources":["../../src/commands/cherry-pick-command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIzD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,KAAK,gBAAgB,EAAoB,MAAM,kCAAkC,CAAC;AAC3F,OAAO,EAAE,KAAK,oBAAoB,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACtF,OAAO,EAAiB,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAIvE,OAAO,EAIL,kBAAkB,EACnB,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAAa,iBAAkB,SAAQ,UAAU,CAAC,gBAAgB,CAAC;IACjE,OAAO,CAAC,QAAQ,CAAgB;IAChC,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,cAAc,CAAC,CAAS;IAChC,OAAO,CAAC,QAAQ,CAA0C;IAC1D,OAAO,CAAC,eAAe,CAAC,CAAuB;IAC/C,OAAO,CAAC,aAAa,CAAC,CAAS;IAC/B,OAAO,CAAC,YAAY,CAAkB;IACtC,OAAO,CAAC,SAAS,CAA4B;IAC7C,OAAO,CAAC,SAAS,CAAC,CAAc;IAChC,OAAO,CAAC,IAAI,CAAC,CAAU;IACvB,OAAO,CAAC,MAAM,CAAC,CAAe;IAE9B;;;;OAIG;IACH,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAI7B;IAED;;;;;OAKG;IACH,WAAW,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAInC;IAED;;;;OAIG;IACH,uBAAuB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAI5C;IAED;;;;OAIG;IACH,WAAW,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI,CAIzC;IAED;;OAEG;IACH,WAAW,IAAI,aAAa,CAE3B;IAED;;;;OAIG;IACH,uBAAuB,CAAC,eAAe,EAAE,oBAAoB,GAAG,IAAI,CAInE;IAED;;OAEG;IACH,uBAAuB,IAAI,oBAAoB,GAAG,SAAS,CAE1D;IAED;;;;OAIG;IACH,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAInC;IAED;;OAEG;IACH,gBAAgB,IAAI,MAAM,GAAG,SAAS,CAErC;IAED;;;;OAIG;IACH,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAIpC;IAED;;OAEG;IACH,eAAe,IAAI,MAAM,CAExB;IAED;;;OAGG;IACH,YAAY,CAAC,SAAS,EAAE,kBAAkB,GAAG,IAAI,CAIhD;IAED,gFAAgF;IAChF,YAAY,CAAC,SAAS,EAAE,WAAW,GAAG,IAAI,CAIzC;IAED;;;;;;;;;OASG;IACH,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAI3B;IAED;;;OAGG;IACH,SAAS,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAIpC;IAED;;;;OAIG;YACW,SAAS;IAoBjB,IAAI,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAWtC;IAED,qEAAqE;IACrE,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAgB;YAEjC,GAAG;CAwClB"}
|
|
@@ -5,8 +5,20 @@ import { GitCommand } from "../git-command.js";
|
|
|
5
5
|
export interface CleanResult {
|
|
6
6
|
/** Files that were (or would be) removed */
|
|
7
7
|
cleaned: Set<string>;
|
|
8
|
+
/**
|
|
9
|
+
* Nested repositories left in untracked directories (`git clean -n`: "Would skip
|
|
10
|
+
* repository"); one directly under a tracked directory is passed over silently, as git
|
|
11
|
+
*/
|
|
12
|
+
skipped: Set<string>;
|
|
8
13
|
/** Whether this was a dry run (no files actually removed) */
|
|
9
14
|
dryRun: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* git's warnings, in order: "warning: could not open directory 'u/': Permission denied"
|
|
17
|
+
* for each directory the scan could not list, then (not on a dry run) "warning: failed
|
|
18
|
+
* to remove u: Directory not empty" for each such directory git's `remove_dirs` could not
|
|
19
|
+
* remove (git then exits with status 1)
|
|
20
|
+
*/
|
|
21
|
+
warnings: string[];
|
|
10
22
|
}
|
|
11
23
|
/**
|
|
12
24
|
* Remove untracked files from working tree.
|
|
@@ -47,6 +59,8 @@ export declare class CleanCommand extends GitCommand<CleanResult> {
|
|
|
47
59
|
private dryRun;
|
|
48
60
|
private directories;
|
|
49
61
|
private ignore;
|
|
62
|
+
private ignoredOnly;
|
|
63
|
+
private forceNested;
|
|
50
64
|
/**
|
|
51
65
|
* Limit clean to specific paths.
|
|
52
66
|
*
|
|
@@ -63,7 +77,8 @@ export declare class CleanCommand extends GitCommand<CleanResult> {
|
|
|
63
77
|
*/
|
|
64
78
|
setDryRun(dryRun: boolean): this;
|
|
65
79
|
/**
|
|
66
|
-
* Set whether to also clean directories
|
|
80
|
+
* Set whether to also clean untracked directories (`git clean -d`): their untracked
|
|
81
|
+
* files are removed and each directory once it is empty.
|
|
67
82
|
*
|
|
68
83
|
* @param directories Whether to clean directories
|
|
69
84
|
*/
|
|
@@ -78,14 +93,62 @@ export declare class CleanCommand extends GitCommand<CleanResult> {
|
|
|
78
93
|
*/
|
|
79
94
|
setIgnore(ignore: boolean): this;
|
|
80
95
|
/**
|
|
81
|
-
*
|
|
96
|
+
* Set whether to remove only the files the ignore rules exclude (`git clean -X`),
|
|
97
|
+
* keeping untracked files that are not ignored. Off by default; it takes precedence over
|
|
98
|
+
* {@link setIgnore}.
|
|
99
|
+
*
|
|
100
|
+
* @param ignoredOnly Whether to remove only ignored files
|
|
101
|
+
*/
|
|
102
|
+
setIgnoredOnly(ignoredOnly: boolean): this;
|
|
103
|
+
/**
|
|
104
|
+
* Set whether nested repositories (untracked directories with their own `.git`) are
|
|
105
|
+
* removed too, as `git clean -ff`. Off by default: they are skipped, as `git clean -f`
|
|
106
|
+
* skips them, and listed in `skipped`.
|
|
107
|
+
*
|
|
108
|
+
* @param force Whether to remove nested repositories
|
|
109
|
+
*/
|
|
110
|
+
setForceNestedRepositories(force: boolean): this;
|
|
111
|
+
/**
|
|
112
|
+
* Execute the clean command, as `git clean -f` (`-d` with `setCleanDirectories(true)`,
|
|
113
|
+
* `-x` with `setIgnore(false)`, `-X` with `setIgnoredOnly(true)`, `-ff` with
|
|
114
|
+
* `setForceNestedRepositories(true)`, `-n` with dry run, path filters as git's
|
|
115
|
+
* pathspecs). The worktree is read as git's directory scan reads it for `git clean`
|
|
116
|
+
* (a port of `read_directory` with the flags `git clean` sets, and of
|
|
117
|
+
* `correct_untracked_entries`), and each entry is removed as git removes it:
|
|
118
|
+
* - a file by itself;
|
|
119
|
+
* - a directory (only with `-d` or a path filter) as git's `remove_dirs`: everything in
|
|
120
|
+
* it, file by file and then each directory once empty, a `.git` that is no repository
|
|
121
|
+
* included; nested repositories are skipped ("Would skip repository") unless `-ff`
|
|
122
|
+
* removes them whole; an unreadable directory is removed only when empty (`rmdir`),
|
|
123
|
+
* else kept with git's "failed to remove" warning;
|
|
124
|
+
* - `cleaned` lists what `git clean -n` prints after "Would remove": a directory removed
|
|
125
|
+
* whole as `dir/`, else what went in it; `skipped` the nested repositories.
|
|
82
126
|
*
|
|
83
127
|
* @returns CleanResult with set of cleaned files
|
|
84
128
|
*/
|
|
85
129
|
call(): Promise<CleanResult>;
|
|
86
130
|
/**
|
|
87
|
-
*
|
|
131
|
+
* git's `cmd_clean`: the worktree is read as git's `fill_directory` reads it (with the
|
|
132
|
+
* flags `git clean` sets), the entries are corrected as `correct_untracked_entries` does,
|
|
133
|
+
* and each is removed as git removes it: a file by itself, a directory by `remove_dirs`.
|
|
134
|
+
*/
|
|
135
|
+
private clean;
|
|
136
|
+
/**
|
|
137
|
+
* The worktree as `git clean` sees it, as a tree: every entry (ignored ones too), nested
|
|
138
|
+
* repositories (not entered), `.git` entries that name no repository (entered: git
|
|
139
|
+
* removes what is in them when it removes their directory) and unreadable directories.
|
|
140
|
+
*/
|
|
141
|
+
private loadTree;
|
|
142
|
+
/**
|
|
143
|
+
* git's removal of the entries: a file is unlinked; a directory goes through
|
|
144
|
+
* `remove_dirs`, which removes everything in it (a `.git` that is no repository included,
|
|
145
|
+
* whatever the ignore rules say: the directory scan already decided), skips nested
|
|
146
|
+
* repositories ("Would skip repository") unless `-ff` removes them whole, and reports a
|
|
147
|
+
* directory wholly removed as `dir/`, else what went in it (directories without the
|
|
148
|
+
* slash). Files are removed one by one and directories once empty, deepest first; only a
|
|
149
|
+
* nested repository under `-ff` is removed recursively. An unreadable directory is never
|
|
150
|
+
* removed.
|
|
88
151
|
*/
|
|
89
|
-
private
|
|
152
|
+
private removeEntries;
|
|
90
153
|
}
|
|
91
154
|
//# sourceMappingURL=clean-command.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clean-command.d.ts","sourceRoot":"","sources":["../../src/commands/clean-command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"clean-command.d.ts","sourceRoot":"","sources":["../../src/commands/clean-command.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAgB/C;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,4CAA4C;IAC5C,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACrB;;;OAGG;IACH,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACrB,6DAA6D;IAC7D,MAAM,EAAE,OAAO,CAAC;IAChB;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,qBAAa,YAAa,SAAQ,UAAU,CAAC,WAAW,CAAC;IACvD,OAAO,CAAC,KAAK,CAAqB;IAClC,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,WAAW,CAAS;IAE5B;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,IAAI,CAIjC;IAED;;;;;;;OAOG;IACH,SAAS,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAI/B;IAED;;;;;OAKG;IACH,mBAAmB,CAAC,WAAW,EAAE,OAAO,GAAG,IAAI,CAI9C;IAED;;;;;;;OAOG;IACH,SAAS,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAI/B;IAED;;;;;;OAMG;IACH,cAAc,CAAC,WAAW,EAAE,OAAO,GAAG,IAAI,CAIzC;IAED;;;;;;OAMG;IACH,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAI/C;IAED;;;;;;;;;;;;;;;;;OAiBG;IACG,IAAI,IAAI,OAAO,CAAC,WAAW,CAAC,CAYjC;IAED;;;;OAIG;YACW,KAAK;IAoDnB;;;;OAIG;YACW,QAAQ;IAwEtB;;;;;;;;;OASG;YACW,aAAa;CAmE5B"}
|