@statewalker/vcs-commands 0.7.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/add-command.d.ts +70 -0
- package/dist/commands/add-command.d.ts.map +1 -1
- package/dist/commands/add-patch/add-patch.d.ts +7 -0
- package/dist/commands/add-patch/add-patch.d.ts.map +1 -1
- package/dist/commands/add-patch/patch-backend.d.ts.map +1 -1
- package/dist/commands/am/am-command.d.ts +102 -1
- package/dist/commands/am/am-command.d.ts.map +1 -1
- package/dist/commands/am/index.d.ts +1 -0
- package/dist/commands/am/index.d.ts.map +1 -1
- package/dist/commands/am/mailsplit.d.ts +88 -0
- package/dist/commands/am/mailsplit.d.ts.map +1 -0
- package/dist/commands/apply/apply-command.d.ts +2 -0
- package/dist/commands/apply/apply-command.d.ts.map +1 -1
- package/dist/commands/apply/apply-engine.d.ts.map +1 -1
- package/dist/commands/apply/apply-parse.d.ts +7 -0
- package/dist/commands/apply/apply-parse.d.ts.map +1 -1
- package/dist/commands/apply/index.d.ts +1 -1
- package/dist/commands/apply/index.d.ts.map +1 -1
- package/dist/commands/bisect/bisect-command.d.ts +2 -0
- package/dist/commands/bisect/bisect-command.d.ts.map +1 -1
- package/dist/commands/blame-command.d.ts +303 -8
- package/dist/commands/blame-command.d.ts.map +1 -1
- package/dist/commands/blame-ignore.d.ts +48 -0
- package/dist/commands/blame-ignore.d.ts.map +1 -0
- package/dist/commands/branch-command.d.ts +148 -18
- package/dist/commands/branch-command.d.ts.map +1 -1
- package/dist/commands/branch-info-command.d.ts +55 -0
- package/dist/commands/branch-info-command.d.ts.map +1 -0
- package/dist/commands/branch-tracking.d.ts +106 -17
- package/dist/commands/branch-tracking.d.ts.map +1 -1
- package/dist/commands/branch-upstream-command.d.ts +83 -0
- package/dist/commands/branch-upstream-command.d.ts.map +1 -0
- package/dist/commands/check-mailmap-command.d.ts +49 -0
- package/dist/commands/check-mailmap-command.d.ts.map +1 -0
- package/dist/commands/checkout-command.d.ts +26 -3
- package/dist/commands/checkout-command.d.ts.map +1 -1
- package/dist/commands/checkout-paths.d.ts +4 -0
- package/dist/commands/checkout-paths.d.ts.map +1 -1
- package/dist/commands/cherry-command.d.ts +61 -0
- package/dist/commands/cherry-command.d.ts.map +1 -0
- package/dist/commands/cherry-pick-command.d.ts +82 -1
- package/dist/commands/cherry-pick-command.d.ts.map +1 -1
- package/dist/commands/clean-command.d.ts +44 -0
- package/dist/commands/clean-command.d.ts.map +1 -1
- package/dist/commands/clean-interactive.d.ts +56 -0
- package/dist/commands/clean-interactive.d.ts.map +1 -0
- package/dist/commands/clone-command.d.ts +116 -2
- package/dist/commands/clone-command.d.ts.map +1 -1
- package/dist/commands/commit-command.d.ts +239 -5
- package/dist/commands/commit-command.d.ts.map +1 -1
- package/dist/commands/commit-reuse.d.ts +33 -0
- package/dist/commands/commit-reuse.d.ts.map +1 -0
- package/dist/commands/config-command.d.ts +236 -0
- package/dist/commands/config-command.d.ts.map +1 -0
- package/dist/commands/config-value-types.d.ts +91 -0
- package/dist/commands/config-value-types.d.ts.map +1 -0
- package/dist/commands/core-config.d.ts +20 -0
- package/dist/commands/core-config.d.ts.map +1 -1
- package/dist/commands/describe-command.d.ts +71 -64
- package/dist/commands/describe-command.d.ts.map +1 -1
- package/dist/commands/diff-color-config.d.ts +73 -0
- package/dist/commands/diff-color-config.d.ts.map +1 -0
- package/dist/commands/diff-command.d.ts +369 -10
- package/dist/commands/diff-command.d.ts.map +1 -1
- package/dist/commands/fetch-command.d.ts +80 -0
- package/dist/commands/fetch-command.d.ts.map +1 -1
- package/dist/commands/fetch-multiple-command.d.ts +193 -0
- package/dist/commands/fetch-multiple-command.d.ts.map +1 -0
- package/dist/commands/fmt-merge-msg-command.d.ts +124 -0
- package/dist/commands/fmt-merge-msg-command.d.ts.map +1 -0
- package/dist/commands/fork-point.d.ts +38 -0
- package/dist/commands/fork-point.d.ts.map +1 -0
- package/dist/commands/format-patch-command.d.ts +69 -3
- package/dist/commands/format-patch-command.d.ts.map +1 -1
- package/dist/commands/fsck/fetch-fsck.d.ts +51 -0
- package/dist/commands/fsck/fetch-fsck.d.ts.map +1 -1
- package/dist/commands/gc-command.d.ts +8 -0
- package/dist/commands/gc-command.d.ts.map +1 -1
- package/dist/commands/git-describe.d.ts +81 -4
- package/dist/commands/git-describe.d.ts.map +1 -1
- package/dist/commands/git-hooks.d.ts +50 -1
- package/dist/commands/git-hooks.d.ts.map +1 -1
- package/dist/commands/grep/grep-command.d.ts +210 -0
- package/dist/commands/grep/grep-command.d.ts.map +1 -0
- package/dist/commands/grep/grep-engine.d.ts +218 -0
- package/dist/commands/grep/grep-engine.d.ts.map +1 -0
- package/dist/commands/grep/index.d.ts +3 -0
- package/dist/commands/grep/index.d.ts.map +1 -0
- package/dist/commands/index-adder.d.ts +13 -2
- package/dist/commands/index-adder.d.ts.map +1 -1
- package/dist/commands/index.d.ts +38 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +5 -3
- package/dist/commands/init-command.d.ts +89 -0
- package/dist/commands/init-command.d.ts.map +1 -1
- package/dist/commands/interpret-trailers-command.d.ts +90 -0
- package/dist/commands/interpret-trailers-command.d.ts.map +1 -0
- package/dist/commands/line-log.d.ts +161 -0
- package/dist/commands/line-log.d.ts.map +1 -0
- package/dist/commands/local-transport.d.ts +36 -5
- package/dist/commands/local-transport.d.ts.map +1 -1
- package/dist/commands/log-command.d.ts +527 -13
- package/dist/commands/log-command.d.ts.map +1 -1
- package/dist/commands/log-graph.d.ts +30 -3
- package/dist/commands/log-graph.d.ts.map +1 -1
- package/dist/commands/log-output.d.ts +199 -6
- package/dist/commands/log-output.d.ts.map +1 -1
- package/dist/commands/ls-remote-command.d.ts +2 -0
- package/dist/commands/ls-remote-command.d.ts.map +1 -1
- package/dist/commands/mailmap.d.ts +53 -0
- package/dist/commands/mailmap.d.ts.map +1 -1
- package/dist/commands/merge-base-command.d.ts +60 -0
- package/dist/commands/merge-base-command.d.ts.map +1 -0
- package/dist/commands/merge-bases.d.ts +23 -0
- package/dist/commands/merge-bases.d.ts.map +1 -1
- package/dist/commands/merge-command.d.ts +147 -10
- package/dist/commands/merge-command.d.ts.map +1 -1
- package/dist/commands/merge-drivers.d.ts +2 -0
- package/dist/commands/merge-drivers.d.ts.map +1 -1
- package/dist/commands/merge-strategy-options.d.ts +69 -0
- package/dist/commands/merge-strategy-options.d.ts.map +1 -0
- package/dist/commands/merge-support.d.ts +10 -0
- package/dist/commands/merge-support.d.ts.map +1 -1
- package/dist/commands/message-cleanup.d.ts +2 -0
- package/dist/commands/message-cleanup.d.ts.map +1 -1
- package/dist/commands/mv-command.d.ts +4 -0
- package/dist/commands/mv-command.d.ts.map +1 -1
- package/dist/commands/name-rev-command.d.ts +65 -0
- package/dist/commands/name-rev-command.d.ts.map +1 -0
- package/dist/commands/name-rev.d.ts +136 -0
- package/dist/commands/name-rev.d.ts.map +1 -0
- package/dist/commands/notes-command.d.ts.map +1 -1
- package/dist/commands/octopus-merge.d.ts +26 -1
- package/dist/commands/octopus-merge.d.ts.map +1 -1
- package/dist/commands/ort-merge.d.ts +16 -0
- package/dist/commands/ort-merge.d.ts.map +1 -1
- package/dist/commands/ort-recursive.d.ts.map +1 -1
- package/dist/commands/patch-id.d.ts +58 -0
- package/dist/commands/patch-id.d.ts.map +1 -1
- package/dist/commands/pathspec-file.d.ts +39 -0
- package/dist/commands/pathspec-file.d.ts.map +1 -0
- package/dist/commands/pathspec.d.ts +3 -0
- package/dist/commands/pathspec.d.ts.map +1 -1
- package/dist/commands/pretty-format.d.ts +43 -3
- package/dist/commands/pretty-format.d.ts.map +1 -1
- package/dist/commands/promisor-remote.d.ts.map +1 -1
- package/dist/commands/pull-command.d.ts +186 -32
- package/dist/commands/pull-command.d.ts.map +1 -1
- package/dist/commands/push-command.d.ts +225 -9
- package/dist/commands/push-command.d.ts.map +1 -1
- package/dist/commands/range-diff/index.d.ts +4 -0
- package/dist/commands/range-diff/index.d.ts.map +1 -0
- package/dist/commands/range-diff/linear-assignment.d.ts +27 -0
- package/dist/commands/range-diff/linear-assignment.d.ts.map +1 -0
- package/dist/commands/range-diff/range-diff-command.d.ts +121 -0
- package/dist/commands/range-diff/range-diff-command.d.ts.map +1 -0
- package/dist/commands/range-diff/range-diff.d.ts +106 -0
- package/dist/commands/range-diff/range-diff.d.ts.map +1 -0
- package/dist/commands/read-tree-command.d.ts +20 -0
- package/dist/commands/read-tree-command.d.ts.map +1 -1
- package/dist/commands/rebase-command.d.ts +189 -8
- package/dist/commands/rebase-command.d.ts.map +1 -1
- package/dist/commands/ref-filter/for-each-ref-command.d.ts +121 -0
- package/dist/commands/ref-filter/for-each-ref-command.d.ts.map +1 -0
- package/dist/commands/ref-filter/index.d.ts +8 -0
- package/dist/commands/ref-filter/index.d.ts.map +1 -0
- package/dist/commands/ref-filter/ref-atoms.d.ts +88 -0
- package/dist/commands/ref-filter/ref-atoms.d.ts.map +1 -0
- package/dist/commands/ref-filter/ref-filter.d.ts +178 -0
- package/dist/commands/ref-filter/ref-filter.d.ts.map +1 -0
- package/dist/commands/ref-filter/ref-format.d.ts +222 -0
- package/dist/commands/ref-filter/ref-format.d.ts.map +1 -0
- package/dist/commands/ref-filter/ref-listing-command.d.ts +56 -0
- package/dist/commands/ref-filter/ref-listing-command.d.ts.map +1 -0
- package/dist/commands/ref-filter/ref-quote.d.ts +20 -0
- package/dist/commands/ref-filter/ref-quote.d.ts.map +1 -0
- package/dist/commands/ref-filter/version-compare.d.ts +20 -0
- package/dist/commands/ref-filter/version-compare.d.ts.map +1 -0
- package/dist/commands/reflog-command.d.ts +120 -0
- package/dist/commands/reflog-command.d.ts.map +1 -1
- package/dist/commands/reflog-walk.d.ts +72 -0
- package/dist/commands/reflog-walk.d.ts.map +1 -0
- package/dist/commands/remerge-diff.d.ts +59 -0
- package/dist/commands/remerge-diff.d.ts.map +1 -0
- package/dist/commands/remote-command.d.ts +179 -29
- package/dist/commands/remote-command.d.ts.map +1 -1
- package/dist/commands/remote-show-command.d.ts +204 -0
- package/dist/commands/remote-show-command.d.ts.map +1 -0
- package/dist/commands/remote-transport.d.ts +7 -1
- package/dist/commands/remote-transport.d.ts.map +1 -1
- package/dist/commands/reset-command.d.ts +21 -4
- package/dist/commands/reset-command.d.ts.map +1 -1
- package/dist/commands/restore-command.d.ts +9 -3
- package/dist/commands/restore-command.d.ts.map +1 -1
- package/dist/commands/rev-filter/commit-filter.d.ts +95 -0
- package/dist/commands/rev-filter/commit-filter.d.ts.map +1 -0
- package/dist/commands/rev-filter/commit-grep.d.ts +91 -0
- package/dist/commands/rev-filter/commit-grep.d.ts.map +1 -0
- package/dist/commands/rev-filter/index.d.ts +3 -0
- package/dist/commands/rev-filter/index.d.ts.map +1 -0
- package/dist/commands/rev-list-command.d.ts +226 -2
- package/dist/commands/rev-list-command.d.ts.map +1 -1
- package/dist/commands/revert-command.d.ts +54 -1
- package/dist/commands/revert-command.d.ts.map +1 -1
- package/dist/commands/revision-range.d.ts +34 -1
- package/dist/commands/revision-range.d.ts.map +1 -1
- package/dist/commands/revision-resolver.d.ts +15 -0
- package/dist/commands/revision-resolver.d.ts.map +1 -1
- package/dist/commands/rm-command.d.ts +70 -2
- package/dist/commands/rm-command.d.ts.map +1 -1
- package/dist/commands/sequencer-pick.d.ts +186 -5
- package/dist/commands/sequencer-pick.d.ts.map +1 -1
- package/dist/commands/sequencer-support.d.ts +12 -1
- package/dist/commands/sequencer-support.d.ts.map +1 -1
- package/dist/commands/serve-repository.d.ts +7 -0
- package/dist/commands/serve-repository.d.ts.map +1 -1
- package/dist/commands/shortlog-command.d.ts +109 -0
- package/dist/commands/shortlog-command.d.ts.map +1 -0
- package/dist/commands/shortlog.d.ts +151 -0
- package/dist/commands/shortlog.d.ts.map +1 -0
- package/dist/commands/show-command.d.ts +130 -0
- package/dist/commands/show-command.d.ts.map +1 -0
- package/dist/commands/show-commit.d.ts +11 -0
- package/dist/commands/show-commit.d.ts.map +1 -0
- package/dist/commands/signature-check.d.ts +164 -0
- package/dist/commands/signature-check.d.ts.map +1 -0
- package/dist/commands/signing.d.ts +160 -0
- package/dist/commands/signing.d.ts.map +1 -0
- package/dist/commands/sparse-checkout-command.d.ts.map +1 -1
- package/dist/commands/sparse-index-view.d.ts +45 -0
- package/dist/commands/sparse-index-view.d.ts.map +1 -0
- package/dist/commands/ssh-signer.d.ts +29 -0
- package/dist/commands/ssh-signer.d.ts.map +1 -0
- package/dist/commands/ssh-verifier.d.ts +42 -0
- package/dist/commands/ssh-verifier.d.ts.map +1 -0
- package/dist/commands/stash-apply-command.d.ts +5 -0
- package/dist/commands/stash-apply-command.d.ts.map +1 -1
- package/dist/commands/stash-branch-command.d.ts +34 -0
- package/dist/commands/stash-branch-command.d.ts.map +1 -0
- package/dist/commands/stash-create-command.d.ts +17 -0
- package/dist/commands/stash-create-command.d.ts.map +1 -1
- package/dist/commands/stash-info.d.ts +93 -0
- package/dist/commands/stash-info.d.ts.map +1 -0
- package/dist/commands/stash-list-command.d.ts +16 -0
- package/dist/commands/stash-list-command.d.ts.map +1 -1
- package/dist/commands/stash-pop-command.d.ts +39 -0
- package/dist/commands/stash-pop-command.d.ts.map +1 -0
- package/dist/commands/stash-show-command.d.ts +48 -0
- package/dist/commands/stash-show-command.d.ts.map +1 -0
- package/dist/commands/stash-store-command.d.ts +29 -0
- package/dist/commands/stash-store-command.d.ts.map +1 -0
- package/dist/commands/stash-working-tree.d.ts.map +1 -1
- package/dist/commands/status-command.d.ts +31 -2
- package/dist/commands/status-command.d.ts.map +1 -1
- package/dist/commands/status-header.d.ts +5 -0
- package/dist/commands/status-header.d.ts.map +1 -1
- package/dist/commands/submodule-add-command.d.ts +89 -0
- package/dist/commands/submodule-add-command.d.ts.map +1 -0
- package/dist/commands/submodule-auth.d.ts +90 -0
- package/dist/commands/submodule-auth.d.ts.map +1 -0
- package/dist/commands/submodule-commands.d.ts +463 -0
- package/dist/commands/submodule-commands.d.ts.map +1 -0
- package/dist/commands/submodule-fetch.d.ts +149 -0
- package/dist/commands/submodule-fetch.d.ts.map +1 -0
- package/dist/commands/submodule-model.d.ts +296 -0
- package/dist/commands/submodule-model.d.ts.map +1 -0
- package/dist/commands/submodule-unpack.d.ts +120 -0
- package/dist/commands/submodule-unpack.d.ts.map +1 -0
- package/dist/commands/submodule-update-command.d.ts +206 -0
- package/dist/commands/submodule-update-command.d.ts.map +1 -0
- package/dist/commands/subtree-shift.d.ts +27 -0
- package/dist/commands/subtree-shift.d.ts.map +1 -0
- package/dist/commands/switch-command.d.ts +3 -0
- package/dist/commands/switch-command.d.ts.map +1 -1
- package/dist/commands/tag-command.d.ts +259 -10
- package/dist/commands/tag-command.d.ts.map +1 -1
- package/dist/commands/trailers.d.ts +218 -17
- package/dist/commands/trailers.d.ts.map +1 -1
- package/dist/commands/tree-restore.d.ts +7 -0
- package/dist/commands/tree-restore.d.ts.map +1 -1
- package/dist/commands/verify-command.d.ts +92 -0
- package/dist/commands/verify-command.d.ts.map +1 -0
- package/dist/commands/worktree-add-command.d.ts +79 -7
- package/dist/commands/worktree-add-command.d.ts.map +1 -1
- package/dist/commands/worktree-overwrite-checks.d.ts +2 -0
- package/dist/commands/worktree-overwrite-checks.d.ts.map +1 -1
- package/dist/commands/worktree-path-rules.d.ts +66 -0
- package/dist/commands/worktree-path-rules.d.ts.map +1 -0
- package/dist/commands/worktree-remove-command.d.ts +10 -3
- package/dist/commands/worktree-remove-command.d.ts.map +1 -1
- package/dist/commands/worktree-repair-command.d.ts +15 -2
- package/dist/commands/worktree-repair-command.d.ts.map +1 -1
- package/dist/commands/worktree-support.d.ts +5 -0
- package/dist/commands/worktree-support.d.ts.map +1 -1
- package/dist/{commands-DIJ91NnD.js → commands-CNvli5bl.js} +49442 -54941
- package/dist/errors/checkout-errors.d.ts +19 -0
- package/dist/errors/checkout-errors.d.ts.map +1 -1
- package/dist/errors/command-errors.d.ts +25 -0
- package/dist/errors/command-errors.d.ts.map +1 -1
- package/dist/errors/index.js +85 -3
- package/dist/errors/ref-errors.d.ts +19 -0
- package/dist/errors/ref-errors.d.ts.map +1 -1
- package/dist/errors/worktree-errors.d.ts +6 -1
- package/dist/errors/worktree-errors.d.ts.map +1 -1
- package/dist/fsck-CPeDh9fh.js +5138 -0
- package/dist/git-command.d.ts +58 -2
- package/dist/git-command.d.ts.map +1 -1
- package/dist/git.d.ts +363 -1
- package/dist/git.d.ts.map +1 -1
- package/dist/guarded-transport-command.d.ts +82 -0
- package/dist/guarded-transport-command.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -5
- package/dist/remote-config/index.d.ts +1 -1
- package/dist/remote-config/index.d.ts.map +1 -1
- package/dist/remote-config/remote-config-store.d.ts +55 -0
- package/dist/remote-config/remote-config-store.d.ts.map +1 -1
- package/dist/remote-transport-CCmBadm-.js +1606 -0
- package/dist/rename/detect-renames.d.ts +20 -0
- package/dist/rename/detect-renames.d.ts.map +1 -1
- package/dist/rename/diffcore-break.d.ts +51 -0
- package/dist/rename/diffcore-break.d.ts.map +1 -0
- package/dist/rename/index.d.ts +1 -0
- package/dist/rename/index.d.ts.map +1 -1
- package/dist/results/blame-format.d.ts +62 -1
- package/dist/results/blame-format.d.ts.map +1 -1
- package/dist/results/clone-result.d.ts +9 -0
- package/dist/results/clone-result.d.ts.map +1 -1
- package/dist/results/combined-diff.d.ts +3 -0
- package/dist/results/combined-diff.d.ts.map +1 -1
- package/dist/results/diff-check.d.ts +38 -0
- package/dist/results/diff-check.d.ts.map +1 -0
- package/dist/results/diff-color.d.ts +135 -0
- package/dist/results/diff-color.d.ts.map +1 -0
- package/dist/results/diff-dirstat.d.ts +36 -0
- package/dist/results/diff-dirstat.d.ts.map +1 -0
- package/dist/results/diff-entry.d.ts +10 -0
- package/dist/results/diff-entry.d.ts.map +1 -1
- package/dist/results/diff-formatter.d.ts.map +1 -1
- package/dist/results/diff-output.d.ts +103 -1
- package/dist/results/diff-output.d.ts.map +1 -1
- package/dist/results/diff-pickaxe.d.ts +67 -0
- package/dist/results/diff-pickaxe.d.ts.map +1 -0
- package/dist/results/diff-words.d.ts +55 -0
- package/dist/results/diff-words.d.ts.map +1 -0
- package/dist/results/fetch-result.d.ts +12 -1
- package/dist/results/fetch-result.d.ts.map +1 -1
- package/dist/results/index.d.ts +6 -0
- package/dist/results/index.d.ts.map +1 -1
- package/dist/results/index.js +2 -2
- package/dist/results/init-result.d.ts +8 -1
- package/dist/results/init-result.d.ts.map +1 -1
- package/dist/results/line-range-hunks.d.ts +27 -0
- package/dist/results/line-range-hunks.d.ts.map +1 -0
- package/dist/results/merge-result.d.ts +8 -1
- package/dist/results/merge-result.d.ts.map +1 -1
- package/dist/results/pull-result.d.ts +11 -0
- package/dist/results/pull-result.d.ts.map +1 -1
- package/dist/results/push-result.d.ts +12 -0
- package/dist/results/push-result.d.ts.map +1 -1
- package/dist/results/rebase-result.d.ts +2 -0
- package/dist/results/rebase-result.d.ts.map +1 -1
- package/dist/results/stash-result.d.ts +6 -0
- package/dist/results/stash-result.d.ts.map +1 -1
- package/dist/results/status-result.d.ts +1 -1
- package/dist/results/status-result.d.ts.map +1 -1
- package/dist/results-BDuEgdLU.js +46847 -0
- package/dist/transport-command.d.ts +14 -0
- package/dist/transport-command.d.ts.map +1 -1
- package/dist/whitespace/index.d.ts +2 -0
- package/dist/whitespace/index.d.ts.map +1 -0
- package/dist/whitespace/whitespace-rule.d.ts +94 -0
- package/dist/whitespace/whitespace-rule.d.ts.map +1 -0
- package/package.json +12 -12
- package/src/commands/add-command.ts +293 -17
- package/src/commands/add-patch/add-patch.ts +8 -0
- package/src/commands/add-patch/patch-backend.ts +20 -2
- package/src/commands/am/am-command.ts +400 -46
- package/src/commands/am/index.ts +1 -0
- package/src/commands/am/mailsplit.ts +326 -0
- package/src/commands/apply/apply-command.ts +58 -15
- package/src/commands/apply/apply-engine.ts +1 -1
- package/src/commands/apply/apply-parse.ts +17 -8
- package/src/commands/apply/index.ts +8 -1
- package/src/commands/bisect/bisect-command.ts +18 -5
- package/src/commands/blame-command.ts +1450 -51
- package/src/commands/blame-ignore.ts +307 -0
- package/src/commands/branch-command.ts +528 -53
- package/src/commands/branch-info-command.ts +150 -0
- package/src/commands/branch-tracking.ts +335 -60
- package/src/commands/branch-upstream-command.ts +218 -0
- package/src/commands/check-mailmap-command.ts +129 -0
- package/src/commands/checkout-command.ts +166 -55
- package/src/commands/checkout-paths.ts +28 -0
- package/src/commands/cherry-command.ts +187 -0
- package/src/commands/cherry-pick-command.ts +185 -1
- package/src/commands/clean-command.ts +126 -15
- package/src/commands/clean-interactive.ts +522 -0
- package/src/commands/clone-command.ts +598 -45
- package/src/commands/commit-command.ts +925 -74
- package/src/commands/commit-reuse.ts +94 -0
- package/src/commands/config-command.ts +1256 -0
- package/src/commands/config-value-types.ts +358 -0
- package/src/commands/core-config.ts +40 -0
- package/src/commands/describe-command.ts +341 -254
- package/src/commands/diff-color-config.ts +274 -0
- package/src/commands/diff-command.ts +1619 -99
- package/src/commands/fetch-command.ts +495 -14
- package/src/commands/fetch-multiple-command.ts +665 -0
- package/src/commands/fmt-merge-msg-command.ts +715 -0
- package/src/commands/fork-point.ts +63 -0
- package/src/commands/format-patch-command.ts +496 -116
- package/src/commands/fsck/fetch-fsck.ts +172 -18
- package/src/commands/gc-command.ts +31 -1
- package/src/commands/git-describe.ts +460 -201
- package/src/commands/git-hooks.ts +123 -3
- package/src/commands/grep/grep-command.ts +1077 -0
- package/src/commands/grep/grep-engine.ts +1024 -0
- package/src/commands/grep/index.ts +2 -0
- package/src/commands/index-adder.ts +46 -7
- package/src/commands/index.ts +43 -0
- package/src/commands/init-command.ts +603 -49
- package/src/commands/interpret-trailers-command.ts +256 -0
- package/src/commands/line-log.ts +931 -0
- package/src/commands/local-transport.ts +109 -10
- package/src/commands/log-command.ts +2599 -326
- package/src/commands/log-graph.ts +129 -29
- package/src/commands/log-output.ts +449 -27
- package/src/commands/ls-remote-command.ts +5 -0
- package/src/commands/mailmap.ts +155 -0
- package/src/commands/merge-base-command.ts +170 -0
- package/src/commands/merge-bases.ts +63 -8
- package/src/commands/merge-command.ts +601 -95
- package/src/commands/merge-drivers.ts +3 -0
- package/src/commands/merge-strategy-options.ts +224 -0
- package/src/commands/merge-support.ts +115 -22
- package/src/commands/message-cleanup.ts +1 -1
- package/src/commands/mv-command.ts +6 -3
- package/src/commands/name-rev-command.ts +184 -0
- package/src/commands/name-rev.ts +762 -0
- package/src/commands/notes-command.ts +11 -1
- package/src/commands/octopus-merge.ts +35 -11
- package/src/commands/ort-merge.ts +41 -7
- package/src/commands/ort-recursive.ts +40 -2
- package/src/commands/patch-id.ts +109 -0
- package/src/commands/pathspec-file.ts +72 -0
- package/src/commands/pathspec.ts +14 -2
- package/src/commands/pretty-format.ts +103 -19
- package/src/commands/promisor-remote.ts +10 -1
- package/src/commands/pull-command.ts +734 -221
- package/src/commands/push-command.ts +1035 -68
- package/src/commands/range-diff/index.ts +3 -0
- package/src/commands/range-diff/linear-assignment.ts +203 -0
- package/src/commands/range-diff/range-diff-command.ts +433 -0
- package/src/commands/range-diff/range-diff.ts +617 -0
- package/src/commands/read-tree-command.ts +102 -4
- package/src/commands/rebase-command.ts +1074 -194
- package/src/commands/ref-filter/for-each-ref-command.ts +298 -0
- package/src/commands/ref-filter/index.ts +7 -0
- package/src/commands/ref-filter/ref-atoms.ts +581 -0
- package/src/commands/ref-filter/ref-filter.ts +651 -0
- package/src/commands/ref-filter/ref-format.ts +1070 -0
- package/src/commands/ref-filter/ref-listing-command.ts +421 -0
- package/src/commands/ref-filter/ref-quote.ts +69 -0
- package/src/commands/ref-filter/version-compare.ts +177 -0
- package/src/commands/reflog-command.ts +492 -2
- package/src/commands/reflog-walk.ts +234 -0
- package/src/commands/remerge-diff.ts +241 -0
- package/src/commands/remote-command.ts +537 -69
- package/src/commands/remote-show-command.ts +836 -0
- package/src/commands/remote-transport.ts +9 -1
- package/src/commands/reset-command.ts +114 -34
- package/src/commands/restore-command.ts +27 -41
- package/src/commands/rev-filter/commit-filter.ts +159 -0
- package/src/commands/rev-filter/commit-grep.ts +444 -0
- package/src/commands/rev-filter/index.ts +2 -0
- package/src/commands/rev-list-command.ts +578 -15
- package/src/commands/revert-command.ts +123 -1
- package/src/commands/revision-range.ts +207 -5
- package/src/commands/revision-resolver.ts +23 -8
- package/src/commands/rm-command.ts +282 -21
- package/src/commands/sequencer-pick.ts +818 -111
- package/src/commands/sequencer-support.ts +184 -4
- package/src/commands/serve-repository.ts +18 -3
- package/src/commands/shortlog-command.ts +354 -0
- package/src/commands/shortlog.ts +361 -0
- package/src/commands/show-command.ts +491 -0
- package/src/commands/show-commit.ts +24 -0
- package/src/commands/signature-check.ts +657 -0
- package/src/commands/signing.ts +385 -0
- package/src/commands/sparse-checkout-command.ts +2 -9
- package/src/commands/sparse-checkout-support.ts +2 -2
- package/src/commands/sparse-index-view.ts +135 -0
- package/src/commands/ssh-signer.ts +199 -0
- package/src/commands/ssh-verifier.ts +523 -0
- package/src/commands/stash-apply-command.ts +16 -4
- package/src/commands/stash-branch-command.ts +88 -0
- package/src/commands/stash-create-command.ts +28 -0
- package/src/commands/stash-info.ts +243 -0
- package/src/commands/stash-list-command.ts +33 -0
- package/src/commands/stash-pop-command.ts +83 -0
- package/src/commands/stash-show-command.ts +141 -0
- package/src/commands/stash-store-command.ts +82 -0
- package/src/commands/stash-working-tree.ts +2 -2
- package/src/commands/status-command.ts +120 -27
- package/src/commands/status-format.ts +1 -1
- package/src/commands/status-header.ts +41 -7
- package/src/commands/submodule-add-command.ts +509 -0
- package/src/commands/submodule-auth.ts +276 -0
- package/src/commands/submodule-commands.ts +1835 -0
- package/src/commands/submodule-fetch.ts +789 -0
- package/src/commands/submodule-model.ts +938 -0
- package/src/commands/submodule-unpack.ts +265 -0
- package/src/commands/submodule-update-command.ts +1126 -0
- package/src/commands/subtree-shift.ts +215 -0
- package/src/commands/switch-command.ts +12 -1
- package/src/commands/tag-command.ts +876 -64
- package/src/commands/trailers.ts +837 -100
- package/src/commands/tree-restore.ts +44 -11
- package/src/commands/verify-command.ts +235 -0
- package/src/commands/worktree-add-command.ts +268 -24
- package/src/commands/worktree-overwrite-checks.ts +5 -0
- package/src/commands/worktree-path-rules.ts +183 -0
- package/src/commands/worktree-remove-command.ts +39 -5
- package/src/commands/worktree-repair-command.ts +52 -5
- package/src/commands/worktree-support.ts +22 -1
- package/src/errors/checkout-errors.ts +29 -0
- package/src/errors/command-errors.ts +37 -1
- package/src/errors/ref-errors.ts +23 -0
- package/src/errors/worktree-errors.ts +8 -1
- package/src/git-command.ts +153 -2
- package/src/git.ts +550 -1
- package/src/guarded-transport-command.ts +171 -0
- package/src/index.ts +1 -0
- package/src/remote-config/index.ts +2 -0
- package/src/remote-config/remote-config-store.ts +101 -0
- package/src/rename/detect-renames.ts +42 -8
- package/src/rename/diffcore-break.ts +166 -0
- package/src/rename/index.ts +1 -0
- package/src/results/blame-format.ts +268 -43
- package/src/results/clone-result.ts +6 -0
- package/src/results/combined-diff.ts +38 -18
- package/src/results/diff-check.ts +185 -0
- package/src/results/diff-color.ts +868 -0
- package/src/results/diff-dirstat.ts +117 -0
- package/src/results/diff-entry.ts +12 -0
- package/src/results/diff-formatter.ts +1 -0
- package/src/results/diff-output.ts +322 -32
- package/src/results/diff-pickaxe.ts +304 -0
- package/src/results/diff-words.ts +395 -0
- package/src/results/fetch-result.ts +12 -1
- package/src/results/index.ts +6 -0
- package/src/results/init-result.ts +10 -1
- package/src/results/line-range-hunks.ts +126 -0
- package/src/results/merge-result.ts +9 -0
- package/src/results/pull-result.ts +7 -0
- package/src/results/push-result.ts +12 -0
- package/src/results/rebase-result.ts +3 -0
- package/src/results/stash-result.ts +7 -0
- package/src/results/status-result.ts +2 -2
- package/src/transport-command.ts +34 -3
- package/src/whitespace/index.ts +1 -0
- package/src/{commands/apply/whitespace.ts → whitespace/whitespace-rule.ts} +173 -23
- package/dist/commands/apply/whitespace.d.ts +0 -58
- package/dist/commands/apply/whitespace.d.ts.map +0 -1
- package/dist/git-command-BGiOJ8Zk.js +0 -7246
- package/dist/results-WVlBhVb1.js +0 -2935
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The color settings of `git diff`, `log` and `show` as git reads them: `color.ui`,
|
|
3
|
+
* `color.diff` (`diff.color`), `color.diff.<slot>` (`diff.color.<slot>`), `diff.colorMoved`,
|
|
4
|
+
* `diff.colorMovedWS`, `diff.wsErrorHighlight`, `color.decorate.<slot>`, then the command
|
|
5
|
+
* line's `--color`, `--color-moved`, `--color-moved-ws` and `--ws-error-highlight`.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* const settings = readDiffColorSettings(workingCopy, { color: true, colorMoved: "zebra" });
|
|
10
|
+
* // settings.colors: the palette; settings.colorMoved: "zebra"
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* The configuration is read in its order, as git's config callbacks see it, and a value
|
|
14
|
+
* git refuses dies as git dies (`error: invalid color value: <v>`, then where it was read).
|
|
15
|
+
* Without a terminal `auto` means no color: only `always` (or `--color`) colors.
|
|
16
|
+
*
|
|
17
|
+
* @module
|
|
18
|
+
*/
|
|
19
|
+
import type { WorkingCopy } from "@statewalker/vcs-working-tree";
|
|
20
|
+
import { GitApiError } from "../errors/index.js";
|
|
21
|
+
import { type ColorMovedMode, type DiffColors } from "../results/diff-color.js";
|
|
22
|
+
/** The decoration slots of `color.decorate.<slot>` (log-tree.c's `color_decorate_slots`) */
|
|
23
|
+
export interface DecorationColors {
|
|
24
|
+
branch: string;
|
|
25
|
+
remoteBranch: string;
|
|
26
|
+
tag: string;
|
|
27
|
+
stash: string;
|
|
28
|
+
HEAD: string;
|
|
29
|
+
grafted: string;
|
|
30
|
+
reset: string;
|
|
31
|
+
}
|
|
32
|
+
/** log-tree.c's `decoration_colors` */
|
|
33
|
+
export declare const DEFAULT_DECORATION_COLORS: Readonly<DecorationColors>;
|
|
34
|
+
/** What the command line says about colors (each unset: the configuration's) */
|
|
35
|
+
export interface DiffColorOptions {
|
|
36
|
+
/** `--color[=always|never|auto]` (true is `always`), `--no-color` (false) */
|
|
37
|
+
color?: boolean | "always" | "never" | "auto";
|
|
38
|
+
/**
|
|
39
|
+
* `--color-moved[=<mode>]`: true is `--color-moved` alone (`diff.colorMoved` when it names
|
|
40
|
+
* a mode, else `zebra`), false `--no-color-moved`; a mode git does not know throws git's
|
|
41
|
+
* two lines (exit 129)
|
|
42
|
+
*/
|
|
43
|
+
colorMoved?: boolean | string;
|
|
44
|
+
/** `--color-moved-ws=<modes>`, false `--no-color-moved-ws` */
|
|
45
|
+
colorMovedWs?: string | false;
|
|
46
|
+
/** `--ws-error-highlight=<kinds>` */
|
|
47
|
+
wsErrorHighlight?: string;
|
|
48
|
+
/** 2.43 knows no `#rgb` colors (default 2.56) */
|
|
49
|
+
colorCompatibility?: "2.43" | "2.56";
|
|
50
|
+
}
|
|
51
|
+
/** The colors a diff (and a log) prints with */
|
|
52
|
+
export interface DiffColorSettings {
|
|
53
|
+
/** The palette, or undefined for no color */
|
|
54
|
+
colors?: DiffColors;
|
|
55
|
+
/** The decorations' palette (with `colors` only) */
|
|
56
|
+
decorationColors?: DecorationColors;
|
|
57
|
+
colorMoved: ColorMovedMode;
|
|
58
|
+
colorMovedWs: number;
|
|
59
|
+
wsErrorHighlight: number;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* The color settings of a porcelain diff (`git_diff_ui_config` when `uiConfig`, else only
|
|
63
|
+
* the slots of `git_diff_basic_config`), then the command line's.
|
|
64
|
+
*
|
|
65
|
+
* @throws InvalidConfigError for a value git refuses in the configuration (exit 128)
|
|
66
|
+
* @throws InvalidArgumentError for an option git refuses (exit 129)
|
|
67
|
+
*/
|
|
68
|
+
export declare function readDiffColorSettings(workingCopy: WorkingCopy, options: DiffColorOptions & {
|
|
69
|
+
wordDiff?: string;
|
|
70
|
+
}, uiConfig?: boolean): DiffColorSettings;
|
|
71
|
+
/** Throws git's death for a `core.whitespace` git refuses */
|
|
72
|
+
export declare function whitespaceRuleError(message: string): GitApiError;
|
|
73
|
+
//# sourceMappingURL=diff-color-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diff-color-config.d.ts","sourceRoot":"","sources":["../../src/commands/diff-color-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAEjE,OAAO,EAAE,WAAW,EAA4C,MAAM,oBAAoB,CAAC;AAE3F,OAAO,EAEL,KAAK,cAAc,EAEnB,KAAK,UAAU,EAOhB,MAAM,0BAA0B,CAAC;AAIlC,4FAA4F;AAC5F,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,uCAAuC;AACvC,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,gBAAgB,CAQ/D,CAAC;AAEH,gFAAgF;AAChF,MAAM,WAAW,gBAAgB;IAC/B,6EAA6E;IAC7E,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;IAC9C;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC9B,8DAA8D;IAC9D,YAAY,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC9B,qCAAqC;IACrC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iDAAiD;IACjD,kBAAkB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACtC;AAED,gDAAgD;AAChD,MAAM,WAAW,iBAAiB;IAChC,6CAA6C;IAC7C,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,oDAAoD;IACpD,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,UAAU,EAAE,cAAc,CAAC;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAgCD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,gBAAgB,GAAG;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,EACjD,QAAQ,UAAO,GACd,iBAAiB,CA0InB;AAED,6DAA6D;AAC7D,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,CAEhE"}
|
|
@@ -2,16 +2,38 @@ import { type XdiffAlgorithm } from "@statewalker/vcs-utils";
|
|
|
2
2
|
import { type Staging } from "@statewalker/vcs-working-tree";
|
|
3
3
|
import { GitCommand } from "../git-command.js";
|
|
4
4
|
import { ChangeType, type DiffEntry } from "../results/diff-entry.js";
|
|
5
|
-
import { type DiffOutputOptions, type DiffstatFile, type DiffstatOptions } from "../results/diff-output.js";
|
|
5
|
+
import { type DiffDriver, type DiffOutputOptions, type DiffstatFile, type DiffstatOptions } from "../results/diff-output.js";
|
|
6
|
+
import { type DiffColorOptions, type DiffColorSettings } from "./diff-color-config.js";
|
|
6
7
|
import { type SubmoduleIgnoreMode } from "./submodule-config.js";
|
|
7
8
|
import { type SubmoduleDiffFormat } from "./submodule-summary.js";
|
|
8
|
-
export type DiffOutputFormat = "patch" | "stat" | "numstat" | "shortstat" | "summary" | "name-only" | "name-status"
|
|
9
|
+
export type DiffOutputFormat = "patch" | "stat" | "numstat" | "shortstat" | "summary" | "name-only" | "name-status"
|
|
10
|
+
/**
|
|
11
|
+
* `--dirstat`: the share of the change each directory holds (see
|
|
12
|
+
* {@link DiffTextOptions.dirstat}, `diff.dirstat`)
|
|
13
|
+
*/
|
|
14
|
+
| "dirstat"
|
|
15
|
+
/**
|
|
16
|
+
* `--check`: the whitespace errors and leftover conflict markers the change adds (see
|
|
17
|
+
* {@link writePairCheck}); it turns the other formats off, and {@link DiffCommand.exitCode}
|
|
18
|
+
* gets 2 when it found any
|
|
19
|
+
*/
|
|
20
|
+
| "check";
|
|
9
21
|
/** Options of the text output that `git diff` takes on its command line */
|
|
10
|
-
export interface DiffTextOptions extends Omit<DiffOutputOptions, "driver" | "algorithm" | "indentHeuristic"
|
|
22
|
+
export interface DiffTextOptions extends Omit<DiffOutputOptions, "driver" | "algorithm" | "indentHeuristic" | "ignoreRegex" | "colors" | "wsHighlight" | "whitespaceRule" | "defaultWordRegex" | "anchors">, DiffColorOptions {
|
|
23
|
+
/**
|
|
24
|
+
* The builtin diff drivers (funcname and word regexes) of that git version (default 2.56):
|
|
25
|
+
* 2.43 has no `ini`, `r` and `swift` drivers and older `bash`, `csharp` and `scheme` ones
|
|
26
|
+
*/
|
|
27
|
+
driverCompatibility?: "2.43" | "2.56";
|
|
11
28
|
/** `--diff-algorithm` (default `diff.algorithm`, else myers) */
|
|
12
29
|
algorithm?: XdiffAlgorithm;
|
|
13
30
|
/** `--indent-heuristic` / `--no-indent-heuristic` (default `diff.indentHeuristic`, true) */
|
|
14
31
|
indentHeuristic?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* diff_options.stat_sep: text written after the blank line that separates a stat or
|
|
34
|
+
* summary from the patch (format-patch's MIME part header with `--attach`/`--inline`)
|
|
35
|
+
*/
|
|
36
|
+
statSep?: string;
|
|
15
37
|
/**
|
|
16
38
|
* `--abbrev=<n>`: the `index` lines' ids at least n digits, clamped as git clamps it (below
|
|
17
39
|
* 4, 0 too, is 4; above 40 is 40); the combined diffs of conflicted paths ignore it, as
|
|
@@ -77,7 +99,122 @@ export interface DiffTextOptions extends Omit<DiffOutputOptions, "driver" | "alg
|
|
|
77
99
|
* prefixes with them (`diff --git b/f a/f`). Combined diffs of conflicted paths are not swapped.
|
|
78
100
|
*/
|
|
79
101
|
reverse?: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* `--diff-filter=<letters>`: only the pairs of these statuses (`A`dded, `C`opied,
|
|
104
|
+
* `D`eleted, `M`odified, `R`enamed, `T`ype changed, `U`nmerged, `X` unknown, `B`roken);
|
|
105
|
+
* a lowercase letter leaves its status out instead, and `*` keeps every pair as long as one
|
|
106
|
+
* of them matches (all or none). An unknown letter throws git's
|
|
107
|
+
* `error: unknown change class '<c>' in --diff-filter=<letters>` (exit 129). The combined
|
|
108
|
+
* diff (`diff --cc`) of a conflicted path is not filtered, as git's is not.
|
|
109
|
+
*/
|
|
110
|
+
diffFilter?: string;
|
|
111
|
+
/**
|
|
112
|
+
* `--relative=<path>`: only the paths that start with `<path>` (a string prefix, as git's
|
|
113
|
+
* `strncmp`: `sub` takes `subdir/` too), shown without it (and the `/` after it);
|
|
114
|
+
* `--no-relative` is `false`. The commands run at the top of the worktree, so `true`
|
|
115
|
+
* (`--relative` without a path, or `diff.relative`) shows every path as it is.
|
|
116
|
+
*/
|
|
117
|
+
relative?: string | boolean;
|
|
118
|
+
/**
|
|
119
|
+
* `--rotate-to=<path>`: the output starts at this path, the ones before it moved to the end;
|
|
120
|
+
* `git diff` throws `fatal: No such path '<path>' in the diff` when no pair has it, `git
|
|
121
|
+
* log` starts at the first path after it
|
|
122
|
+
*/
|
|
123
|
+
rotateTo?: string;
|
|
124
|
+
/** `--skip-to=<path>`: as {@link rotateTo}, the paths before it left out */
|
|
125
|
+
skipTo?: string;
|
|
126
|
+
/**
|
|
127
|
+
* `-I<regex>` (`--ignore-matching-lines`): changes whose lines all match one of these POSIX
|
|
128
|
+
* extended regexes are not shown (xdiff's `xdl_mark_ignorable_regex`); an invalid one
|
|
129
|
+
* throws git's `error: invalid regex given to -I: '<regex>'` (exit 129)
|
|
130
|
+
*/
|
|
131
|
+
ignoreMatchingLines?: readonly string[];
|
|
132
|
+
/**
|
|
133
|
+
* `--quiet` still detects renames and copies (git 2.43; default false: git 2.5x's
|
|
134
|
+
* diff_setup_done turns `detect_rename` off under `quick`, so `--quiet --diff-filter=R`
|
|
135
|
+
* finds nothing there)
|
|
136
|
+
*/
|
|
137
|
+
quietDetectsRenames?: boolean;
|
|
138
|
+
/**
|
|
139
|
+
* `--exit-code` and `--quiet` count only the pairs an output shows (default true, git 2.5x,
|
|
140
|
+
* whose porcelain diff turns `diff_from_contents` on with an exit status: `--summary` alone
|
|
141
|
+
* then exits 0, a pair whose patch shows nothing does not count); false counts every queued
|
|
142
|
+
* pair unless a whitespace option or `-I` is given, as git 2.43
|
|
143
|
+
*/
|
|
144
|
+
exitCodeFromContents?: boolean;
|
|
145
|
+
/**
|
|
146
|
+
* `-S<string>`: only the pairs whose two sides hold the string a different number of
|
|
147
|
+
* times (diffcore-pickaxe.c), read through textconv unless `textconv: false`. An empty
|
|
148
|
+
* string throws git's `error: -S requires a non-empty argument` (exit 129).
|
|
149
|
+
*/
|
|
150
|
+
pickaxeString?: string;
|
|
151
|
+
/**
|
|
152
|
+
* `-G<regex>`: only the pairs whose added or removed lines match this POSIX extended
|
|
153
|
+
* regex; binary pairs are passed over unless `text` (or textconv makes them text). An
|
|
154
|
+
* empty one throws `error: -G requires a non-empty argument` (exit 129), an invalid one
|
|
155
|
+
* `fatal: invalid regex: <message>` (exit 128).
|
|
156
|
+
*/
|
|
157
|
+
pickaxeGrep?: string;
|
|
158
|
+
/**
|
|
159
|
+
* `--find-object=<object>` (each a revision naming an object): only the pairs with one of
|
|
160
|
+
* them on either side; a diff of two trees also lists the subtrees that changed, so a tree
|
|
161
|
+
* can be found too (`tree_in_recursive`). One that names nothing throws `error: unable to
|
|
162
|
+
* resolve '<object>'` (exit 129).
|
|
163
|
+
*/
|
|
164
|
+
findObjects?: readonly string[];
|
|
165
|
+
/** `--pickaxe-regex`: `-S` takes a POSIX extended regex */
|
|
166
|
+
pickaxeRegex?: boolean;
|
|
167
|
+
/** `--pickaxe-all`: when one pair matches, every pair is kept; when none, none */
|
|
168
|
+
pickaxeAll?: boolean;
|
|
169
|
+
/** `-i` / `--regexp-ignore-case` of `-S`/`-G` (ASCII case folded) */
|
|
170
|
+
pickaxeIgnoreCase?: boolean;
|
|
171
|
+
/**
|
|
172
|
+
* `-M[<n>]` / `--find-renames[=<n>]`: detect renames, at least this similar (git's
|
|
173
|
+
* syntax: `90%`, `9` and `.9` alike; `true` the default 50%); `false` is `--no-renames`.
|
|
174
|
+
* Wins over {@link DiffCommand.setRenames} and `diff.renames`. Trailing text throws git's
|
|
175
|
+
* `error: invalid argument to find-renames` (exit 129).
|
|
176
|
+
*/
|
|
177
|
+
findRenames?: boolean | string;
|
|
178
|
+
/**
|
|
179
|
+
* `-C[<n>]` / `--find-copies[=<n>]`: renames and copies, from the modified paths too (the
|
|
180
|
+
* threshold as {@link findRenames}). With `diff.renames=copies` and nothing else asking,
|
|
181
|
+
* git's second `-C` is found: copies are then found harder.
|
|
182
|
+
*/
|
|
183
|
+
findCopies?: boolean | string;
|
|
184
|
+
/** `--find-copies-harder` (or `-C -C`): unchanged paths are copy sources too */
|
|
185
|
+
findCopiesHarder?: boolean;
|
|
186
|
+
/**
|
|
187
|
+
* `-B[<n>][/<m>]` / `--break-rewrites`: modifications that changed at least `<n>` (default
|
|
188
|
+
* 50%) are broken into a deletion and a creation for rename detection, and merged back
|
|
189
|
+
* unless they removed at least `<m>` (default 60%) of the old content, shown then as a
|
|
190
|
+
* complete rewrite (`dissimilarity index`, `M<score>`)
|
|
191
|
+
*/
|
|
192
|
+
breakRewrites?: boolean | string;
|
|
193
|
+
/**
|
|
194
|
+
* `--dirstat=<params>` for the `dirstat` format: comma-separated `changes`, `lines`,
|
|
195
|
+
* `files`, `cumulative`, `noncumulative` and a cut-off percentage (default `diff.dirstat`,
|
|
196
|
+
* else `changes,noncumulative,3`)
|
|
197
|
+
*/
|
|
198
|
+
dirstat?: string;
|
|
199
|
+
/**
|
|
200
|
+
* `--anchored=<text>`: the patience diff, lines starting with one of these texts kept
|
|
201
|
+
* unchanged where they are unique on both sides
|
|
202
|
+
*/
|
|
203
|
+
anchored?: readonly string[];
|
|
80
204
|
}
|
|
205
|
+
/** Whether options ask for a pickaxe (git's `DIFF_PICKAXE_KINDS_MASK`) */
|
|
206
|
+
export declare function hasPickaxe(o: DiffTextOptions): boolean;
|
|
207
|
+
/**
|
|
208
|
+
* diff.c's checks of the pickaxe options (the option callbacks' empty-argument errors, then
|
|
209
|
+
* diff_setup_done's combinations), before anything is read
|
|
210
|
+
*/
|
|
211
|
+
export declare function checkPickaxeOptions(o: DiffTextOptions): void;
|
|
212
|
+
/**
|
|
213
|
+
* `diff.renames` as git_config_rename reads it: `copies`/`copy` detect copies too.
|
|
214
|
+
*
|
|
215
|
+
* @internal
|
|
216
|
+
*/
|
|
217
|
+
export declare function renamesValue(value: string | undefined): boolean | "copies" | undefined;
|
|
81
218
|
/**
|
|
82
219
|
* Show changes between commits, trees, the index and the worktree.
|
|
83
220
|
*
|
|
@@ -141,6 +278,15 @@ export declare class DiffCommand extends GitCommand<DiffEntry[]> {
|
|
|
141
278
|
private dirtySubmodules?;
|
|
142
279
|
/** `diff.submodule` (its last value git knows), read by the text outputs */
|
|
143
280
|
private configuredSubmoduleFormat?;
|
|
281
|
+
/** The colors of the output, read with the diff configuration (or given by `git log`) */
|
|
282
|
+
private colorSettings?;
|
|
283
|
+
/**
|
|
284
|
+
* The colors already read (`readDiffColorSettings`): `git log` reads them once for all its
|
|
285
|
+
* commits' diffs
|
|
286
|
+
*
|
|
287
|
+
* @internal
|
|
288
|
+
*/
|
|
289
|
+
setColorSettings(settings: DiffColorSettings): this;
|
|
144
290
|
private readonly configWarnings;
|
|
145
291
|
/** {@link dirtySubmodules} for the comparison being collected */
|
|
146
292
|
private dirtyThisCall;
|
|
@@ -157,9 +303,73 @@ export declare class DiffCommand extends GitCommand<DiffEntry[]> {
|
|
|
157
303
|
private temporaryIndex?;
|
|
158
304
|
/** Intent-to-add entries are in the index as empty files (plumbing's `diff-index --cached`) */
|
|
159
305
|
private intentToAddVisible;
|
|
306
|
+
/** The index stands for a tree (see {@link setIndexAsTree}) */
|
|
307
|
+
private indexAsTree;
|
|
308
|
+
/** `--exit-code` */
|
|
309
|
+
private exitWithStatus;
|
|
310
|
+
/** `--quiet` */
|
|
311
|
+
private quiet;
|
|
312
|
+
/** `--merge-base` */
|
|
313
|
+
private mergeBase;
|
|
314
|
+
/** Whether `--rotate-to`/`--skip-to` need their exact path (`git diff`; not `git log`) */
|
|
315
|
+
private rotateStrict;
|
|
316
|
+
/** git's `has_changes` of the last call */
|
|
317
|
+
private changesFound;
|
|
318
|
+
/** git's `check_failed`: `--check` found an error in the last call */
|
|
319
|
+
private checkFailed;
|
|
320
|
+
/** The revisions given resolved (ranges, `--merge-base`) */
|
|
321
|
+
private sidesResolved;
|
|
322
|
+
/** The compiled pickaxe (`-S`, `-G`, `--find-object`), once the options are checked */
|
|
323
|
+
private pickaxe?;
|
|
324
|
+
/**
|
|
325
|
+
* `--find-object`'s `tree_in_recursive`: the subtrees of a diff of two trees, by the side
|
|
326
|
+
* map their blobs go to
|
|
327
|
+
*/
|
|
328
|
+
private treeSides?;
|
|
329
|
+
/**
|
|
330
|
+
* `--exit-code`: {@link exitCode} is 1 when the diff found differences, as git's status
|
|
331
|
+
* (`diff_result_code`). With whitespace options or `-I`, only pairs whose patch shows a
|
|
332
|
+
* change count (git's `diff_from_contents`).
|
|
333
|
+
*/
|
|
334
|
+
setExitCode(exitCode: boolean): this;
|
|
335
|
+
/**
|
|
336
|
+
* `--quiet`: {@link callText} and {@link callBytes} print nothing and {@link exitCode} is
|
|
337
|
+
* 1 when anything differs (`--exit-code`). As git's `quick` flag, the diff stops at its
|
|
338
|
+
* first difference: no rename detection (git 2.5x; see
|
|
339
|
+
* {@link DiffTextOptions.quietDetectsRenames}), no content read past the first pair that
|
|
340
|
+
* shows a change.
|
|
341
|
+
*/
|
|
342
|
+
setQuiet(quiet: boolean): this;
|
|
343
|
+
/**
|
|
344
|
+
* `--merge-base`: diff from the merge base of the old tree and the new one (`git diff
|
|
345
|
+
* --merge-base A B`), or of the old tree and HEAD against the index (`--cached`) or the
|
|
346
|
+
* worktree (`git diff --merge-base A`). Both must be commits with exactly one merge base,
|
|
347
|
+
* else git's `fatal: no merge base found` / `fatal: multiple merge bases found`; a range
|
|
348
|
+
* throws `fatal: --merge-base does not work with ranges`.
|
|
349
|
+
*/
|
|
350
|
+
setMergeBase(mergeBase: boolean): this;
|
|
351
|
+
/**
|
|
352
|
+
* `--rotate-to`/`--skip-to` take the first path after a missing one, as `git log` does,
|
|
353
|
+
* instead of failing as `git diff` does.
|
|
354
|
+
*
|
|
355
|
+
* @internal
|
|
356
|
+
*/
|
|
357
|
+
setRotateStrict(strict: boolean): this;
|
|
160
358
|
/**
|
|
161
|
-
*
|
|
162
|
-
*
|
|
359
|
+
* The exit status `git diff` ends with (`diff_result_code`): bit 1 when `--exit-code` or
|
|
360
|
+
* `--quiet` is set and the last call found differences, bit 2 when its `--check` (the
|
|
361
|
+
* `check` format) found errors.
|
|
362
|
+
*/
|
|
363
|
+
get exitCode(): number;
|
|
364
|
+
/** Whether the last call's `--check` found errors (git's `check_failed`) */
|
|
365
|
+
get checkFoundErrors(): boolean;
|
|
366
|
+
/** Whether the last call found differences (git's `has_changes`) */
|
|
367
|
+
get hasChanges(): boolean;
|
|
368
|
+
/**
|
|
369
|
+
* Show intent-to-add entries as the empty files they name, as plumbing's
|
|
370
|
+
* `diff-index --cached` and `diff-files` do (porcelain `git diff` sets
|
|
371
|
+
* `ita_invisible_in_index`): in a `--cached` comparison on the index side, against the
|
|
372
|
+
* worktree as the old side (`git add -e`'s diff).
|
|
163
373
|
*
|
|
164
374
|
* @internal
|
|
165
375
|
*/
|
|
@@ -168,9 +378,11 @@ export declare class DiffCommand extends GitCommand<DiffEntry[]> {
|
|
|
168
378
|
* Set the old (base) tree/commit for comparison.
|
|
169
379
|
*
|
|
170
380
|
* Can be a commit ID, branch name, tag name, or tree ID.
|
|
171
|
-
* If not set, defaults to HEAD (or the index, for the worktree diff).
|
|
381
|
+
* If not set, defaults to HEAD (or the index, for the worktree diff). Without a new tree, a
|
|
382
|
+
* range compares two commits as `git diff` does: `A..B` is `A B`, `A...B` diffs B from the
|
|
383
|
+
* merge base of A and B (an empty side is HEAD).
|
|
172
384
|
*
|
|
173
|
-
* @param refOrId Commit-ish or tree ID
|
|
385
|
+
* @param refOrId Commit-ish or tree ID, or a range
|
|
174
386
|
*/
|
|
175
387
|
setOldTree(refOrId: string): this;
|
|
176
388
|
/**
|
|
@@ -227,6 +439,12 @@ export declare class DiffCommand extends GitCommand<DiffEntry[]> {
|
|
|
227
439
|
* `diff.submodule`, its warnings, and the failure of a variable without a value.
|
|
228
440
|
*/
|
|
229
441
|
private readUiConfig;
|
|
442
|
+
/** `diff.dirstat`'s parameters (git's defaults without it) */
|
|
443
|
+
private configuredDirstat?;
|
|
444
|
+
/** The dirstat's parameters: `diff.dirstat`, then {@link DiffTextOptions.dirstat} */
|
|
445
|
+
private dirstatParams;
|
|
446
|
+
/** show_dirstat (or show_dirstat_by_line): the dirstat of the pairs */
|
|
447
|
+
private writeDirstat;
|
|
230
448
|
/**
|
|
231
449
|
* Compare HEAD (or the old tree) to the index instead of the worktree.
|
|
232
450
|
*
|
|
@@ -241,6 +459,14 @@ export declare class DiffCommand extends GitCommand<DiffEntry[]> {
|
|
|
241
459
|
*/
|
|
242
460
|
setTemporaryIndex(index: Staging): this;
|
|
243
461
|
protected get staging(): Staging;
|
|
462
|
+
/**
|
|
463
|
+
* Compares the old tree with `index` taken as a tree, as git's `do_diff_cache` of an index
|
|
464
|
+
* built in memory (`stash show -u`'s worktree and untracked trees): `--cached` against
|
|
465
|
+
* it, with the prefixes of two trees (no mnemonic `c/` and `i/`).
|
|
466
|
+
*
|
|
467
|
+
* @internal
|
|
468
|
+
*/
|
|
469
|
+
setIndexAsTree(index: Staging): this;
|
|
244
470
|
/**
|
|
245
471
|
* Filter results to only paths starting with this prefix.
|
|
246
472
|
*
|
|
@@ -252,6 +478,31 @@ export declare class DiffCommand extends GitCommand<DiffEntry[]> {
|
|
|
252
478
|
* <pathspec>`) does: paths from the top, with wildcards and magic (see `LogCommand.addPath`).
|
|
253
479
|
*/
|
|
254
480
|
setPathspec(paths: string[]): this;
|
|
481
|
+
/**
|
|
482
|
+
* The queue {@link callFormats} prints instead of comparing the trees: pairs a caller found
|
|
483
|
+
* itself (`git log -L` queues each commit's pairs with their line ranges, line-log.c's
|
|
484
|
+
* `line_log_queue_pairs`). diffcore's later stages (pickaxe, order, `--diff-filter`) still
|
|
485
|
+
* apply.
|
|
486
|
+
*
|
|
487
|
+
* @internal
|
|
488
|
+
*/
|
|
489
|
+
setQueue(entries: DiffEntry[]): this;
|
|
490
|
+
private presetQueue?;
|
|
491
|
+
/**
|
|
492
|
+
* diffcore's filtering stages over a queue a caller found (the pickaxe, `-O`,
|
|
493
|
+
* `--diff-filter`): git 2.43's `git log -L` runs them on the pairs it follows renames with
|
|
494
|
+
*
|
|
495
|
+
* @internal
|
|
496
|
+
*/
|
|
497
|
+
filterQueue(entries: DiffEntry[]): Promise<DiffEntry[]>;
|
|
498
|
+
/**
|
|
499
|
+
* The diff driver of a path as a diff of two trees finds it (the worktree's attributes,
|
|
500
|
+
* `diff.<driver>.*`, the builtin drivers): `git log -L :<funcname>:<file>` finds functions
|
|
501
|
+
* by its funcname pattern (line-range.c's `userdiff_find_by_path`)
|
|
502
|
+
*
|
|
503
|
+
* @internal
|
|
504
|
+
*/
|
|
505
|
+
driverOf(path: string): Promise<DiffDriver | undefined>;
|
|
255
506
|
/**
|
|
256
507
|
* Detect renames (`-M`, `--no-renames`). Default: off for `call()` (each path as added and
|
|
257
508
|
* deleted), `diff.renames` (default on) for `callText()`.
|
|
@@ -261,6 +512,23 @@ export declare class DiffCommand extends GitCommand<DiffEntry[]> {
|
|
|
261
512
|
setRenameLimit(limit: number): this;
|
|
262
513
|
/** `diff` stores no objects: its abbreviations read each loose fan-out directory once */
|
|
263
514
|
protected writesNoObjects(): boolean;
|
|
515
|
+
/** diff.c's `additional_path_headers` (see {@link setAdditionalHeaders}) */
|
|
516
|
+
private additionalHeaders?;
|
|
517
|
+
/**
|
|
518
|
+
* diff.c's `additional_path_headers` (`--remerge-diff`'s `remerge CONFLICT` lines), by path:
|
|
519
|
+
* the paths within the pathspec keep theirs (log-tree.c's setup_additional_headers). A
|
|
520
|
+
* pair's headers follow its rename lines; a path with headers and no change is shown as a
|
|
521
|
+
* `diff --git` line with its headers alone, unless a pickaxe or a `--diff-filter` without
|
|
522
|
+
* `U` is given (`include_conflict_headers`).
|
|
523
|
+
*/
|
|
524
|
+
setAdditionalHeaders(headers: ReadonlyMap<string, readonly string[]>): this;
|
|
525
|
+
/** The additional headers within the pathspec, undefined for none */
|
|
526
|
+
private headersInPathspec;
|
|
527
|
+
/**
|
|
528
|
+
* diff.c's `include_conflict_headers`: headers present, no pickaxe, and no `--diff-filter`
|
|
529
|
+
* or one that keeps `U`
|
|
530
|
+
*/
|
|
531
|
+
private includesConflictHeaders;
|
|
264
532
|
/** Text output options: context, algorithm, whitespace, `--stat` widths, ... */
|
|
265
533
|
setOptions(options: DiffTextOptions): this;
|
|
266
534
|
/**
|
|
@@ -281,6 +549,14 @@ export declare class DiffCommand extends GitCommand<DiffEntry[]> {
|
|
|
281
549
|
callText(format?: DiffOutputFormat): Promise<string>;
|
|
282
550
|
/** {@link callText} as bytes (file content that is not UTF-8 kept as it is). */
|
|
283
551
|
callBytes(format?: DiffOutputFormat): Promise<Uint8Array>;
|
|
552
|
+
/**
|
|
553
|
+
* `--quiet` (git's `quick` flag, `DIFF_FORMAT_NO_OUTPUT`): whether anything differs, stopping
|
|
554
|
+
* early. Without `--diff-filter` and content options the first queued pair answers
|
|
555
|
+
* (diff_can_quit_early): no renames are detected and no content is read; with content
|
|
556
|
+
* options (`-w`, `-I`, ...) pairs are diffed until one shows a change (diff_flush's
|
|
557
|
+
* `diff_flush_patch_quietly` loop).
|
|
558
|
+
*/
|
|
559
|
+
private quietCheck;
|
|
284
560
|
/**
|
|
285
561
|
* The diffstat of the comparison, one file per pair in git's order (`compute_diffstat` of
|
|
286
562
|
* the diff queue, as a `DIFF_FORMAT_CALLBACK` consumer sees it): an unmerged path as a
|
|
@@ -314,6 +590,11 @@ export declare class DiffCommand extends GitCommand<DiffEntry[]> {
|
|
|
314
590
|
private followSource;
|
|
315
591
|
/** The formats of the collected comparison, in diff_flush's order */
|
|
316
592
|
private writeFormats;
|
|
593
|
+
/**
|
|
594
|
+
* create_filepairs_for_header_only_notifications: the pairs, and the paths with headers
|
|
595
|
+
* none of them names first (as strings), sorted by first name (diffcore_fix_diff_index)
|
|
596
|
+
*/
|
|
597
|
+
private withHeaderOnlyPairs;
|
|
317
598
|
/**
|
|
318
599
|
* builtin_diff's submodule branch: `--submodule=log` (show_submodule_diff_summary) or
|
|
319
600
|
* `--submodule=diff` (show_submodule_inline_diff) for a pair of submodules (or a submodule
|
|
@@ -328,9 +609,19 @@ export declare class DiffCommand extends GitCommand<DiffEntry[]> {
|
|
|
328
609
|
* as they are (the entry's `readNew`, which reads it cleaned)
|
|
329
610
|
*/
|
|
330
611
|
private withTextconvInputs;
|
|
612
|
+
/**
|
|
613
|
+
* diff.c's textconv_object, as `git show --textconv <rev>:<path>` runs it: the output of
|
|
614
|
+
* the path's `diff.<driver>.textconv` over the blob as checkout writes it, or undefined
|
|
615
|
+
* when no textconv applies (not a regular file, no driver, no command or no runner
|
|
616
|
+
* installed, `textconv: false`). The attributes are the worktree's alone (git show reads
|
|
617
|
+
* no index).
|
|
618
|
+
*/
|
|
619
|
+
textconvBlob(path: string, mode: number, read: () => Promise<Uint8Array>): Promise<Uint8Array | undefined>;
|
|
331
620
|
/** A blob's content as checkout writes it to the worktree (the worktree's smudge filter) */
|
|
332
621
|
private smudged;
|
|
333
|
-
/**
|
|
622
|
+
/** git 2.5x's names from contents (see {@link DiffTextOptions.namesFromContents}) */
|
|
623
|
+
private get namesFromContents();
|
|
624
|
+
/** The pairs `--name-only` lists: with whitespace options or `-I`, those whose patch shows a change */
|
|
334
625
|
private shownNames;
|
|
335
626
|
private get config();
|
|
336
627
|
/** What this diff compares */
|
|
@@ -357,6 +648,38 @@ export declare class DiffCommand extends GitCommand<DiffEntry[]> {
|
|
|
357
648
|
private get worktreeIfAny();
|
|
358
649
|
/** The output options: the setters', else the configuration's */
|
|
359
650
|
private outputOptions;
|
|
651
|
+
/** `ll_merge_marker_size`: each path's `conflict-marker-size` attribute */
|
|
652
|
+
private conflictMarkerSizeOf;
|
|
653
|
+
/**
|
|
654
|
+
* ws.c's `whitespace_rule`: the `whitespace` attribute of a path over `core.whitespace`
|
|
655
|
+
* (git 2.43 knows no `incomplete-line` rule)
|
|
656
|
+
*/
|
|
657
|
+
private whitespaceRuleOf;
|
|
658
|
+
/** `-I<regex>` compiled as git's `regcomp(REG_EXTENDED | REG_NEWLINE)` */
|
|
659
|
+
private ignoreRegex;
|
|
660
|
+
/**
|
|
661
|
+
* git's `diff_from_contents`: whitespace options and `-I` (and, in git 2.5x, an exit status
|
|
662
|
+
* asked for) make a pair count as a change only when its output shows one
|
|
663
|
+
*/
|
|
664
|
+
private get fromContents();
|
|
665
|
+
/**
|
|
666
|
+
* The queue diffcore_std leaves of the collected entries: in `-O` order, swapped by `-R`,
|
|
667
|
+
* rotated (`--rotate-to`, `--skip-to`), filtered (`--diff-filter`)
|
|
668
|
+
*/
|
|
669
|
+
private selected;
|
|
670
|
+
/**
|
|
671
|
+
* diffcore_std's prefetch condition: any pickaxe kind (`DIFF_PICKAXE_KINDS_MASK`,
|
|
672
|
+
* `--find-object` included) fetches a partial clone's absent blobs of the queue in one
|
|
673
|
+
* batch before rename detection
|
|
674
|
+
*/
|
|
675
|
+
private get pickaxeReads();
|
|
676
|
+
/** diffcore_pickaxe over the queue (after rename detection, before `-O` and the filter) */
|
|
677
|
+
private picked;
|
|
678
|
+
/**
|
|
679
|
+
* The pickaxe of the options (checked, compiled, `--find-object`'s revisions resolved),
|
|
680
|
+
* before anything else is read
|
|
681
|
+
*/
|
|
682
|
+
private preparePickaxe;
|
|
360
683
|
/**
|
|
361
684
|
* The changed paths (and renames, when asked), in git's order, and the conflicted paths
|
|
362
685
|
* `git diff` shows as combined diffs (`patch`: the patch format, where a path with both
|
|
@@ -364,6 +687,25 @@ export declare class DiffCommand extends GitCommand<DiffEntry[]> {
|
|
|
364
687
|
* against the worktree, as `diff-files` does).
|
|
365
688
|
*/
|
|
366
689
|
private collect;
|
|
690
|
+
/**
|
|
691
|
+
* `--find-object`'s tree_in_recursive: the changed subtrees of a diff of two trees among
|
|
692
|
+
* the blob pairs, each before what lies below it (the tree walk's order: `a/` sorts after
|
|
693
|
+
* `a.txt`); they take no part in rename detection
|
|
694
|
+
*/
|
|
695
|
+
private withTreeEntries;
|
|
696
|
+
/**
|
|
697
|
+
* builtin/diff.c's revision handling: `A..B` is `A B`, `A...B` the merge base of A and B
|
|
698
|
+
* against B (symdiff_prepare: the first base, with git's warning when there are several),
|
|
699
|
+
* `--merge-base` the merge base of the two sides (diff_get_merge_base); an empty side of a
|
|
700
|
+
* range is HEAD.
|
|
701
|
+
*/
|
|
702
|
+
private resolveRevisions;
|
|
703
|
+
/**
|
|
704
|
+
* lookup_commit_reference of a revision: the commit it names (tags peeled); for another
|
|
705
|
+
* object git's `error: object <id> is a <type>, not a commit` goes to `errors`. A name that
|
|
706
|
+
* resolves to nothing throws git's `ambiguous argument` (of the whole `argument`).
|
|
707
|
+
*/
|
|
708
|
+
private commitOf;
|
|
367
709
|
/**
|
|
368
710
|
* What the submodule at a path ignores (git's `set_diffopt_flags_from_submodule_config`
|
|
369
711
|
* over `diff.ignoreSubmodules`): its `submodule.<name>.ignore` (the configuration, else
|
|
@@ -374,6 +716,8 @@ export declare class DiffCommand extends GitCommand<DiffEntry[]> {
|
|
|
374
716
|
private submoduleIgnores;
|
|
375
717
|
/** diff-files on a conflicted path's stage 2 (`--ours`): its entry against the worktree */
|
|
376
718
|
private againstStage;
|
|
719
|
+
/** The `--relative=<path>` prefix paths are limited to and shown without */
|
|
720
|
+
private get relativePrefix();
|
|
377
721
|
private matches;
|
|
378
722
|
/**
|
|
379
723
|
* The entries of both sides in path order; an unmerged path is listed as such, followed by
|
|
@@ -381,8 +725,21 @@ export declare class DiffCommand extends GitCommand<DiffEntry[]> {
|
|
|
381
725
|
*/
|
|
382
726
|
private pairUp;
|
|
383
727
|
/**
|
|
384
|
-
*
|
|
385
|
-
* `
|
|
728
|
+
* diffcore's settings of a run: rename or copy detection (`renames` as configured or set,
|
|
729
|
+
* then `-M`/`-C`), its threshold, `--find-copies-harder`, `-B`; option errors are thrown here
|
|
730
|
+
*/
|
|
731
|
+
private diffcoreSettings;
|
|
732
|
+
/**
|
|
733
|
+
* diffcore_std's pair stages: `diffcore_break` (`-B`), `diffcore_rename` (renames, copies,
|
|
734
|
+
* `--find-copies-harder`), `diffcore_merge_broken`, then `diff_resolve_rename_copy`. The
|
|
735
|
+
* entries are changed in place, in git's queue order.
|
|
736
|
+
*/
|
|
737
|
+
private diffcore;
|
|
738
|
+
/**
|
|
739
|
+
* git's `diffcore_rename` over the queue: deleted paths (broken deletions too) as sources,
|
|
740
|
+
* with copies the modified paths (and, harder, the unmodified ones) as sources that stay,
|
|
741
|
+
* created paths as destinations. A destination paired becomes a rename (resolved into a
|
|
742
|
+
* copy or a rename by {@link diffcore}); a deletion its rename takes is dropped.
|
|
386
743
|
*/
|
|
387
744
|
private detectRenames;
|
|
388
745
|
/**
|
|
@@ -412,6 +769,8 @@ export declare class DiffCommand extends GitCommand<DiffEntry[]> {
|
|
|
412
769
|
private addRawSide;
|
|
413
770
|
/** A tree entry on one side: a blob as itself, a subtree as its blobs */
|
|
414
771
|
private addSide;
|
|
772
|
+
/** A subtree on one side, kept for `--find-object` (see {@link withTreeEntries}) */
|
|
773
|
+
private addTreeSide;
|
|
415
774
|
/**
|
|
416
775
|
* The index's stage-0 entries (intent-to-add ones left out: not in the index yet), and the
|
|
417
776
|
* stages of its conflicted paths
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diff-command.d.ts","sourceRoot":"","sources":["../../src/commands/diff-command.ts"],"names":[],"mappings":"AAMA,OAAO,
|
|
1
|
+
{"version":3,"file":"diff-command.d.ts","sourceRoot":"","sources":["../../src/commands/diff-command.ts"],"names":[],"mappings":"AAMA,OAAO,EAML,KAAK,cAAc,EACpB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAOL,KAAK,OAAO,EAKb,MAAM,+BAA+B,CAAC;AAQvC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAwB/C,OAAO,EAAE,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAGtE,OAAO,EAIL,KAAK,UAAU,EAEf,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,eAAe,EAUrB,MAAM,2BAA2B,CAAC;AAWnC,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EAGvB,MAAM,wBAAwB,CAAC;AAMhC,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAGL,KAAK,mBAAmB,EAGzB,MAAM,wBAAwB,CAAC;AAwChC,MAAM,MAAM,gBAAgB,GACxB,OAAO,GACP,MAAM,GACN,SAAS,GACT,WAAW,GACX,SAAS,GACT,WAAW,GACX,aAAa;AACf;;;GAGG;GACD,SAAS;AACX;;;;GAIG;GACD,OAAO,CAAC;AAEZ,2EAA2E;AAC3E,MAAM,WAAW,eACf,SAAQ,IAAI,CACR,iBAAiB,EACf,QAAQ,GACR,WAAW,GACX,iBAAiB,GACjB,aAAa,GACb,QAAQ,GACR,aAAa,GACb,gBAAgB,GAChB,kBAAkB,GAClB,SAAS,CACZ,EACD,gBAAgB;IAClB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACtC,gEAAgE;IAChE,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,4FAA4F;IAC5F,eAAe,CAAC,EAAE,OAAO,CAAC;I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