@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
package/dist/errors/index.js
CHANGED
|
@@ -2,14 +2,78 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Base exception for all Git API errors.
|
|
4
4
|
*
|
|
5
|
-
* Based on JGit's GitAPIException hierarchy.
|
|
5
|
+
* Based on JGit's GitAPIException hierarchy. Each error carries the exit status native git
|
|
6
|
+
* ends with in the same situation ({@link GitApiError.exitCode}): 128 where git dies
|
|
7
|
+
* (`die()`, a `fatal:` line), 129 for a usage error (`usage_with_options`, a `usage:` line),
|
|
8
|
+
* 1 where a command returns after `error()`, and the few statuses of their own (`git remote`
|
|
9
|
+
* exits 2 for a missing remote, 3 for one that exists already).
|
|
6
10
|
*/
|
|
7
11
|
var GitApiError = class extends Error {
|
|
12
|
+
/**
|
|
13
|
+
* git's exit status for this failure: the one given (by the class where its condition
|
|
14
|
+
* always ends so, or by the caller), else the one the message's prefixes say (see
|
|
15
|
+
* {@link exitCodeOfMessage}), else the class's default (128 unless a subclass says
|
|
16
|
+
* otherwise).
|
|
17
|
+
*/
|
|
18
|
+
exitCode;
|
|
19
|
+
/**
|
|
20
|
+
* Every refusal of a command that reports one and goes on with the next item (git's
|
|
21
|
+
* `error()` and `continue`, as `branch -d` and `tag -d`), this error first: it is thrown
|
|
22
|
+
* once the command is done, carrying the others here.
|
|
23
|
+
*/
|
|
24
|
+
refusals;
|
|
25
|
+
/**
|
|
26
|
+
* git's stderr for {@link refusals}, one entry per refusal in order (its `error:` line with
|
|
27
|
+
* the lines git prints after it, joined by newlines), so all of them can be shown.
|
|
28
|
+
*/
|
|
29
|
+
messages;
|
|
8
30
|
constructor(message, options) {
|
|
9
31
|
super(message, options);
|
|
10
32
|
this.name = "GitApiError";
|
|
11
|
-
|
|
12
|
-
}
|
|
33
|
+
this.exitCode = options?.exitCode ?? exitCodeOfMessage(message) ?? options?.defaultExitCode ?? 128;
|
|
34
|
+
}
|
|
35
|
+
/** Sets {@link exitCode} (a status the message and the class cannot tell); returns this. */
|
|
36
|
+
withExitCode(exitCode) {
|
|
37
|
+
this.exitCode = exitCode;
|
|
38
|
+
return this;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The error a command that went on past refusals throws: the first refusal, carrying all
|
|
42
|
+
* of them ({@link refusals}) and their stderr texts ({@link messages}).
|
|
43
|
+
*/
|
|
44
|
+
static ofRefusals(refusals) {
|
|
45
|
+
const [first] = refusals;
|
|
46
|
+
first.error.refusals = refusals.map((r) => r.error);
|
|
47
|
+
first.error.messages = refusals.map((r) => r.text);
|
|
48
|
+
return first.error;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* The exit status git's message lines imply, read only where git's own prefixes stand (a
|
|
53
|
+
* path a message lists, `fatal: x.log`, is no prefix): a first line `usage:` (or `usage:`
|
|
54
|
+
* right after a first `error:` line, parse-options' error and usage) is
|
|
55
|
+
* `usage_with_options` (129); a `fatal:` line that is the last line, or the first (a die
|
|
56
|
+
* message with its own continuation or hint lines), is `die()` (128); a first line
|
|
57
|
+
* `error:` (dying nowhere) an `error()` return (1); undefined for a message without these
|
|
58
|
+
* prefixes there. A class whose condition always ends with one status says so explicitly,
|
|
59
|
+
* which this never overrides.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```typescript
|
|
63
|
+
* exitCodeOfMessage("error: tag 'x' not found."); // 1
|
|
64
|
+
* exitCodeOfMessage("error: no cherry-pick or revert in progress\nfatal: cherry-pick failed"); // 128
|
|
65
|
+
* exitCodeOfMessage("The following paths are ignored:\nusage: y.log"); // undefined
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
function exitCodeOfMessage(message) {
|
|
69
|
+
const lines = message.replace(/\n+$/, "").split("\n");
|
|
70
|
+
const first = lines[0] ?? "";
|
|
71
|
+
const last = lines[lines.length - 1] ?? "";
|
|
72
|
+
if (first.startsWith("usage: ")) return 129;
|
|
73
|
+
if (first.startsWith("error: ") && (lines[1] ?? "").startsWith("usage: ")) return 129;
|
|
74
|
+
if (last.startsWith("fatal: ") || first.startsWith("fatal: ")) return 128;
|
|
75
|
+
if (first.startsWith("error: ")) return 1;
|
|
76
|
+
}
|
|
13
77
|
//#endregion
|
|
14
78
|
//#region src/errors/add-errors.ts
|
|
15
79
|
/**
|
|
@@ -29,6 +93,42 @@ var NoFilepatternError = class extends GitApiError {
|
|
|
29
93
|
this.name = "NoFilepatternError";
|
|
30
94
|
}
|
|
31
95
|
};
|
|
96
|
+
/**
|
|
97
|
+
* Thrown when `git add` fails on paths it cannot add, with git's messages as the error's
|
|
98
|
+
* message (its standard error, line by line).
|
|
99
|
+
*
|
|
100
|
+
* - With {@link result}, the index was written (git's exit status 1): the pathspec named
|
|
101
|
+
* ignored files (`ignoredPaths`, "The following paths are ignored by one of your
|
|
102
|
+
* .gitignore files"), or `--ignore-errors` let the other paths through (`failedPaths`).
|
|
103
|
+
* - Without, nothing was written (git's exit status 128): "fatal: adding files failed" or
|
|
104
|
+
* "fatal: updating files failed" after a path that cannot be added (a nested repository
|
|
105
|
+
* without a commit checked out).
|
|
106
|
+
*
|
|
107
|
+
* @example
|
|
108
|
+
* ```typescript
|
|
109
|
+
* try {
|
|
110
|
+
* await git.add().addFilepattern("build/out.o").call();
|
|
111
|
+
* } catch (error) {
|
|
112
|
+
* if (error instanceof AddFailedError) console.log(error.ignoredPaths, error.result?.added);
|
|
113
|
+
* }
|
|
114
|
+
* ```
|
|
115
|
+
*/
|
|
116
|
+
var AddFailedError = class extends GitApiError {
|
|
117
|
+
ignoredPaths;
|
|
118
|
+
failedPaths;
|
|
119
|
+
result;
|
|
120
|
+
output;
|
|
121
|
+
warnings;
|
|
122
|
+
constructor(message, ignoredPaths = [], failedPaths = [], result, output = [], warnings = []) {
|
|
123
|
+
super(message, { exitCode: 1 });
|
|
124
|
+
this.ignoredPaths = ignoredPaths;
|
|
125
|
+
this.failedPaths = failedPaths;
|
|
126
|
+
this.result = result;
|
|
127
|
+
this.output = output;
|
|
128
|
+
this.warnings = warnings;
|
|
129
|
+
this.name = "AddFailedError";
|
|
130
|
+
}
|
|
131
|
+
};
|
|
32
132
|
//#endregion
|
|
33
133
|
//#region src/errors/checkout-errors.ts
|
|
34
134
|
/**
|
|
@@ -37,7 +137,7 @@ var NoFilepatternError = class extends GitApiError {
|
|
|
37
137
|
var PathNotInIndexError = class extends GitApiError {
|
|
38
138
|
path;
|
|
39
139
|
constructor(path, message) {
|
|
40
|
-
super(message ?? `Path not in index: ${path}
|
|
140
|
+
super(message ?? `Path not in index: ${path}`, { exitCode: 1 });
|
|
41
141
|
this.name = "PathNotInIndexError";
|
|
42
142
|
this.path = path;
|
|
43
143
|
}
|
|
@@ -49,7 +149,7 @@ var PathNotFoundInTreeError = class extends GitApiError {
|
|
|
49
149
|
path;
|
|
50
150
|
treeish;
|
|
51
151
|
constructor(path, treeish, message) {
|
|
52
|
-
super(message ?? `Path not found in tree: ${path}
|
|
152
|
+
super(message ?? `Path not found in tree: ${path}`, { exitCode: 1 });
|
|
53
153
|
this.name = "PathNotFoundInTreeError";
|
|
54
154
|
this.path = path;
|
|
55
155
|
this.treeish = treeish;
|
|
@@ -66,6 +166,45 @@ var NotADirectoryError = class extends GitApiError {
|
|
|
66
166
|
this.path = path;
|
|
67
167
|
}
|
|
68
168
|
};
|
|
169
|
+
/**
|
|
170
|
+
* Thrown when a clone fetched its objects and wrote its refs and configuration, but could
|
|
171
|
+
* not check out the commit HEAD names (git: "Clone succeeded, but checkout failed").
|
|
172
|
+
*
|
|
173
|
+
* The repository is usable: `result` is what the clone returns, and the cause says
|
|
174
|
+
* why the checkout failed. As with git, fixing the cause and checking out again (or a
|
|
175
|
+
* `reset --hard`) completes the clone.
|
|
176
|
+
*/
|
|
177
|
+
var CloneCheckoutError = class extends GitApiError {
|
|
178
|
+
result;
|
|
179
|
+
constructor(result, cause) {
|
|
180
|
+
const reason = cause instanceof Error ? cause.message : String(cause);
|
|
181
|
+
super(`Clone succeeded, but checkout failed: ${reason}`, { cause });
|
|
182
|
+
this.name = "CloneCheckoutError";
|
|
183
|
+
this.result = result;
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
/**
|
|
187
|
+
* Thrown when a clone's destination is not empty (git: "destination path '<dir>' already
|
|
188
|
+
* exists and is not an empty directory.", exit 128): nothing is written.
|
|
189
|
+
*/
|
|
190
|
+
var CloneDestinationError = class extends GitApiError {
|
|
191
|
+
constructor(message) {
|
|
192
|
+
super(message);
|
|
193
|
+
this.name = "CloneDestinationError";
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
/**
|
|
197
|
+
* Thrown when `git switch` refuses before anything changes, with git's message: a name
|
|
198
|
+
* that is not a branch (`fatal: a branch is expected, got commit '...'` and its hint), an
|
|
199
|
+
* operation in progress, a branch `-c` would create that exists, options that do not go
|
|
200
|
+
* together.
|
|
201
|
+
*/
|
|
202
|
+
var SwitchRefusedError = class extends GitApiError {
|
|
203
|
+
constructor(message) {
|
|
204
|
+
super(message, { defaultExitCode: 1 });
|
|
205
|
+
this.name = "SwitchRefusedError";
|
|
206
|
+
}
|
|
207
|
+
};
|
|
69
208
|
//#endregion
|
|
70
209
|
//#region src/errors/command-errors.ts
|
|
71
210
|
/**
|
|
@@ -74,7 +213,7 @@ var NotADirectoryError = class extends GitApiError {
|
|
|
74
213
|
var MissingArgumentError = class extends GitApiError {
|
|
75
214
|
argumentName;
|
|
76
215
|
constructor(argumentName, message) {
|
|
77
|
-
super(message ?? `Missing required argument: ${argumentName}
|
|
216
|
+
super(message ?? `Missing required argument: ${argumentName}`, { exitCode: 129 });
|
|
78
217
|
this.name = "MissingArgumentError";
|
|
79
218
|
this.argumentName = argumentName;
|
|
80
219
|
}
|
|
@@ -104,6 +243,58 @@ var IncompatibleOptionsError = class extends GitApiError {
|
|
|
104
243
|
}
|
|
105
244
|
};
|
|
106
245
|
/**
|
|
246
|
+
* Thrown when git would refuse a reset (`--merge`, `--keep`, a soft or keep reset in the
|
|
247
|
+
* middle of a merge) before anything is changed: git's message, and the paths it names.
|
|
248
|
+
*/
|
|
249
|
+
var ResetRefusedError = class extends GitApiError {
|
|
250
|
+
paths;
|
|
251
|
+
constructor(message, paths = []) {
|
|
252
|
+
super(message);
|
|
253
|
+
this.name = "ResetRefusedError";
|
|
254
|
+
this.paths = paths;
|
|
255
|
+
}
|
|
256
|
+
};
|
|
257
|
+
/**
|
|
258
|
+
* Thrown by `rm` when a path matched only entries outside the sparse checkout (git's
|
|
259
|
+
* `advise_on_updating_sparse_paths`, exit status 1): its message is git's advice; the other
|
|
260
|
+
* paths were removed all the same (`result`), unless nothing else matched.
|
|
261
|
+
*/
|
|
262
|
+
var RmFailedError = class extends GitApiError {
|
|
263
|
+
sparsePaths;
|
|
264
|
+
result;
|
|
265
|
+
constructor(message, sparsePaths, result) {
|
|
266
|
+
super(message, { defaultExitCode: 1 });
|
|
267
|
+
this.sparsePaths = sparsePaths;
|
|
268
|
+
this.result = result;
|
|
269
|
+
this.name = "RmFailedError";
|
|
270
|
+
}
|
|
271
|
+
};
|
|
272
|
+
/**
|
|
273
|
+
* Thrown by `mv` when git dies (`fatal:` lines, a check failing before anything moved, or a
|
|
274
|
+
* rename failing partway) or exits with status 1 after its sparse-checkout advice: the
|
|
275
|
+
* message is git's stderr, `result` what was done before (when anything was).
|
|
276
|
+
*/
|
|
277
|
+
var MvFailedError = class extends GitApiError {
|
|
278
|
+
result;
|
|
279
|
+
constructor(message, result) {
|
|
280
|
+
super(message, { defaultExitCode: 1 });
|
|
281
|
+
this.result = result;
|
|
282
|
+
this.name = "MvFailedError";
|
|
283
|
+
}
|
|
284
|
+
};
|
|
285
|
+
/**
|
|
286
|
+
* Thrown by `read-tree` when git refuses (`error:`/`fatal:` lines, exit status 128): an
|
|
287
|
+
* option combination it dies on, or unpack-trees refusing an entry before anything changed.
|
|
288
|
+
*/
|
|
289
|
+
var ReadTreeFailedError = class extends GitApiError {
|
|
290
|
+
paths;
|
|
291
|
+
constructor(message, paths = []) {
|
|
292
|
+
super(message);
|
|
293
|
+
this.paths = paths;
|
|
294
|
+
this.name = "ReadTreeFailedError";
|
|
295
|
+
}
|
|
296
|
+
};
|
|
297
|
+
/**
|
|
107
298
|
* Thrown when a feature is not yet implemented.
|
|
108
299
|
*/
|
|
109
300
|
var NotImplementedError = class extends GitApiError {
|
|
@@ -125,6 +316,37 @@ var StoreNotAvailableError = class extends GitApiError {
|
|
|
125
316
|
this.storeName = storeName;
|
|
126
317
|
}
|
|
127
318
|
};
|
|
319
|
+
/**
|
|
320
|
+
* Thrown where git dies on loading its configuration, before a command runs (an unknown
|
|
321
|
+
* `core.disambiguate`): git's `error:` and `fatal:` lines as the message.
|
|
322
|
+
*/
|
|
323
|
+
var InvalidConfigError = class extends GitApiError {
|
|
324
|
+
/** The variable git refused */
|
|
325
|
+
key;
|
|
326
|
+
constructor(key, message) {
|
|
327
|
+
super(message);
|
|
328
|
+
this.name = "InvalidConfigError";
|
|
329
|
+
this.key = key;
|
|
330
|
+
}
|
|
331
|
+
};
|
|
332
|
+
/**
|
|
333
|
+
* A hook refused the operation (githooks(5)): `pre-commit`, `commit-msg`, `pre-merge-commit`,
|
|
334
|
+
* `pre-rebase`, `pre-push`, `applypatch-msg`, `pre-applypatch` and the receive side's hooks
|
|
335
|
+
* exit non-zero to stop it. `message` is what git prints of its own (often nothing: the hook
|
|
336
|
+
* explains itself, in `output`); `output` is everything the hooks wrote, with git's hints.
|
|
337
|
+
*/
|
|
338
|
+
var HookFailedError = class extends GitApiError {
|
|
339
|
+
hook;
|
|
340
|
+
hookExitCode;
|
|
341
|
+
output;
|
|
342
|
+
constructor(hook, hookExitCode, message, output, exitCode = 1) {
|
|
343
|
+
super(message, { exitCode });
|
|
344
|
+
this.hook = hook;
|
|
345
|
+
this.hookExitCode = hookExitCode;
|
|
346
|
+
this.output = output;
|
|
347
|
+
this.name = "HookFailedError";
|
|
348
|
+
}
|
|
349
|
+
};
|
|
128
350
|
//#endregion
|
|
129
351
|
//#region src/errors/commit-errors.ts
|
|
130
352
|
/**
|
|
@@ -134,7 +356,7 @@ var StoreNotAvailableError = class extends GitApiError {
|
|
|
134
356
|
*/
|
|
135
357
|
var NoMessageError = class extends GitApiError {
|
|
136
358
|
constructor(message) {
|
|
137
|
-
super(message ?? "Commit message is required");
|
|
359
|
+
super(message ?? "Commit message is required", { exitCode: 1 });
|
|
138
360
|
this.name = "NoMessageError";
|
|
139
361
|
}
|
|
140
362
|
};
|
|
@@ -145,7 +367,7 @@ var NoMessageError = class extends GitApiError {
|
|
|
145
367
|
*/
|
|
146
368
|
var EmptyCommitError = class extends GitApiError {
|
|
147
369
|
constructor(message) {
|
|
148
|
-
super(message ?? "Nothing to commit");
|
|
370
|
+
super(message ?? "Nothing to commit", { exitCode: 1 });
|
|
149
371
|
this.name = "EmptyCommitError";
|
|
150
372
|
}
|
|
151
373
|
};
|
|
@@ -162,6 +384,19 @@ var UnmergedPathsError = class extends GitApiError {
|
|
|
162
384
|
this.paths = paths;
|
|
163
385
|
}
|
|
164
386
|
};
|
|
387
|
+
/**
|
|
388
|
+
* The index lock (`index.lock`) is held by another process: git dies with exit code 128
|
|
389
|
+
* (`unable_to_lock_die`). The message is git's (`fatal: Unable to create '<path>': File
|
|
390
|
+
* exists.` and its advice); the lock is left where it is.
|
|
391
|
+
*/
|
|
392
|
+
var IndexLockFailedError = class extends GitApiError {
|
|
393
|
+
lockPath;
|
|
394
|
+
constructor(lockPath, message, options) {
|
|
395
|
+
super(message, options);
|
|
396
|
+
this.lockPath = lockPath;
|
|
397
|
+
this.name = "IndexLockFailedError";
|
|
398
|
+
}
|
|
399
|
+
};
|
|
165
400
|
//#endregion
|
|
166
401
|
//#region src/errors/merge-errors.ts
|
|
167
402
|
/**
|
|
@@ -172,7 +407,7 @@ var UnmergedPathsError = class extends GitApiError {
|
|
|
172
407
|
var MergeConflictError = class extends GitApiError {
|
|
173
408
|
conflicts;
|
|
174
409
|
constructor(conflicts = [], message) {
|
|
175
|
-
super(message ?? `Merge conflicts in ${conflicts.length} file(s)
|
|
410
|
+
super(message ?? `Merge conflicts in ${conflicts.length} file(s)`, { exitCode: 1 });
|
|
176
411
|
this.name = "MergeConflictError";
|
|
177
412
|
this.conflicts = conflicts;
|
|
178
413
|
}
|
|
@@ -184,7 +419,7 @@ var MergeConflictError = class extends GitApiError {
|
|
|
184
419
|
*/
|
|
185
420
|
var InvalidMergeHeadsError = class extends GitApiError {
|
|
186
421
|
constructor(message) {
|
|
187
|
-
super(message ?? "No merge heads specified");
|
|
422
|
+
super(message ?? "No merge heads specified", { exitCode: 1 });
|
|
188
423
|
this.name = "InvalidMergeHeadsError";
|
|
189
424
|
}
|
|
190
425
|
};
|
|
@@ -279,6 +514,19 @@ var CommitNotFoundError = class extends GitApiError {
|
|
|
279
514
|
this.commitRef = commitRef;
|
|
280
515
|
}
|
|
281
516
|
};
|
|
517
|
+
/**
|
|
518
|
+
* Thrown when a rebase in progress has lost its todo list (git's "could not open
|
|
519
|
+
* '.../git-rebase-todo' for reading"): a missing todo is never read as an empty one, which
|
|
520
|
+
* would finish the rebase and drop the commits still to pick.
|
|
521
|
+
*/
|
|
522
|
+
var RebaseTodoMissingError = class extends GitApiError {
|
|
523
|
+
path;
|
|
524
|
+
constructor(path) {
|
|
525
|
+
super(`could not open '${path}' for reading: No such file or directory`);
|
|
526
|
+
this.path = path;
|
|
527
|
+
this.name = "RebaseTodoMissingError";
|
|
528
|
+
}
|
|
529
|
+
};
|
|
282
530
|
//#endregion
|
|
283
531
|
//#region src/errors/ref-errors.ts
|
|
284
532
|
/**
|
|
@@ -321,6 +569,49 @@ var RefNotFoundError = class extends GitApiError {
|
|
|
321
569
|
}
|
|
322
570
|
};
|
|
323
571
|
/**
|
|
572
|
+
* Thrown where git dies while interpreting a revision, its message git's `fatal:` line:
|
|
573
|
+
* `@{upstream}` of a branch without one (`fatal: no upstream configured for branch 'x'`),
|
|
574
|
+
* `@{u}` on a detached HEAD (`fatal: HEAD does not point to a branch`), `@{push}` that has
|
|
575
|
+
* no destination, `<ref>@{<n>}` beyond the reflog (`fatal: log for 'x' only has 2 entries`).
|
|
576
|
+
* Unlike {@link RefNotFoundError}, no command takes it for "not a revision".
|
|
577
|
+
*/
|
|
578
|
+
var RevisionError = class extends GitApiError {
|
|
579
|
+
revision;
|
|
580
|
+
/**
|
|
581
|
+
* What git printed on stdout before it died (`git rev-parse a ^b nope` prints the ids of
|
|
582
|
+
* `a` and `^b`, then `nope` as a path, then dies); usually empty
|
|
583
|
+
*/
|
|
584
|
+
output;
|
|
585
|
+
constructor(revision, message, output = []) {
|
|
586
|
+
super(message);
|
|
587
|
+
this.name = "RevisionError";
|
|
588
|
+
this.revision = revision;
|
|
589
|
+
this.output = output;
|
|
590
|
+
}
|
|
591
|
+
};
|
|
592
|
+
/**
|
|
593
|
+
* Thrown where a command needs a commit and the revision names something else: a tree, a
|
|
594
|
+
* blob, a tag of one, or an object the repository does not have (git's
|
|
595
|
+
* `lookup_commit_reference` failing). The message is git's, as the command prints it:
|
|
596
|
+
* `error: object <id> is a tree, not a commit` and the command's `fatal:` line
|
|
597
|
+
* (`fatal: Could not parse object 'HEAD^{tree}'.` for reset, `fatal: not a valid branch
|
|
598
|
+
* point: 'HEAD:a'` for branch).
|
|
599
|
+
*/
|
|
600
|
+
var NotACommitError = class extends GitApiError {
|
|
601
|
+
revision;
|
|
602
|
+
/** The object the revision ends at (tags peeled) */
|
|
603
|
+
objectId;
|
|
604
|
+
/** Its type, undefined when the repository does not have it */
|
|
605
|
+
objectType;
|
|
606
|
+
constructor(revision, objectId, objectType, message) {
|
|
607
|
+
super(message);
|
|
608
|
+
this.name = "NotACommitError";
|
|
609
|
+
this.revision = revision;
|
|
610
|
+
this.objectId = objectId;
|
|
611
|
+
this.objectType = objectType;
|
|
612
|
+
}
|
|
613
|
+
};
|
|
614
|
+
/**
|
|
324
615
|
* Thrown when trying to delete the current branch.
|
|
325
616
|
*
|
|
326
617
|
* Based on JGit's CannotDeleteCurrentBranchException.
|
|
@@ -328,7 +619,7 @@ var RefNotFoundError = class extends GitApiError {
|
|
|
328
619
|
var CannotDeleteCurrentBranchError = class extends GitApiError {
|
|
329
620
|
branchName;
|
|
330
621
|
constructor(branchName, message) {
|
|
331
|
-
super(message ?? `Cannot delete the branch you are currently on: ${branchName}
|
|
622
|
+
super(message ?? `Cannot delete the branch you are currently on: ${branchName}`, { exitCode: 1 });
|
|
332
623
|
this.name = "CannotDeleteCurrentBranchError";
|
|
333
624
|
this.branchName = branchName;
|
|
334
625
|
}
|
|
@@ -363,7 +654,7 @@ var NoHeadError = class extends GitApiError {
|
|
|
363
654
|
var NotMergedError = class extends GitApiError {
|
|
364
655
|
branchName;
|
|
365
656
|
constructor(branchName, message) {
|
|
366
|
-
super(message ?? `Branch '${branchName}' is not fully merged
|
|
657
|
+
super(message ?? `Branch '${branchName}' is not fully merged`, { exitCode: 1 });
|
|
367
658
|
this.name = "NotMergedError";
|
|
368
659
|
this.branchName = branchName;
|
|
369
660
|
}
|
|
@@ -376,7 +667,7 @@ var NotMergedError = class extends GitApiError {
|
|
|
376
667
|
var RemoteAlreadyExistsError = class extends GitApiError {
|
|
377
668
|
remoteName;
|
|
378
669
|
constructor(remoteName, message) {
|
|
379
|
-
super(message ?? `Remote '${remoteName}' already exists
|
|
670
|
+
super(message ?? `Remote '${remoteName}' already exists`, { exitCode: 3 });
|
|
380
671
|
this.name = "RemoteAlreadyExistsError";
|
|
381
672
|
this.remoteName = remoteName;
|
|
382
673
|
}
|
|
@@ -387,7 +678,7 @@ var RemoteAlreadyExistsError = class extends GitApiError {
|
|
|
387
678
|
var RemoteNotFoundError = class extends GitApiError {
|
|
388
679
|
remoteName;
|
|
389
680
|
constructor(remoteName, message) {
|
|
390
|
-
super(message ?? `Remote '${remoteName}' does not exist
|
|
681
|
+
super(message ?? `Remote '${remoteName}' does not exist`, { exitCode: 2 });
|
|
391
682
|
this.name = "RemoteNotFoundError";
|
|
392
683
|
this.remoteName = remoteName;
|
|
393
684
|
}
|
|
@@ -423,7 +714,7 @@ var StashApplyFailedError = class extends GitApiError {
|
|
|
423
714
|
stashRef;
|
|
424
715
|
conflicts;
|
|
425
716
|
constructor(stashRef, conflicts, message) {
|
|
426
|
-
super(message ?? `Failed to apply stash: ${stashRef}
|
|
717
|
+
super(message ?? `Failed to apply stash: ${stashRef}`, { exitCode: 1 });
|
|
427
718
|
this.name = "StashApplyFailedError";
|
|
428
719
|
this.stashRef = stashRef;
|
|
429
720
|
this.conflicts = conflicts;
|
|
@@ -466,8 +757,8 @@ var InvalidRemoteError = class extends GitApiError {
|
|
|
466
757
|
*/
|
|
467
758
|
var TransportError = class extends GitApiError {
|
|
468
759
|
uri;
|
|
469
|
-
constructor(message, uri) {
|
|
470
|
-
super(uri ? `${uri}: ${message}` : message);
|
|
760
|
+
constructor(message, uri, options) {
|
|
761
|
+
super(uri ? `${uri}: ${message}` : message, options);
|
|
471
762
|
this.name = "TransportError";
|
|
472
763
|
this.uri = uri;
|
|
473
764
|
}
|
|
@@ -490,7 +781,7 @@ var PushRejectedException = class extends TransportError {
|
|
|
490
781
|
refName;
|
|
491
782
|
reason;
|
|
492
783
|
constructor(refName, reason, uri) {
|
|
493
|
-
super(`${refName}: ${reason}`, uri);
|
|
784
|
+
super(`${refName}: ${reason}`, uri, { exitCode: 1 });
|
|
494
785
|
this.name = "PushRejectedException";
|
|
495
786
|
this.refName = refName;
|
|
496
787
|
this.reason = reason;
|
|
@@ -505,5 +796,66 @@ var NonFastForwardError = class extends PushRejectedException {
|
|
|
505
796
|
this.name = "NonFastForwardError";
|
|
506
797
|
}
|
|
507
798
|
};
|
|
799
|
+
/**
|
|
800
|
+
* Error thrown when a fetch would write a branch a worktree has checked out (git's
|
|
801
|
+
* check_not_current_branch, without `--update-head-ok`): nothing is fetched. The message is
|
|
802
|
+
* git's: `fatal: refusing to fetch into branch '<ref>' checked out at '<path>'`.
|
|
803
|
+
*/
|
|
804
|
+
var FetchIntoCheckedOutBranchError = class extends GitApiError {
|
|
805
|
+
refName;
|
|
806
|
+
worktreePath;
|
|
807
|
+
constructor(refName, worktreePath) {
|
|
808
|
+
super(`fatal: refusing to fetch into branch '${refName}' checked out at '${worktreePath}'`);
|
|
809
|
+
this.refName = refName;
|
|
810
|
+
this.worktreePath = worktreePath;
|
|
811
|
+
this.name = "FetchIntoCheckedOutBranchError";
|
|
812
|
+
}
|
|
813
|
+
};
|
|
814
|
+
//#endregion
|
|
815
|
+
//#region src/errors/worktree-errors.ts
|
|
816
|
+
/**
|
|
817
|
+
* Thrown by a `git worktree` command on a working copy whose backend keeps no linked
|
|
818
|
+
* worktrees (`WorkingCopy.worktrees` is undefined).
|
|
819
|
+
*/
|
|
820
|
+
var WorktreesUnsupportedError = class extends GitApiError {
|
|
821
|
+
constructor(operation) {
|
|
822
|
+
super(`worktree ${operation}: this repository's storage has no linked worktrees`);
|
|
823
|
+
this.name = "WorktreesUnsupportedError";
|
|
824
|
+
}
|
|
825
|
+
};
|
|
826
|
+
/**
|
|
827
|
+
* A `git worktree` command refused: the message is git's (what follows `fatal: `).
|
|
828
|
+
*
|
|
829
|
+
* @example
|
|
830
|
+
* ```typescript
|
|
831
|
+
* try {
|
|
832
|
+
* await git.worktreeLock().setWorktree("wt").call();
|
|
833
|
+
* } catch (e) {
|
|
834
|
+
* if (e instanceof WorktreeError) console.error(`fatal: ${e.message}`);
|
|
835
|
+
* }
|
|
836
|
+
* ```
|
|
837
|
+
*/
|
|
838
|
+
var WorktreeError = class extends GitApiError {
|
|
839
|
+
constructor(message) {
|
|
840
|
+
super(message);
|
|
841
|
+
this.name = "WorktreeError";
|
|
842
|
+
}
|
|
843
|
+
};
|
|
844
|
+
/**
|
|
845
|
+
* A branch is checked out (or being rebased or bisected) in a worktree, so it cannot be
|
|
846
|
+
* deleted, force-updated or checked out again. The message is git's.
|
|
847
|
+
*/
|
|
848
|
+
var BranchUsedByWorktreeError = class extends GitApiError {
|
|
849
|
+
/** The branch name (without `refs/heads/`). */
|
|
850
|
+
branchName;
|
|
851
|
+
/** The worktree that uses it, as git prints its path. */
|
|
852
|
+
worktreePath;
|
|
853
|
+
constructor(branchName, worktreePath, message) {
|
|
854
|
+
super(message);
|
|
855
|
+
this.name = "BranchUsedByWorktreeError";
|
|
856
|
+
this.branchName = branchName;
|
|
857
|
+
this.worktreePath = worktreePath;
|
|
858
|
+
}
|
|
859
|
+
};
|
|
508
860
|
//#endregion
|
|
509
|
-
export { AuthenticationError, CannotDeleteCurrentBranchError, CommitNotFoundError, DetachedHeadError, EmptyCommitError, GitApiError, IncompatibleOptionsError, InvalidArgumentError, InvalidMainlineParentError, InvalidMergeHeadsError, InvalidRefNameError, InvalidRemoteError, InvalidStashIndexError, InvalidTagNameError, MergeConflictError, MergeFailureReason, MissingArgumentError, MultipleParentsNotAllowedError, NoFilepatternError, NoHeadError, NoMergeBaseError, NoMessageError, NoRebaseInProgressError, NonFastForwardError, NotADirectoryError, NotFastForwardError, NotImplementedError, NotMergedError, PathNotFoundInTreeError, PathNotInIndexError, PushRejectedException, RefAlreadyExistsError, RefNotFoundError, RemoteAlreadyExistsError, RemoteNotFoundError, StashApplyFailedError, StashNotFoundError, StoreNotAvailableError, TransportError, UnmergedPathsError, UpstreamRequiredError };
|
|
861
|
+
export { AddFailedError, AuthenticationError, BranchUsedByWorktreeError, CannotDeleteCurrentBranchError, CloneCheckoutError, CloneDestinationError, CommitNotFoundError, DetachedHeadError, EmptyCommitError, FetchIntoCheckedOutBranchError, GitApiError, HookFailedError, IncompatibleOptionsError, IndexLockFailedError, InvalidArgumentError, InvalidConfigError, InvalidMainlineParentError, InvalidMergeHeadsError, InvalidRefNameError, InvalidRemoteError, InvalidStashIndexError, InvalidTagNameError, MergeConflictError, MergeFailureReason, MissingArgumentError, MultipleParentsNotAllowedError, MvFailedError, NoFilepatternError, NoHeadError, NoMergeBaseError, NoMessageError, NoRebaseInProgressError, NonFastForwardError, NotACommitError, NotADirectoryError, NotFastForwardError, NotImplementedError, NotMergedError, PathNotFoundInTreeError, PathNotInIndexError, PushRejectedException, ReadTreeFailedError, RebaseTodoMissingError, RefAlreadyExistsError, RefNotFoundError, RemoteAlreadyExistsError, RemoteNotFoundError, ResetRefusedError, RevisionError, RmFailedError, StashApplyFailedError, StashNotFoundError, StoreNotAvailableError, SwitchRefusedError, TransportError, UnmergedPathsError, UpstreamRequiredError, WorktreeError, WorktreesUnsupportedError, exitCodeOfMessage };
|
|
@@ -18,4 +18,13 @@ export declare class CommitNotFoundError extends GitApiError {
|
|
|
18
18
|
readonly commitRef: string;
|
|
19
19
|
constructor(commitRef: string, message?: string);
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Thrown when a rebase in progress has lost its todo list (git's "could not open
|
|
23
|
+
* '.../git-rebase-todo' for reading"): a missing todo is never read as an empty one, which
|
|
24
|
+
* would finish the rebase and drop the commits still to pick.
|
|
25
|
+
*/
|
|
26
|
+
export declare class RebaseTodoMissingError extends GitApiError {
|
|
27
|
+
readonly path: string;
|
|
28
|
+
constructor(path: string);
|
|
29
|
+
}
|
|
21
30
|
//# sourceMappingURL=rebase-errors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rebase-errors.d.ts","sourceRoot":"","sources":["../../src/errors/rebase-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,WAAW;IACtD,YAAY,OAAO,CAAC,EAAE,MAAM,EAG3B;CACF;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,WAAW;IACpD,YAAY,OAAO,CAAC,EAAE,MAAM,EAG3B;CACF;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,WAAW;IAClD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B,YAAY,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAI9C;CACF"}
|
|
1
|
+
{"version":3,"file":"rebase-errors.d.ts","sourceRoot":"","sources":["../../src/errors/rebase-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,WAAW;IACtD,YAAY,OAAO,CAAC,EAAE,MAAM,EAG3B;CACF;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,WAAW;IACpD,YAAY,OAAO,CAAC,EAAE,MAAM,EAG3B;CACF;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,WAAW;IAClD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B,YAAY,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAI9C;CACF;AAED;;;;GAIG;AACH,qBAAa,sBAAuB,SAAQ,WAAW;IACzC,QAAQ,CAAC,IAAI,EAAE,MAAM;IAAjC,YAAqB,IAAI,EAAE,MAAM,EAGhC;CACF"}
|
|
@@ -26,6 +26,38 @@ export declare class RefNotFoundError extends GitApiError {
|
|
|
26
26
|
readonly refName: string;
|
|
27
27
|
constructor(refName: string, message?: string);
|
|
28
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Thrown where git dies while interpreting a revision, its message git's `fatal:` line:
|
|
31
|
+
* `@{upstream}` of a branch without one (`fatal: no upstream configured for branch 'x'`),
|
|
32
|
+
* `@{u}` on a detached HEAD (`fatal: HEAD does not point to a branch`), `@{push}` that has
|
|
33
|
+
* no destination, `<ref>@{<n>}` beyond the reflog (`fatal: log for 'x' only has 2 entries`).
|
|
34
|
+
* Unlike {@link RefNotFoundError}, no command takes it for "not a revision".
|
|
35
|
+
*/
|
|
36
|
+
export declare class RevisionError extends GitApiError {
|
|
37
|
+
readonly revision: string;
|
|
38
|
+
/**
|
|
39
|
+
* What git printed on stdout before it died (`git rev-parse a ^b nope` prints the ids of
|
|
40
|
+
* `a` and `^b`, then `nope` as a path, then dies); usually empty
|
|
41
|
+
*/
|
|
42
|
+
readonly output: string[];
|
|
43
|
+
constructor(revision: string, message: string, output?: string[]);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Thrown where a command needs a commit and the revision names something else: a tree, a
|
|
47
|
+
* blob, a tag of one, or an object the repository does not have (git's
|
|
48
|
+
* `lookup_commit_reference` failing). The message is git's, as the command prints it:
|
|
49
|
+
* `error: object <id> is a tree, not a commit` and the command's `fatal:` line
|
|
50
|
+
* (`fatal: Could not parse object 'HEAD^{tree}'.` for reset, `fatal: not a valid branch
|
|
51
|
+
* point: 'HEAD:a'` for branch).
|
|
52
|
+
*/
|
|
53
|
+
export declare class NotACommitError extends GitApiError {
|
|
54
|
+
readonly revision: string;
|
|
55
|
+
/** The object the revision ends at (tags peeled) */
|
|
56
|
+
readonly objectId: string;
|
|
57
|
+
/** Its type, undefined when the repository does not have it */
|
|
58
|
+
readonly objectType: "tree" | "blob" | "tag" | undefined;
|
|
59
|
+
constructor(revision: string, objectId: string, objectType: "tree" | "blob" | "tag" | undefined, message: string);
|
|
60
|
+
}
|
|
29
61
|
/**
|
|
30
62
|
* Thrown when trying to delete the current branch.
|
|
31
63
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ref-errors.d.ts","sourceRoot":"","sources":["../../src/errors/ref-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD;;;;GAIG;AACH,qBAAa,mBAAoB,SAAQ,WAAW;IAClD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB,YAAY,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAI5C;CACF;AAED;;;;GAIG;AACH,qBAAa,qBAAsB,SAAQ,WAAW;IACpD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB,YAAY,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAI5C;CACF;AAED;;;;GAIG;AACH,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB,YAAY,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAI5C;CACF;AAED;;;;GAIG;AACH,qBAAa,8BAA+B,SAAQ,WAAW;IAC7D,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B,YAAY,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ref-errors.d.ts","sourceRoot":"","sources":["../../src/errors/ref-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD;;;;GAIG;AACH,qBAAa,mBAAoB,SAAQ,WAAW;IAClD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB,YAAY,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAI5C;CACF;AAED;;;;GAIG;AACH,qBAAa,qBAAsB,SAAQ,WAAW;IACpD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB,YAAY,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAI5C;CACF;AAED;;;;GAIG;AACH,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB,YAAY,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAI5C;CACF;AAED;;;;;;GAMG;AACH,qBAAa,aAAc,SAAQ,WAAW;IAC5C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;IAE1B,YAAY,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAE,MAAM,EAAO,EAKnE;CACF;AAED;;;;;;;GAOG;AACH,qBAAa,eAAgB,SAAQ,WAAW;IAC9C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,oDAAoD;IACpD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,+DAA+D;IAC/D,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,SAAS,CAAC;IAEzD,YACE,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,SAAS,EAC/C,OAAO,EAAE,MAAM,EAOhB;CACF;AAED;;;;GAIG;AACH,qBAAa,8BAA+B,SAAQ,WAAW;IAC7D,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B,YAAY,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAM/C;CACF;AAED;;;;GAIG;AACH,qBAAa,iBAAkB,SAAQ,WAAW;IAChD,YAAY,OAAO,CAAC,EAAE,MAAM,EAG3B;CACF;AAED;;;;GAIG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C,YAAY,OAAO,CAAC,EAAE,MAAM,EAG3B;CACF;AAED;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,WAAW;IAC7C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B,YAAY,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAI/C;CACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GitApiError } from "./git-api-error.js";
|
|
1
|
+
import { GitApiError, type GitApiErrorOptions } from "./git-api-error.js";
|
|
2
2
|
/**
|
|
3
3
|
* Error thrown when a remote cannot be resolved.
|
|
4
4
|
*
|
|
@@ -15,7 +15,7 @@ export declare class InvalidRemoteError extends GitApiError {
|
|
|
15
15
|
*/
|
|
16
16
|
export declare class TransportError extends GitApiError {
|
|
17
17
|
readonly uri?: string;
|
|
18
|
-
constructor(message: string, uri?: string);
|
|
18
|
+
constructor(message: string, uri?: string, options?: GitApiErrorOptions);
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* Error thrown when authentication fails.
|
|
@@ -39,4 +39,14 @@ export declare class PushRejectedException extends TransportError {
|
|
|
39
39
|
export declare class NonFastForwardError extends PushRejectedException {
|
|
40
40
|
constructor(refName: string, uri?: string);
|
|
41
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Error thrown when a fetch would write a branch a worktree has checked out (git's
|
|
44
|
+
* check_not_current_branch, without `--update-head-ok`): nothing is fetched. The message is
|
|
45
|
+
* git's: `fatal: refusing to fetch into branch '<ref>' checked out at '<path>'`.
|
|
46
|
+
*/
|
|
47
|
+
export declare class FetchIntoCheckedOutBranchError extends GitApiError {
|
|
48
|
+
readonly refName: string;
|
|
49
|
+
readonly worktreePath: string;
|
|
50
|
+
constructor(refName: string, worktreePath: string);
|
|
51
|
+
}
|
|
42
52
|
//# sourceMappingURL=transport-errors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport-errors.d.ts","sourceRoot":"","sources":["../../src/errors/transport-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"transport-errors.d.ts","sourceRoot":"","sources":["../../src/errors/transport-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE1E;;;;GAIG;AACH,qBAAa,kBAAmB,SAAQ,WAAW;IACjD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB,YAAY,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAI3C;CACF;AAED;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,WAAW;IAC7C,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAEtB,YAAY,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,kBAAkB,EAItE;CACF;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,cAAc;IACrD,YAAY,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAGxC;CACF;AAED;;;;GAIG;AACH,qBAAa,qBAAsB,SAAQ,cAAc;IACvD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB,YAAY,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAMxD;CACF;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,qBAAqB;IAC5D,YAAY,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAGxC;CACF;AAED;;;;GAIG;AACH,qBAAa,8BAA+B,SAAQ,WAAW;IAE3D,QAAQ,CAAC,OAAO,EAAE,MAAM;IACxB,QAAQ,CAAC,YAAY,EAAE,MAAM;IAF/B,YACW,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,EAI9B;CACF"}
|