@statewalker/vcs-commands 0.5.0 → 0.7.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 +300 -18
- 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 +49 -16
- package/dist/commands/clean-command.d.ts.map +1 -1
- package/dist/commands/clone-command.d.ts +134 -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 +311 -17
- package/dist/commands/commit-command.d.ts.map +1 -1
- package/dist/commands/core-config.d.ts +78 -1
- package/dist/commands/core-config.d.ts.map +1 -1
- package/dist/commands/date-format.d.ts +58 -0
- package/dist/commands/date-format.d.ts.map +1 -0
- package/dist/commands/default-branch.d.ts +70 -0
- package/dist/commands/default-branch.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 +149 -10
- 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 +227 -0
- package/dist/commands/fsck/fsck-command.d.ts.map +1 -0
- package/dist/commands/fsck/fsck-loose.d.ts +71 -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 +159 -0
- package/dist/commands/fsck/fsck-object-checks.d.ts.map +1 -0
- package/dist/commands/fsck/fsck-object-table.d.ts +140 -0
- package/dist/commands/fsck/fsck-object-table.d.ts.map +1 -0
- package/dist/commands/fsck/fsck-pack.d.ts +122 -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 +106 -39
- package/dist/commands/gc-command.d.ts.map +1 -1
- package/dist/commands/git-date.d.ts +2 -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 +424 -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 +233 -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 +56 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +3 -2
- package/dist/commands/init-command.d.ts +62 -4
- package/dist/commands/init-command.d.ts.map +1 -1
- package/dist/commands/legacy-remotes.d.ts +55 -0
- package/dist/commands/legacy-remotes.d.ts.map +1 -0
- 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 +221 -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 +260 -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 +116 -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 +44 -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 +59 -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 +31 -0
- 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 +89 -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 +325 -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 +42 -8
- package/dist/commands/stash-apply-command.d.ts.map +1 -1
- package/dist/commands/stash-create-command.d.ts +156 -2
- package/dist/commands/stash-create-command.d.ts.map +1 -1
- package/dist/commands/stash-drop-command.d.ts +2 -0
- package/dist/commands/stash-drop-command.d.ts.map +1 -1
- package/dist/commands/stash-working-tree.d.ts +23 -0
- package/dist/commands/stash-working-tree.d.ts.map +1 -1
- package/dist/commands/status-command.d.ts +300 -15
- 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 +85 -1
- package/dist/commands/tree-restore.d.ts.map +1 -1
- package/dist/commands/untracked-cache-support.d.ts +54 -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 +146 -6
- package/dist/commands/worktree-overwrite-checks.d.ts.map +1 -1
- 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-DIJ91NnD.js +62225 -0
- package/dist/core-commands/add.command.impl.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 +16 -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 +354 -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-BGiOJ8Zk.js +7246 -0
- package/dist/git-command.d.ts +428 -32
- package/dist/git-command.d.ts.map +1 -1
- package/dist/git.d.ts +315 -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 -1
- package/dist/remote-config/index.d.ts.map +1 -1
- package/dist/remote-config/remote-config-store.d.ts +167 -6
- package/dist/remote-config/remote-config-store.d.ts.map +1 -1
- package/dist/remote-config/remote-refs.d.ts +7 -3
- package/dist/remote-config/remote-refs.d.ts.map +1 -1
- 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 +18 -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 +15 -0
- 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/init-result.d.ts +7 -0
- package/dist/results/init-result.d.ts.map +1 -1
- 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 +17 -3
- package/dist/results/pull-result.d.ts.map +1 -1
- package/dist/results/push-result.d.ts +47 -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 +60 -6
- package/dist/results/status-result.d.ts.map +1 -1
- package/dist/results-WVlBhVb1.js +2935 -0
- package/dist/transport-command.d.ts +44 -1
- package/dist/transport-command.d.ts.map +1 -1
- package/package.json +15 -11
- package/src/commands/add-command.ts +1291 -226
- 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 +842 -0
- package/src/commands/apply/apply-engine.ts +1602 -0
- package/src/commands/apply/apply-parse.ts +1210 -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 +1080 -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 +1290 -243
- package/src/commands/checkout-paths.ts +784 -0
- package/src/commands/cherry-pick-command.ts +156 -396
- package/src/commands/clean-command.ts +504 -156
- package/src/commands/clone-command.ts +748 -69
- package/src/commands/comment-char-config.ts +160 -0
- package/src/commands/commit-command.ts +1782 -166
- package/src/commands/core-config.ts +166 -6
- package/src/commands/date-format.ts +668 -0
- package/src/commands/default-branch.ts +196 -0
- package/src/commands/describe-command.ts +2 -0
- package/src/commands/diff-command.ts +1916 -110
- package/src/commands/diff-textconv.ts +50 -0
- package/src/commands/fetch-command.ts +622 -68
- package/src/commands/format-patch-command.ts +974 -0
- package/src/commands/fsck/fetch-fsck.ts +229 -0
- package/src/commands/fsck/fsck-command.ts +3464 -0
- package/src/commands/fsck/fsck-loose.ts +297 -0
- package/src/commands/fsck/fsck-msg-ids.ts +176 -0
- package/src/commands/fsck/fsck-object-checks.ts +1085 -0
- package/src/commands/fsck/fsck-object-table.ts +373 -0
- package/src/commands/fsck/fsck-pack.ts +634 -0
- package/src/commands/fsck/index.ts +5 -0
- package/src/commands/fsck/verify-pack-command.ts +252 -0
- package/src/commands/gc-command.ts +324 -77
- package/src/commands/git-date.ts +9 -0
- package/src/commands/git-describe.ts +316 -0
- package/src/commands/git-hooks.ts +1483 -0
- package/src/commands/git-ident.ts +344 -0
- package/src/commands/hook-command.ts +247 -0
- package/src/commands/index-adder.ts +711 -0
- package/src/commands/index-host.ts +291 -0
- package/src/commands/index.ts +84 -0
- package/src/commands/init-command.ts +194 -14
- package/src/commands/legacy-remotes.ts +224 -0
- package/src/commands/local-clone.ts +183 -0
- package/src/commands/local-transport.ts +762 -0
- package/src/commands/log-command.ts +1930 -170
- package/src/commands/log-graph.ts +671 -0
- package/src/commands/log-output.ts +1359 -0
- package/src/commands/ls-remote-command.ts +105 -58
- package/src/commands/mailmap.ts +129 -0
- package/src/commands/merge-bases.ts +296 -0
- package/src/commands/merge-command.ts +1416 -491
- package/src/commands/merge-config.ts +25 -0
- package/src/commands/merge-drivers.ts +306 -0
- package/src/commands/merge-support.ts +1219 -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 +777 -0
- package/src/commands/notes-support.ts +402 -0
- package/src/commands/notes-tree.ts +617 -0
- package/src/commands/object-id-input.ts +27 -0
- package/src/commands/octopus-merge.ts +378 -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 +204 -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 +1432 -0
- package/src/commands/promisor-remote.ts +298 -0
- package/src/commands/pull-command.ts +326 -33
- package/src/commands/push-command.ts +257 -29
- package/src/commands/read-tree-command.ts +861 -0
- package/src/commands/rebase-command.ts +3820 -372
- 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 +124 -23
- package/src/commands/remote-transport.ts +383 -0
- package/src/commands/reset-command.ts +821 -104
- package/src/commands/restore-command.ts +350 -0
- package/src/commands/rev-list-command.ts +167 -0
- package/src/commands/rev-parse-command.ts +299 -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 +1397 -0
- package/src/commands/rm-command.ts +613 -67
- package/src/commands/sequencer-pick.ts +874 -0
- package/src/commands/sequencer-support.ts +876 -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 +376 -343
- package/src/commands/stash-create-command.ts +625 -42
- package/src/commands/stash-drop-command.ts +15 -2
- package/src/commands/stash-working-tree.ts +168 -24
- package/src/commands/status-command.ts +1326 -105
- package/src/commands/status-format.ts +775 -0
- package/src/commands/status-header.ts +332 -0
- package/src/commands/strerror.ts +29 -0
- package/src/commands/submodule-config.ts +94 -0
- package/src/commands/submodule-summary-command.ts +333 -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 +204 -4
- package/src/commands/untracked-cache-support.ts +198 -0
- package/src/commands/worktree-add-command.ts +458 -0
- package/src/commands/worktree-list-command.ts +206 -0
- package/src/commands/worktree-lock-command.ts +96 -0
- package/src/commands/worktree-overwrite-checks.ts +452 -26
- 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 +8 -2
- package/src/errors/add-errors.ts +45 -0
- package/src/errors/checkout-errors.ts +26 -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 +1207 -118
- package/src/git.ts +538 -12
- package/src/index.ts +1 -1
- package/src/remote-config/index.ts +2 -0
- package/src/remote-config/remote-config-store.ts +378 -18
- package/src/remote-config/remote-refs.ts +22 -6
- package/src/rename/detect-renames.ts +715 -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 +21 -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 +1053 -0
- package/src/results/fetch-result.ts +15 -0
- package/src/results/index.ts +5 -0
- package/src/results/init-result.ts +9 -0
- package/src/results/merge-result.ts +15 -1
- package/src/results/pull-result.ts +17 -3
- package/src/results/push-result.ts +48 -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 +127 -46
- package/src/transport-command.ts +121 -2
- package/dist/commands-CsLNyvZ1.js +0 -12587
- package/dist/status-result-BpyUK1Sg.js +0 -519
|
@@ -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,UAA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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"}
|
|
@@ -12,6 +12,13 @@ export interface CleanResult {
|
|
|
12
12
|
skipped: Set<string>;
|
|
13
13
|
/** Whether this was a dry run (no files actually removed) */
|
|
14
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[];
|
|
15
22
|
}
|
|
16
23
|
/**
|
|
17
24
|
* Remove untracked files from working tree.
|
|
@@ -52,6 +59,7 @@ export declare class CleanCommand extends GitCommand<CleanResult> {
|
|
|
52
59
|
private dryRun;
|
|
53
60
|
private directories;
|
|
54
61
|
private ignore;
|
|
62
|
+
private ignoredOnly;
|
|
55
63
|
private forceNested;
|
|
56
64
|
/**
|
|
57
65
|
* Limit clean to specific paths.
|
|
@@ -84,6 +92,14 @@ export declare class CleanCommand extends GitCommand<CleanResult> {
|
|
|
84
92
|
* @param ignore Whether to respect .gitignore
|
|
85
93
|
*/
|
|
86
94
|
setIgnore(ignore: boolean): this;
|
|
95
|
+
/**
|
|
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;
|
|
87
103
|
/**
|
|
88
104
|
* Set whether nested repositories (untracked directories with their own `.git`) are
|
|
89
105
|
* removed too, as `git clean -ff`. Off by default: they are skipped, as `git clean -f`
|
|
@@ -94,28 +110,45 @@ export declare class CleanCommand extends GitCommand<CleanResult> {
|
|
|
94
110
|
setForceNestedRepositories(force: boolean): this;
|
|
95
111
|
/**
|
|
96
112
|
* Execute the clean command, as `git clean -f` (`-d` with `setCleanDirectories(true)`,
|
|
97
|
-
* `-x` with `setIgnore(false)`, `-
|
|
98
|
-
* dry run
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
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.
|
|
107
126
|
*
|
|
108
127
|
* @returns CleanResult with set of cleaned files
|
|
109
128
|
*/
|
|
110
129
|
call(): Promise<CleanResult>;
|
|
111
130
|
/**
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
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`.
|
|
115
134
|
*/
|
|
116
|
-
private matchesPaths;
|
|
117
|
-
/** Whether a requested path names `path` itself. */
|
|
118
|
-
private namesPath;
|
|
119
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.
|
|
151
|
+
*/
|
|
152
|
+
private removeEntries;
|
|
120
153
|
}
|
|
121
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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../results/clone-result.js";
|
|
2
3
|
import { TransportCommand } from "../transport-command.js";
|
|
3
4
|
import { TagOption } from "./fetch-command.js";
|
|
@@ -59,10 +60,16 @@ import { TagOption } from "./fetch-command.js";
|
|
|
59
60
|
*/
|
|
60
61
|
export declare class CloneCommand extends TransportCommand<CloneResult> {
|
|
61
62
|
private uri?;
|
|
63
|
+
/** The source as clone.c records it: an existing path made absolute, else the URL */
|
|
64
|
+
private repoUrl?;
|
|
62
65
|
private branch?;
|
|
63
66
|
private depth?;
|
|
67
|
+
/** `--filter=<spec>`, expanded as git sends and records it */
|
|
68
|
+
private filterSpec?;
|
|
69
|
+
private uploadPack?;
|
|
64
70
|
private bare;
|
|
65
71
|
private noCheckout;
|
|
72
|
+
private sparse;
|
|
66
73
|
private remoteName;
|
|
67
74
|
private cloneAllBranches;
|
|
68
75
|
private mirror;
|
|
@@ -71,6 +78,19 @@ export declare class CloneCommand extends TransportCommand<CloneResult> {
|
|
|
71
78
|
private tagOption;
|
|
72
79
|
private shallowSince?;
|
|
73
80
|
private shallowExcludes;
|
|
81
|
+
private directory?;
|
|
82
|
+
private shared;
|
|
83
|
+
/** `--local` (true), `--no-local` (false), neither (undefined: local for a path) */
|
|
84
|
+
private local?;
|
|
85
|
+
private dissociate;
|
|
86
|
+
/** `--reference` (required) and `--reference-if-able` paths, in the order given */
|
|
87
|
+
private references;
|
|
88
|
+
/**
|
|
89
|
+
* The destination directory as `git clone <url> <directory>` names it, for messages only
|
|
90
|
+
* (the clone goes into the working copy the command was made for). Default: the last
|
|
91
|
+
* component of the worktree's top.
|
|
92
|
+
*/
|
|
93
|
+
setDirectory(directory: string): this;
|
|
74
94
|
/**
|
|
75
95
|
* Set the URI to clone from.
|
|
76
96
|
*
|
|
@@ -101,6 +121,31 @@ export declare class CloneCommand extends TransportCommand<CloneResult> {
|
|
|
101
121
|
* @param depth Number of commits to fetch
|
|
102
122
|
*/
|
|
103
123
|
setDepth(depth: number): this;
|
|
124
|
+
/**
|
|
125
|
+
* A partial clone (git's `clone --filter=<spec>`): the server is asked to leave out what
|
|
126
|
+
* the filter omits (`blob:none`, `blob:limit=<n>`, `tree:<depth>`, `sparse:oid=<blob-ish>`,
|
|
127
|
+
* `object:type=<type>`, `combine:...`), the received pack is kept as a promisor pack, and the
|
|
128
|
+
* remote is recorded as git's partial_clone_register does (`core.repositoryformatversion =
|
|
129
|
+
* 1`, `remote.<name>.promisor`, `remote.<name>.partialclonefilter`). A server that takes
|
|
130
|
+
* no filters sends everything, with git's warning; a local clone ignores the filter
|
|
131
|
+
* (`--filter is ignored in local clones; use file:// instead.`), its config still written.
|
|
132
|
+
*
|
|
133
|
+
* Objects left out are fetched lazily from the remote when read (the checkout fetches the
|
|
134
|
+
* blobs it writes in one batch, as git's).
|
|
135
|
+
*
|
|
136
|
+
* @param spec The filter spec; `blob:limit=1k` is recorded and sent as `blob:limit=1024`
|
|
137
|
+
* @throws ObjectFilterError with git's message for a spec git refuses
|
|
138
|
+
*/
|
|
139
|
+
setFilter(spec: string): this;
|
|
140
|
+
/**
|
|
141
|
+
* Set the program the remote runs for upload-pack (git's `clone --upload-pack` / `-u`):
|
|
142
|
+
* what an ssh connector runs, and what git:// names in its request line. As git's clone,
|
|
143
|
+
* the default is `git-upload-pack` whatever `remote.<name>.uploadpack` says, and the value
|
|
144
|
+
* is not written to the new repository's config.
|
|
145
|
+
*
|
|
146
|
+
* @param uploadPack Path to git-upload-pack on the remote
|
|
147
|
+
*/
|
|
148
|
+
setUploadPack(uploadPack: string): this;
|
|
104
149
|
/**
|
|
105
150
|
* Set whether to create a bare repository.
|
|
106
151
|
*
|
|
@@ -118,6 +163,12 @@ export declare class CloneCommand extends TransportCommand<CloneResult> {
|
|
|
118
163
|
* @param noCheckout Whether to skip checkout
|
|
119
164
|
*/
|
|
120
165
|
setNoCheckout(noCheckout: boolean): this;
|
|
166
|
+
/**
|
|
167
|
+
* `git clone --sparse`: the new worktree starts as a cone-mode sparse checkout of the
|
|
168
|
+
* top-level files only (git runs `git sparse-checkout set` before its checkout), the
|
|
169
|
+
* other entries skip-worktree and not written.
|
|
170
|
+
*/
|
|
171
|
+
setSparse(sparse: boolean): this;
|
|
121
172
|
/**
|
|
122
173
|
* Whether checkout is skipped.
|
|
123
174
|
*/
|
|
@@ -229,6 +280,50 @@ export declare class CloneCommand extends TransportCommand<CloneResult> {
|
|
|
229
280
|
* @param shallowExclude The ref or commit to exclude
|
|
230
281
|
*/
|
|
231
282
|
addShallowExclude(shallowExclude: string): this;
|
|
283
|
+
/**
|
|
284
|
+
* `git clone --shared` (`-s`): a clone of a local repository path borrows the source's
|
|
285
|
+
* objects through `objects/info/alternates` (the source's common directory's `objects`)
|
|
286
|
+
* instead of fetching them. Ignored for URLs (`file://` too) and for a shallow source, as
|
|
287
|
+
* git ignores it outside `clone_local`.
|
|
288
|
+
*/
|
|
289
|
+
setShared(shared: boolean): this;
|
|
290
|
+
/**
|
|
291
|
+
* `git clone --local` (`-l`, true) / `--no-local` (false). A source given as a path to a
|
|
292
|
+
* local repository (not a URL, `file://` included) is cloned as git's `clone_local` does,
|
|
293
|
+
* unless `--no-local`: its refs are listed through the transport, but its objects directory
|
|
294
|
+
* is copied (or, with {@link setShared}, borrowed) instead of fetched, its
|
|
295
|
+
* `objects/info/alternates` entries carried over as absolute paths, and the refs written
|
|
296
|
+
* without a connectivity check; `--depth`, `--shallow-since` and `--shallow-exclude` are
|
|
297
|
+
* ignored with git's warnings (`CloneResult.messages`). A shallow source is fetched instead
|
|
298
|
+
* (`--local` then warns "source repository is shallow, ignoring --local"), and `--local`
|
|
299
|
+
* with a URL warns "--local is ignored". A store without files (memory, KV, SQL) on either
|
|
300
|
+
* side is fetched from too.
|
|
301
|
+
*/
|
|
302
|
+
setLocal(local: boolean): this;
|
|
303
|
+
/**
|
|
304
|
+
* `git clone --no-hardlinks`: git copies the files of a local clone instead of hardlinking
|
|
305
|
+
* them. Ours always copies (the FilesApi has no hard-link primitive), so this changes
|
|
306
|
+
* nothing but is accepted.
|
|
307
|
+
*/
|
|
308
|
+
setNoHardlinks(_noHardlinks: boolean): this;
|
|
309
|
+
/**
|
|
310
|
+
* `git clone --reference <repository>`: borrow from that local repository
|
|
311
|
+
* (`objects/info/alternates` names its objects) and fetch only what it lacks. A path that is
|
|
312
|
+
* no usable repository fails the clone before anything is fetched ("reference repository
|
|
313
|
+
* '<path>' is not a local repository.", "... is shallow", "... is grafted").
|
|
314
|
+
*/
|
|
315
|
+
addReference(path: string): this;
|
|
316
|
+
/**
|
|
317
|
+
* `git clone --reference-if-able <repository>`: as {@link addReference}, but a path that is
|
|
318
|
+
* no usable repository is skipped with git's "info: Could not add alternate for '<path>':
|
|
319
|
+
* <reason>" (in `CloneResult.messages`).
|
|
320
|
+
*/
|
|
321
|
+
addReferenceIfAble(path: string): this;
|
|
322
|
+
/**
|
|
323
|
+
* `git clone --dissociate`: once the refs are written, the borrowed objects are copied in
|
|
324
|
+
* (`git repack -a -d`) and `objects/info/alternates` is removed, before the checkout.
|
|
325
|
+
*/
|
|
326
|
+
setDissociate(dissociate: boolean): this;
|
|
232
327
|
/**
|
|
233
328
|
* Get the shallow excludes.
|
|
234
329
|
*/
|
|
@@ -240,6 +335,45 @@ export declare class CloneCommand extends TransportCommand<CloneResult> {
|
|
|
240
335
|
* @throws InvalidRemoteError if URI is not specified
|
|
241
336
|
*/
|
|
242
337
|
call(): Promise<CloneResult>;
|
|
338
|
+
/**
|
|
339
|
+
* Called with the working copy a clone reopened with the remote's object format (see
|
|
340
|
+
* {@link CloneResult.workingCopy}): `Git.clone()` takes it as its own.
|
|
341
|
+
*/
|
|
342
|
+
onWorkingCopyReopened(listener: (workingCopy: WorkingCopy) => void): this;
|
|
343
|
+
private reopenedListener?;
|
|
344
|
+
/**
|
|
345
|
+
* git's clone initializes the new repository with the hash the remote names
|
|
346
|
+
* (`initialize_repository_version` with `transport_get_hash_algo`): the destination, still
|
|
347
|
+
* empty, is switched to `format` and reopened (`LinkedWorktrees.reopenWithObjectFormat`),
|
|
348
|
+
* and the clone runs again into it. What the first attempt wrote before it learned the
|
|
349
|
+
* format (the alternates of `--reference` / `--shared`) is removed once the destination
|
|
350
|
+
* passed the check.
|
|
351
|
+
*/
|
|
352
|
+
private cloneReopenedAs;
|
|
353
|
+
private cloneOnce;
|
|
354
|
+
/**
|
|
355
|
+
* The alternates `git clone` writes before it fetches: each `--reference` (a required one
|
|
356
|
+
* that is no usable repository fails the clone; an optional one is reported in the returned
|
|
357
|
+
* messages), then, for `--shared` with a local source path that is not shallow, the source's
|
|
358
|
+
* objects (`<common dir>/objects`, named as git names the source: its path as given made
|
|
359
|
+
* absolute, the `.git` found below it appended).
|
|
360
|
+
*/
|
|
361
|
+
private setupAlternates;
|
|
362
|
+
/** git's `die_upon_dubious_ownership(NULL, NULL, src_repo)` before a local clone copies. */
|
|
363
|
+
private refuseDubiousSource;
|
|
364
|
+
/**
|
|
365
|
+
* clone_local's copy of the source's objects (see `local-clone.ts`), or undefined where
|
|
366
|
+
* either side keeps no files (the clone then fetches).
|
|
367
|
+
*/
|
|
368
|
+
private localObjectsCopy;
|
|
369
|
+
/**
|
|
370
|
+
* git's "destination path '<dir>' already exists and is not an empty directory" (exit
|
|
371
|
+
* 128) for a working copy that is no freshly initialised repository: one with a ref
|
|
372
|
+
* (commits, a tag), index entries or files in its worktree, or that the local source
|
|
373
|
+
* resolves to (`git clone . .`). The directory is named as the worktree's top is
|
|
374
|
+
* ({@link setDirectory}, else its last component, `.` for the root).
|
|
375
|
+
*/
|
|
376
|
+
private refuseNonEmptyDestination;
|
|
243
377
|
/**
|
|
244
378
|
* Writes the configuration `git clone` writes (clone.c): `remote.<name>.url`,
|
|
245
379
|
* `remote.<name>.tagOpt` for `--no-tags` and `--mirror` (git 2.49+), the `remote.<name>.fetch` refspec of what was
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clone-command.d.ts","sourceRoot":"","sources":["../../src/commands/clone-command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cl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AE9D;;;;;;;OAOG;YACW,eAAe;YA+Bf,SAAS;IA+YvB;;;;;;OAMG;YACW,eAAe;IA8B7B,4FAA4F;YAC9E,mBAAmB;IAWjC;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAgCxB;;;;;;OAMG;YACW,yBAAyB;IA2CvC;;;;;;OAMG;YACW,WAAW;IA6DzB,4FAA4F;YAC9E,eAAe;IAO7B;;;;;;;;;;;;;;;OAeG;YACW,YAAY;IAwC1B,2FAA2F;IAC3F,OAAO,CAAC,eAAe;CAGxB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `core.commentChar` / `core.commentString` = `auto`, deprecated in git 2.5x and removed in
|
|
3
|
+
* git 3.0 (config.c's `comment_char_callback` and `check_auto_comment_char_config`). git
|
|
4
|
+
* tracks every value of the two keys in configuration order; when the last one is exactly
|
|
5
|
+
* `auto`, a git built with `WITH_BREAKING_CHANGES` dies in every command that reads the
|
|
6
|
+
* repository's configuration, and git 2.5x warns once in commit, merge, rebase, revert and
|
|
7
|
+
* cherry-pick. Both add advice naming the files to change, as `git config` scope options.
|
|
8
|
+
*
|
|
9
|
+
* ```typescript
|
|
10
|
+
* autoCommentCharLines(workingCopy, "removed");
|
|
11
|
+
* // ["fatal: Support for 'core.commentChar=auto' has been removed in Git 3.0", "hint:",
|
|
12
|
+
* // "hint: To use the default comment string (#) please run", ...]
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
import type { WorkingCopy } from "@statewalker/vcs-working-tree";
|
|
16
|
+
import { InvalidConfigError } from "../errors/index.js";
|
|
17
|
+
/** `core.commentChar=auto` in a git 3.0 build: every command but `git config` dies (exit 128). */
|
|
18
|
+
export declare class AutoCommentCharRemovedError extends InvalidConfigError {
|
|
19
|
+
/** git's stderr: the fatal line and its hints */
|
|
20
|
+
readonly lines: string[];
|
|
21
|
+
constructor(lines: string[]);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* git's lines about an `auto` comment character, or undefined when the last value of the two
|
|
25
|
+
* keys is not exactly `auto`: `removed` gives git 3.0's death (`fatal:`), `deprecated` git
|
|
26
|
+
* 2.5x's warning (`warning:`), each followed by the advice.
|
|
27
|
+
*/
|
|
28
|
+
export declare function autoCommentCharLines(workingCopy: WorkingCopy, kind: "removed" | "deprecated"): string[] | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* The git 3.0 check every command runs as it reads the configuration (`check_deprecated_config`
|
|
31
|
+
* in `repo_read_config`): throws with git's lines when the comment character is `auto` and the
|
|
32
|
+
* host asked for git 3.0 (`GitHostEnvironment.breakingChanges`).
|
|
33
|
+
*/
|
|
34
|
+
export declare function checkAutoCommentChar(workingCopy: WorkingCopy): void;
|
|
35
|
+
//# sourceMappingURL=comment-char-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comment-char-config.d.ts","sourceRoot":"","sources":["../../src/commands/comment-char-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAsB,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAaxD,kGAAkG;AAClG,qBAAa,2BAA4B,SAAQ,kBAAkB;IACjE,iDAAiD;IACjD,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC;IACzB,YAAY,KAAK,EAAE,MAAM,EAAE,EAI1B;CACF;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,WAAW,EACxB,IAAI,EAAE,SAAS,GAAG,YAAY,GAC7B,MAAM,EAAE,GAAG,SAAS,CA+CtB;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAInE"}
|