@statewalker/vcs-commands 0.8.0 → 0.10.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 +1 -1
- package/dist/commands/add-command.d.ts +32 -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 +2 -0
- package/dist/commands/add-patch/patch-backend.d.ts.map +1 -1
- package/dist/commands/add-patch/patch-modes.d.ts +6 -2
- package/dist/commands/add-patch/patch-modes.d.ts.map +1 -1
- package/dist/commands/add-patch/patch-session.d.ts +4 -0
- package/dist/commands/add-patch/patch-session.d.ts.map +1 -1
- package/dist/commands/am/am-command.d.ts +88 -2
- package/dist/commands/am/am-command.d.ts.map +1 -1
- 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-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/archive/archive-command.d.ts +169 -0
- package/dist/commands/archive/archive-command.d.ts.map +1 -0
- package/dist/commands/archive/archive-entry.d.ts +60 -0
- package/dist/commands/archive/archive-entry.d.ts.map +1 -0
- package/dist/commands/archive/index.d.ts +8 -0
- package/dist/commands/archive/index.d.ts.map +1 -0
- package/dist/commands/archive/remote-archive-command.d.ts +56 -0
- package/dist/commands/archive/remote-archive-command.d.ts.map +1 -0
- package/dist/commands/archive/tar-archive.d.ts +31 -0
- package/dist/commands/archive/tar-archive.d.ts.map +1 -0
- package/dist/commands/archive/tar-commit-id.d.ts +13 -0
- package/dist/commands/archive/tar-commit-id.d.ts.map +1 -0
- package/dist/commands/archive/upload-archive-writer.d.ts +48 -0
- package/dist/commands/archive/upload-archive-writer.d.ts.map +1 -0
- package/dist/commands/archive/zip-archive.d.ts +42 -0
- package/dist/commands/archive/zip-archive.d.ts.map +1 -0
- package/dist/commands/attributes-source.d.ts +10 -0
- package/dist/commands/attributes-source.d.ts.map +1 -1
- package/dist/commands/blame-command.d.ts +345 -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/bundle/bundle-create-command.d.ts +67 -0
- package/dist/commands/bundle/bundle-create-command.d.ts.map +1 -0
- package/dist/commands/bundle/bundle-format.d.ts +89 -0
- package/dist/commands/bundle/bundle-format.d.ts.map +1 -0
- package/dist/commands/bundle/bundle-list.d.ts +92 -0
- package/dist/commands/bundle/bundle-list.d.ts.map +1 -0
- package/dist/commands/bundle/bundle-read-commands.d.ts +81 -0
- package/dist/commands/bundle/bundle-read-commands.d.ts.map +1 -0
- package/dist/commands/bundle/bundle-support.d.ts +32 -0
- package/dist/commands/bundle/bundle-support.d.ts.map +1 -0
- package/dist/commands/bundle/bundle-transport.d.ts +38 -0
- package/dist/commands/bundle/bundle-transport.d.ts.map +1 -0
- package/dist/commands/bundle/bundle-uri-host.d.ts +43 -0
- package/dist/commands/bundle/bundle-uri-host.d.ts.map +1 -0
- package/dist/commands/bundle/bundle-uri.d.ts +55 -0
- package/dist/commands/bundle/bundle-uri.d.ts.map +1 -0
- package/dist/commands/bundle/bundle-verify.d.ts +63 -0
- package/dist/commands/bundle/bundle-verify.d.ts.map +1 -0
- package/dist/commands/bundle/index.d.ts +14 -0
- package/dist/commands/bundle/index.d.ts.map +1 -0
- package/dist/commands/cat-file/batch-format.d.ts +58 -0
- package/dist/commands/cat-file/batch-format.d.ts.map +1 -0
- package/dist/commands/cat-file/cat-file-command.d.ts +135 -0
- package/dist/commands/cat-file/cat-file-command.d.ts.map +1 -0
- package/dist/commands/cat-file/index.d.ts +3 -0
- package/dist/commands/cat-file/index.d.ts.map +1 -0
- package/dist/commands/check-attr-command.d.ts +66 -0
- package/dist/commands/check-attr-command.d.ts.map +1 -0
- package/dist/commands/check-ignore-command.d.ts +58 -0
- package/dist/commands/check-ignore-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/check-ref-format-command.d.ts +60 -0
- package/dist/commands/check-ref-format-command.d.ts.map +1 -0
- package/dist/commands/checkout-command.d.ts +7 -0
- package/dist/commands/checkout-command.d.ts.map +1 -1
- package/dist/commands/checkout-index-command.d.ts +96 -0
- package/dist/commands/checkout-index-command.d.ts.map +1 -0
- 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 +33 -1
- package/dist/commands/cherry-pick-command.d.ts.map +1 -1
- package/dist/commands/clean-command.d.ts +32 -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 +135 -2
- package/dist/commands/clone-command.d.ts.map +1 -1
- package/dist/commands/commit-command.d.ts +59 -3
- package/dist/commands/commit-command.d.ts.map +1 -1
- package/dist/commands/config-command.d.ts +2 -0
- package/dist/commands/config-command.d.ts.map +1 -1
- package/dist/commands/daemon-access-hook.d.ts +36 -0
- package/dist/commands/daemon-access-hook.d.ts.map +1 -0
- package/dist/commands/default-branch.d.ts +42 -0
- package/dist/commands/default-branch.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-command.d.ts +249 -10
- package/dist/commands/diff-command.d.ts.map +1 -1
- package/dist/commands/diff-external.d.ts +43 -0
- package/dist/commands/diff-external.d.ts.map +1 -0
- package/dist/commands/diff-plumbing/diff-pairs-command.d.ts +27 -0
- package/dist/commands/diff-plumbing/diff-pairs-command.d.ts.map +1 -0
- package/dist/commands/diff-plumbing/diff-plumbing-command.d.ts +129 -0
- package/dist/commands/diff-plumbing/diff-plumbing-command.d.ts.map +1 -0
- package/dist/commands/diff-plumbing/index.d.ts +3 -0
- package/dist/commands/diff-plumbing/index.d.ts.map +1 -0
- package/dist/commands/diff-textconv.d.ts +5 -1
- package/dist/commands/diff-textconv.d.ts.map +1 -1
- package/dist/commands/fast-export/fast-export-command.d.ts +135 -0
- package/dist/commands/fast-export/fast-export-command.d.ts.map +1 -0
- package/dist/commands/fast-export/fast-import-command.d.ts +182 -0
- package/dist/commands/fast-export/fast-import-command.d.ts.map +1 -0
- package/dist/commands/fast-export/fast-stream-support.d.ts +64 -0
- package/dist/commands/fast-export/fast-stream-support.d.ts.map +1 -0
- package/dist/commands/fast-export/index.d.ts +4 -0
- package/dist/commands/fast-export/index.d.ts.map +1 -0
- package/dist/commands/fetch-command.d.ts +125 -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/format-patch-command.d.ts +28 -2
- package/dist/commands/format-patch-command.d.ts.map +1 -1
- package/dist/commands/format-rev-command.d.ts +58 -0
- package/dist/commands/format-rev-command.d.ts.map +1 -0
- package/dist/commands/fsck/fsck-command.d.ts.map +1 -1
- package/dist/commands/fsck/fsck-msg-ids.d.ts +18 -3
- package/dist/commands/fsck/fsck-msg-ids.d.ts.map +1 -1
- package/dist/commands/fsmonitor-refresh.d.ts +69 -0
- package/dist/commands/fsmonitor-refresh.d.ts.map +1 -0
- package/dist/commands/gc-command.d.ts +5 -0
- package/dist/commands/gc-command.d.ts.map +1 -1
- package/dist/commands/git-describe.d.ts +77 -4
- package/dist/commands/git-describe.d.ts.map +1 -1
- package/dist/commands/git-hooks.d.ts +47 -1
- package/dist/commands/git-hooks.d.ts.map +1 -1
- package/dist/commands/git-paths.d.ts +26 -0
- package/dist/commands/git-paths.d.ts.map +1 -0
- package/dist/commands/grep/grep-command.d.ts +2 -1
- package/dist/commands/grep/grep-command.d.ts.map +1 -1
- package/dist/commands/history-command.d.ts +156 -0
- package/dist/commands/history-command.d.ts.map +1 -0
- package/dist/commands/http-config.d.ts +38 -0
- package/dist/commands/http-config.d.ts.map +1 -0
- package/dist/commands/index-adder.d.ts +12 -1
- package/dist/commands/index-adder.d.ts.map +1 -1
- package/dist/commands/index-host.d.ts.map +1 -1
- package/dist/commands/index.d.ts +56 -1
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +6 -3
- package/dist/commands/init-command.d.ts +89 -0
- package/dist/commands/init-command.d.ts.map +1 -1
- package/dist/commands/last-modified-command.d.ts +102 -0
- package/dist/commands/last-modified-command.d.ts.map +1 -0
- package/dist/commands/lfs/go-url.d.ts +43 -0
- package/dist/commands/lfs/go-url.d.ts.map +1 -0
- package/dist/commands/lfs/index.d.ts +3 -0
- package/dist/commands/lfs/index.d.ts.map +1 -0
- package/dist/commands/lfs/lfs-config.d.ts +174 -0
- package/dist/commands/lfs/lfs-config.d.ts.map +1 -0
- package/dist/commands/lfs/lfs-endpoint-command.d.ts +83 -0
- package/dist/commands/lfs/lfs-endpoint-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.map +1 -1
- package/dist/commands/log-command.d.ts +261 -6
- package/dist/commands/log-command.d.ts.map +1 -1
- package/dist/commands/log-graph.d.ts +4 -2
- package/dist/commands/log-graph.d.ts.map +1 -1
- package/dist/commands/log-output.d.ts +88 -2
- package/dist/commands/log-output.d.ts.map +1 -1
- package/dist/commands/ls-files-command.d.ts +153 -0
- package/dist/commands/ls-files-command.d.ts.map +1 -0
- package/dist/commands/ls-remote-command.d.ts +5 -0
- package/dist/commands/ls-remote-command.d.ts.map +1 -1
- package/dist/commands/ls-tree-command.d.ts +105 -0
- package/dist/commands/ls-tree-command.d.ts.map +1 -0
- package/dist/commands/mailmap.d.ts +24 -1
- package/dist/commands/mailmap.d.ts.map +1 -1
- package/dist/commands/maintenance-run-command.d.ts +122 -0
- package/dist/commands/maintenance-run-command.d.ts.map +1 -0
- package/dist/commands/merge-command.d.ts +58 -1
- package/dist/commands/merge-command.d.ts.map +1 -1
- package/dist/commands/merge-config.d.ts +7 -0
- package/dist/commands/merge-config.d.ts.map +1 -1
- package/dist/commands/merge-drivers.d.ts +69 -5
- 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 +16 -0
- package/dist/commands/merge-support.d.ts.map +1 -1
- package/dist/commands/merge-tree-command.d.ts +122 -0
- package/dist/commands/merge-tree-command.d.ts.map +1 -0
- package/dist/commands/message-cleanup.d.ts +2 -0
- package/dist/commands/message-cleanup.d.ts.map +1 -1
- package/dist/commands/mktag-command.d.ts +51 -0
- package/dist/commands/mktag-command.d.ts.map +1 -0
- 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 +110 -22
- package/dist/commands/name-rev.d.ts.map +1 -1
- package/dist/commands/object-store/count-objects-command.d.ts +58 -0
- package/dist/commands/object-store/count-objects-command.d.ts.map +1 -0
- package/dist/commands/object-store/index.d.ts +5 -0
- package/dist/commands/object-store/index.d.ts.map +1 -0
- package/dist/commands/object-store/objects-directory.d.ts +12 -0
- package/dist/commands/object-store/objects-directory.d.ts.map +1 -0
- package/dist/commands/object-store/prune-command.d.ts +38 -0
- package/dist/commands/object-store/prune-command.d.ts.map +1 -0
- package/dist/commands/object-store/show-index-command.d.ts +23 -0
- package/dist/commands/object-store/show-index-command.d.ts.map +1 -0
- 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 +40 -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-command.d.ts +30 -0
- package/dist/commands/patch-id-command.d.ts.map +1 -0
- package/dist/commands/patch-id.d.ts +82 -0
- package/dist/commands/patch-id.d.ts.map +1 -1
- package/dist/commands/plumbing-command.d.ts +66 -0
- package/dist/commands/plumbing-command.d.ts.map +1 -0
- package/dist/commands/plumbing-input.d.ts +38 -0
- package/dist/commands/plumbing-input.d.ts.map +1 -0
- package/dist/commands/promisor-remote-reply.d.ts +35 -0
- package/dist/commands/promisor-remote-reply.d.ts.map +1 -0
- package/dist/commands/promisor-remote.d.ts.map +1 -1
- package/dist/commands/pull-command.d.ts +182 -38
- package/dist/commands/pull-command.d.ts.map +1 -1
- package/dist/commands/push-command.d.ts +82 -2
- 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 +14 -0
- package/dist/commands/read-tree-command.d.ts.map +1 -1
- package/dist/commands/rebase-command.d.ts +129 -4
- package/dist/commands/rebase-command.d.ts.map +1 -1
- package/dist/commands/refs-command.d.ts +81 -0
- package/dist/commands/refs-command.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 +41 -0
- package/dist/commands/remote-command.d.ts.map +1 -1
- package/dist/commands/remote-object-info-command.d.ts +55 -0
- package/dist/commands/remote-object-info-command.d.ts.map +1 -0
- 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 +40 -3
- package/dist/commands/remote-transport.d.ts.map +1 -1
- package/dist/commands/repack-command.d.ts +115 -0
- package/dist/commands/repack-command.d.ts.map +1 -0
- package/dist/commands/replace-command.d.ts +143 -0
- package/dist/commands/replace-command.d.ts.map +1 -0
- package/dist/commands/replay-command.d.ts +117 -0
- package/dist/commands/replay-command.d.ts.map +1 -0
- package/dist/commands/repo-command.d.ts +136 -0
- package/dist/commands/repo-command.d.ts.map +1 -0
- package/dist/commands/request-pull-command.d.ts +82 -0
- package/dist/commands/request-pull-command.d.ts.map +1 -0
- package/dist/commands/rerere-command.d.ts +36 -0
- package/dist/commands/rerere-command.d.ts.map +1 -0
- package/dist/commands/rerere.d.ts +102 -0
- package/dist/commands/rerere.d.ts.map +1 -0
- package/dist/commands/reset-command.d.ts +19 -1
- package/dist/commands/reset-command.d.ts.map +1 -1
- package/dist/commands/restore-command.d.ts +7 -0
- package/dist/commands/restore-command.d.ts.map +1 -1
- package/dist/commands/rev-filter/commit-grep.d.ts +3 -1
- package/dist/commands/rev-filter/commit-grep.d.ts.map +1 -1
- package/dist/commands/rev-list-command.d.ts +78 -3
- package/dist/commands/rev-list-command.d.ts.map +1 -1
- package/dist/commands/rev-parse-command.d.ts +9 -0
- package/dist/commands/rev-parse-command.d.ts.map +1 -1
- package/dist/commands/revert-command.d.ts +32 -1
- package/dist/commands/revert-command.d.ts.map +1 -1
- package/dist/commands/revision-range.d.ts +7 -0
- package/dist/commands/revision-range.d.ts.map +1 -1
- package/dist/commands/revision-resolver.d.ts +12 -0
- package/dist/commands/revision-resolver.d.ts.map +1 -1
- package/dist/commands/sequencer-pick.d.ts +120 -1
- package/dist/commands/sequencer-pick.d.ts.map +1 -1
- package/dist/commands/sequencer-support.d.ts +10 -1
- package/dist/commands/sequencer-support.d.ts.map +1 -1
- package/dist/commands/serve-repository.d.ts +23 -1
- package/dist/commands/serve-repository.d.ts.map +1 -1
- package/dist/commands/session-id.d.ts +18 -0
- package/dist/commands/session-id.d.ts.map +1 -0
- 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-branch-command.d.ts +59 -0
- package/dist/commands/show-branch-command.d.ts.map +1 -0
- package/dist/commands/show-ref-command.d.ts +112 -0
- package/dist/commands/show-ref-command.d.ts.map +1 -0
- package/dist/commands/signature-check.d.ts +9 -2
- package/dist/commands/signature-check.d.ts.map +1 -1
- package/dist/commands/signing.d.ts +22 -1
- package/dist/commands/signing.d.ts.map +1 -1
- package/dist/commands/stash-apply-command.d.ts.map +1 -1
- package/dist/commands/stash-export-command.d.ts +115 -0
- package/dist/commands/stash-export-command.d.ts.map +1 -0
- package/dist/commands/status-command.d.ts +33 -3
- package/dist/commands/status-command.d.ts.map +1 -1
- package/dist/commands/stripspace-command.d.ts +44 -0
- package/dist/commands/stripspace-command.d.ts.map +1 -0
- package/dist/commands/submodule-add-command.d.ts +10 -1
- package/dist/commands/submodule-add-command.d.ts.map +1 -1
- package/dist/commands/submodule-auth.d.ts +3 -1
- package/dist/commands/submodule-auth.d.ts.map +1 -1
- package/dist/commands/submodule-commands.d.ts +99 -3
- package/dist/commands/submodule-commands.d.ts.map +1 -1
- 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 +8 -0
- package/dist/commands/submodule-model.d.ts.map +1 -1
- 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 +21 -1
- package/dist/commands/submodule-update-command.d.ts.map +1 -1
- 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/textconv-cache.d.ts +58 -0
- package/dist/commands/textconv-cache.d.ts.map +1 -0
- package/dist/commands/tree-restore.d.ts +5 -0
- package/dist/commands/tree-restore.d.ts.map +1 -1
- package/dist/commands/unpack-objects-command.d.ts +47 -0
- package/dist/commands/unpack-objects-command.d.ts.map +1 -0
- package/dist/commands/update-index-command.d.ts +110 -0
- package/dist/commands/update-index-command.d.ts.map +1 -0
- package/dist/commands/uri-protocols.d.ts +13 -0
- package/dist/commands/uri-protocols.d.ts.map +1 -0
- package/dist/commands/url-parse-command.d.ts +30 -0
- package/dist/commands/url-parse-command.d.ts.map +1 -0
- package/dist/commands/var-command.d.ts +42 -0
- package/dist/commands/var-command.d.ts.map +1 -0
- package/dist/commands/worktree-overwrite-checks.d.ts +2 -0
- package/dist/commands/worktree-overwrite-checks.d.ts.map +1 -1
- package/dist/{commands-ISM52N0n.js → commands-Mlo1dxQN.js} +56133 -70269
- package/dist/errors/command-errors.d.ts +58 -0
- package/dist/errors/command-errors.d.ts.map +1 -1
- package/dist/errors/index.js +67 -1
- package/dist/fsck-CrhVMNIH.js +5179 -0
- package/dist/git-command.d.ts +89 -3
- package/dist/git-command.d.ts.map +1 -1
- package/dist/git.d.ts +628 -1
- package/dist/git.d.ts.map +1 -1
- package/dist/guarded-transport-command.d.ts +84 -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 +7 -5
- package/dist/maintenance-run-command-Bw21HEkH.js +13539 -0
- package/dist/remote-transport-Bu4PGSMD.js +2605 -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/cherry-pick-result.d.ts +6 -0
- package/dist/results/cherry-pick-result.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/diff-dirstat.d.ts +36 -0
- package/dist/results/diff-dirstat.d.ts.map +1 -0
- package/dist/results/diff-entry.d.ts +20 -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 +67 -3
- package/dist/results/diff-output.d.ts.map +1 -1
- 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 +2 -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 +13 -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 +10 -0
- package/dist/results/push-result.d.ts.map +1 -1
- package/dist/results/rebase-result.d.ts +7 -0
- package/dist/results/rebase-result.d.ts.map +1 -1
- package/dist/results/revert-result.d.ts +6 -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 +1 -1
- package/dist/results/status-result.d.ts.map +1 -1
- package/dist/results-ERo9vELd.js +49673 -0
- package/dist/transport-command.d.ts +93 -1
- package/dist/transport-command.d.ts.map +1 -1
- package/package.json +12 -12
- package/src/commands/add-command.ts +118 -0
- package/src/commands/add-patch/add-patch.ts +8 -0
- package/src/commands/add-patch/patch-backend.ts +24 -3
- package/src/commands/add-patch/patch-modes.ts +26 -2
- package/src/commands/add-patch/patch-session.ts +6 -0
- package/src/commands/am/am-command.ts +301 -12
- package/src/commands/apply/apply-command.ts +52 -9
- package/src/commands/apply/apply-parse.ts +10 -0
- package/src/commands/apply/index.ts +9 -1
- package/src/commands/archive/archive-command.ts +1148 -0
- package/src/commands/archive/archive-entry.ts +93 -0
- package/src/commands/archive/index.ts +7 -0
- package/src/commands/archive/remote-archive-command.ts +140 -0
- package/src/commands/archive/tar-archive.ts +207 -0
- package/src/commands/archive/tar-commit-id.ts +72 -0
- package/src/commands/archive/upload-archive-writer.ts +213 -0
- package/src/commands/archive/zip-archive.ts +317 -0
- package/src/commands/attributes-source.ts +26 -12
- package/src/commands/blame-command.ts +1551 -53
- package/src/commands/blame-ignore.ts +307 -0
- package/src/commands/bundle/bundle-create-command.ts +405 -0
- package/src/commands/bundle/bundle-format.ts +228 -0
- package/src/commands/bundle/bundle-list.ts +276 -0
- package/src/commands/bundle/bundle-read-commands.ts +157 -0
- package/src/commands/bundle/bundle-support.ts +85 -0
- package/src/commands/bundle/bundle-transport.ts +107 -0
- package/src/commands/bundle/bundle-uri-host.ts +204 -0
- package/src/commands/bundle/bundle-uri.ts +236 -0
- package/src/commands/bundle/bundle-verify.ts +152 -0
- package/src/commands/bundle/index.ts +14 -0
- package/src/commands/cat-file/batch-format.ts +193 -0
- package/src/commands/cat-file/cat-file-command.ts +857 -0
- package/src/commands/cat-file/index.ts +2 -0
- package/src/commands/check-attr-command.ts +333 -0
- package/src/commands/check-ignore-command.ts +261 -0
- package/src/commands/check-mailmap-command.ts +129 -0
- package/src/commands/check-ref-format-command.ts +129 -0
- package/src/commands/checkout-command.ts +131 -28
- package/src/commands/checkout-index-command.ts +568 -0
- package/src/commands/checkout-paths.ts +35 -0
- package/src/commands/cherry-command.ts +187 -0
- package/src/commands/cherry-pick-command.ts +63 -2
- package/src/commands/clean-command.ts +92 -12
- package/src/commands/clean-interactive.ts +522 -0
- package/src/commands/clone-command.ts +803 -50
- package/src/commands/commit-command.ts +202 -51
- package/src/commands/config-command.ts +9 -0
- package/src/commands/daemon-access-hook.ts +78 -0
- package/src/commands/default-branch.ts +99 -1
- package/src/commands/describe-command.ts +341 -254
- package/src/commands/diff-command.ts +1186 -99
- package/src/commands/diff-external.ts +131 -0
- package/src/commands/diff-plumbing/diff-pairs-command.ts +193 -0
- package/src/commands/diff-plumbing/diff-plumbing-command.ts +424 -0
- package/src/commands/diff-plumbing/index.ts +2 -0
- package/src/commands/diff-textconv.ts +5 -1
- package/src/commands/fast-export/fast-export-command.ts +911 -0
- package/src/commands/fast-export/fast-import-command.ts +1553 -0
- package/src/commands/fast-export/fast-stream-support.ts +162 -0
- package/src/commands/fast-export/index.ts +3 -0
- package/src/commands/fetch-command.ts +665 -14
- package/src/commands/fetch-multiple-command.ts +668 -0
- package/src/commands/format-patch-command.ts +189 -77
- package/src/commands/format-rev-command.ts +251 -0
- package/src/commands/fsck/fsck-command.ts +47 -20
- package/src/commands/fsck/fsck-msg-ids.ts +19 -3
- package/src/commands/fsck/fsck-pack.ts +2 -2
- package/src/commands/fsmonitor-refresh.ts +315 -0
- package/src/commands/gc-command.ts +10 -0
- package/src/commands/git-describe.ts +456 -217
- package/src/commands/git-hooks.ts +165 -9
- package/src/commands/git-paths.ts +136 -0
- package/src/commands/grep/grep-command.ts +38 -15
- package/src/commands/history-command.ts +617 -0
- package/src/commands/http-config.ts +139 -0
- package/src/commands/index-adder.ts +37 -3
- package/src/commands/index-host.ts +6 -1
- package/src/commands/index.ts +62 -0
- package/src/commands/init-command.ts +617 -49
- package/src/commands/last-modified-command.ts +804 -0
- package/src/commands/lfs/go-url.ts +370 -0
- package/src/commands/lfs/index.ts +2 -0
- package/src/commands/lfs/lfs-config.ts +738 -0
- package/src/commands/lfs/lfs-endpoint-command.ts +180 -0
- package/src/commands/line-log.ts +931 -0
- package/src/commands/local-transport.ts +252 -4
- package/src/commands/log-command.ts +1518 -182
- package/src/commands/log-graph.ts +6 -3
- package/src/commands/log-output.ts +228 -15
- package/src/commands/ls-files-command.ts +1177 -0
- package/src/commands/ls-remote-command.ts +6 -0
- package/src/commands/ls-tree-command.ts +684 -0
- package/src/commands/mailmap.ts +41 -5
- package/src/commands/maintenance-run-command.ts +949 -0
- package/src/commands/merge-command.ts +351 -47
- package/src/commands/merge-config.ts +23 -1
- package/src/commands/merge-drivers.ts +112 -20
- package/src/commands/merge-strategy-options.ts +224 -0
- package/src/commands/merge-support.ts +130 -26
- package/src/commands/merge-tree-command.ts +786 -0
- package/src/commands/message-cleanup.ts +1 -1
- package/src/commands/mktag-command.ts +149 -0
- package/src/commands/name-rev-command.ts +184 -0
- package/src/commands/name-rev.ts +700 -109
- package/src/commands/object-store/count-objects-command.ts +404 -0
- package/src/commands/object-store/index.ts +4 -0
- package/src/commands/object-store/objects-directory.ts +24 -0
- package/src/commands/object-store/prune-command.ts +129 -0
- package/src/commands/object-store/show-index-command.ts +151 -0
- package/src/commands/octopus-merge.ts +35 -11
- package/src/commands/ort-merge.ts +124 -23
- package/src/commands/ort-recursive.ts +40 -2
- package/src/commands/patch-id-command.ts +65 -0
- package/src/commands/patch-id.ts +327 -0
- package/src/commands/plumbing-command.ts +141 -0
- package/src/commands/plumbing-input.ts +87 -0
- package/src/commands/promisor-remote-reply.ts +276 -0
- package/src/commands/promisor-remote.ts +25 -2
- package/src/commands/pull-command.ts +720 -224
- package/src/commands/push-command.ts +440 -8
- 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 +74 -3
- package/src/commands/rebase-command.ts +647 -83
- package/src/commands/refs-command.ts +274 -0
- package/src/commands/remerge-diff.ts +241 -0
- package/src/commands/remote-command.ts +98 -10
- package/src/commands/remote-object-info-command.ts +109 -0
- package/src/commands/remote-show-command.ts +836 -0
- package/src/commands/remote-transport.ts +116 -1
- package/src/commands/repack-command.ts +383 -0
- package/src/commands/replace-command.ts +816 -0
- package/src/commands/replay-command.ts +674 -0
- package/src/commands/repo-command.ts +967 -0
- package/src/commands/request-pull-command.ts +356 -0
- package/src/commands/rerere-command.ts +179 -0
- package/src/commands/rerere.ts +925 -0
- package/src/commands/reset-command.ts +78 -3
- package/src/commands/restore-command.ts +15 -0
- package/src/commands/rev-filter/commit-grep.ts +7 -2
- package/src/commands/rev-list-command.ts +196 -11
- package/src/commands/rev-parse-command.ts +62 -4
- package/src/commands/revert-command.ts +62 -2
- package/src/commands/revision-range.ts +10 -3
- package/src/commands/revision-resolver.ts +44 -3
- package/src/commands/sequencer-pick.ts +370 -29
- package/src/commands/sequencer-support.ts +164 -2
- package/src/commands/serve-repository.ts +65 -0
- package/src/commands/session-id.ts +31 -0
- package/src/commands/shortlog-command.ts +354 -0
- package/src/commands/shortlog.ts +361 -0
- package/src/commands/show-branch-command.ts +981 -0
- package/src/commands/show-command.ts +3 -2
- package/src/commands/show-ref-command.ts +439 -0
- package/src/commands/signature-check.ts +37 -5
- package/src/commands/signing.ts +122 -16
- package/src/commands/stash-apply-command.ts +3 -0
- package/src/commands/stash-export-command.ts +397 -0
- package/src/commands/status-command.ts +158 -31
- package/src/commands/status-format.ts +1 -1
- package/src/commands/stripspace-command.ts +118 -0
- package/src/commands/submodule-add-command.ts +22 -1
- package/src/commands/submodule-auth.ts +61 -6
- package/src/commands/submodule-commands.ts +333 -5
- package/src/commands/submodule-fetch.ts +789 -0
- package/src/commands/submodule-model.ts +9 -1
- package/src/commands/submodule-unpack.ts +265 -0
- package/src/commands/submodule-update-command.ts +68 -5
- package/src/commands/subtree-shift.ts +215 -0
- package/src/commands/switch-command.ts +9 -0
- package/src/commands/textconv-cache.ts +143 -0
- package/src/commands/tree-restore.ts +20 -1
- package/src/commands/unpack-objects-command.ts +235 -0
- package/src/commands/update-index-command.ts +1016 -0
- package/src/commands/uri-protocols.ts +13 -0
- package/src/commands/url-parse-command.ts +67 -0
- package/src/commands/var-command.ts +219 -0
- package/src/commands/worktree-overwrite-checks.ts +5 -0
- package/src/errors/command-errors.ts +80 -0
- package/src/git-command.ts +218 -2
- package/src/git.ts +1033 -80
- package/src/guarded-transport-command.ts +176 -0
- package/src/index.ts +1 -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/cherry-pick-result.ts +6 -0
- package/src/results/clone-result.ts +6 -0
- package/src/results/diff-dirstat.ts +117 -0
- package/src/results/diff-entry.ts +24 -0
- package/src/results/diff-formatter.ts +8 -4
- package/src/results/diff-output.ts +239 -8
- package/src/results/diff-pickaxe.ts +1 -1
- package/src/results/fetch-result.ts +24 -1
- package/src/results/index.ts +2 -0
- package/src/results/init-result.ts +10 -1
- package/src/results/line-range-hunks.ts +126 -0
- package/src/results/merge-result.ts +14 -0
- package/src/results/pull-result.ts +7 -0
- package/src/results/push-result.ts +10 -0
- package/src/results/rebase-result.ts +7 -0
- package/src/results/revert-result.ts +6 -0
- package/src/results/stash-result.ts +6 -0
- package/src/results/status-result.ts +2 -2
- package/src/transport-command.ts +216 -4
- package/dist/fsck-DLRpbwTj.js +0 -13405
- package/dist/results-TB2IJ64h.js +0 -4700
|
@@ -12,9 +12,16 @@
|
|
|
12
12
|
* @module
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { ByteSink } from "@statewalker/vcs-utils";
|
|
15
|
+
import { approxidateCareful, ByteSink } from "@statewalker/vcs-utils";
|
|
16
16
|
import { encodeGitPath } from "@statewalker/vcs-utils/encoding";
|
|
17
17
|
import type { BlameEntry, BlameResult } from "../commands/blame-command.js";
|
|
18
|
+
import { parseGitColor } from "../commands/config-value-types.js";
|
|
19
|
+
import {
|
|
20
|
+
type DateMode,
|
|
21
|
+
parseDateMode,
|
|
22
|
+
type ShowDateContext,
|
|
23
|
+
showDate,
|
|
24
|
+
} from "../commands/date-format.js";
|
|
18
25
|
import { displayWidth } from "./diff-output.js";
|
|
19
26
|
import { quotePath } from "./quote-path.js";
|
|
20
27
|
|
|
@@ -24,6 +31,15 @@ export interface BlamePorcelainOptions {
|
|
|
24
31
|
linePorcelain?: boolean;
|
|
25
32
|
/** `core.quotePath` (default true) */
|
|
26
33
|
quotePath?: boolean;
|
|
34
|
+
/** An `ignored` line under each ignored line (default the result's `markIgnoredLines`) */
|
|
35
|
+
markIgnoredLines?: boolean;
|
|
36
|
+
/** An `unblamable` line under each (default the result's `markUnblamableLines`) */
|
|
37
|
+
markUnblamableLines?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Whether the `ignored`/`unblamable` lines are written at all: git 2.50+ writes them
|
|
40
|
+
* (default true), older git marks only its default output
|
|
41
|
+
*/
|
|
42
|
+
lineMarks?: boolean;
|
|
27
43
|
}
|
|
28
44
|
|
|
29
45
|
/** Options of {@link formatBlame} (git's default output) */
|
|
@@ -54,8 +70,50 @@ export interface BlameFormatOptions {
|
|
|
54
70
|
* it only when a boundary commit is shown (default false)
|
|
55
71
|
*/
|
|
56
72
|
alwaysWidenAbbrev?: boolean;
|
|
73
|
+
/** `?` before the ids of ignored lines (default the result's `markIgnoredLines`) */
|
|
74
|
+
markIgnoredLines?: boolean;
|
|
75
|
+
/** `*` before the ids of unblamable lines (default the result's `markUnblamableLines`) */
|
|
76
|
+
markUnblamableLines?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* git annotate's columns (`-c`): `<id>\t(<author>\t<date>\t<line>)<text>`, no boundary
|
|
79
|
+
* marks and no colors
|
|
80
|
+
*/
|
|
81
|
+
annotate?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* The date mode (`--date`, a `DateMode` or as written; default the result's `blame.date`,
|
|
84
|
+
* else `iso`)
|
|
85
|
+
*/
|
|
86
|
+
date?: DateMode | string;
|
|
87
|
+
/** What relative and human dates and `color.blame.highlightRecent` are relative to */
|
|
88
|
+
dateContext?: ShowDateContext;
|
|
89
|
+
/**
|
|
90
|
+
* Color the metadata of a line repeating the previous line's commit (`--color-lines`).
|
|
91
|
+
* With neither this nor `colorByAge`, the result's `blame.coloring` applies.
|
|
92
|
+
*/
|
|
93
|
+
colorLines?: boolean;
|
|
94
|
+
/** Color the metadata by the author's date (`--color-by-age`) */
|
|
95
|
+
colorByAge?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* `--color-lines` repeats only within an entry, not across adjacent entries of one commit
|
|
98
|
+
* (git before 2.54, whose `--ignore-rev` left such entries; default false)
|
|
99
|
+
*/
|
|
100
|
+
colorLinesWithinEntries?: boolean;
|
|
101
|
+
/** `color.blame.repeatedLines`'s escape sequence (default the result's, else cyan) */
|
|
102
|
+
repeatedLinesColor?: string;
|
|
103
|
+
/**
|
|
104
|
+
* `color.blame.highlightRecent`: `<color>,<date>,<color>,...` (default the result's, else
|
|
105
|
+
* `blue,12 month ago,white,1 month ago,red`)
|
|
106
|
+
*/
|
|
107
|
+
highlightRecent?: string;
|
|
57
108
|
}
|
|
58
109
|
|
|
110
|
+
/** An error git dies with on a bad `color.blame.highlightRecent` */
|
|
111
|
+
export class BlameColorError extends Error {}
|
|
112
|
+
|
|
113
|
+
const GIT_COLOR_RESET = "\x1b[m";
|
|
114
|
+
const GIT_COLOR_CYAN = "\x1b[36m";
|
|
115
|
+
const DEFAULT_HIGHLIGHT_RECENT = "blue,12 month ago,white,1 month ago,red";
|
|
116
|
+
|
|
59
117
|
/** The commit's subject as `find_commit_subject` finds it: its first non-blank line */
|
|
60
118
|
function subjectOf(message: string, id: string): string {
|
|
61
119
|
const lines = message.split("\n");
|
|
@@ -79,23 +137,6 @@ function fileLines(content: Uint8Array): Uint8Array[] {
|
|
|
79
137
|
return out;
|
|
80
138
|
}
|
|
81
139
|
|
|
82
|
-
function tzValue(tz: string): number {
|
|
83
|
-
const n = Number.parseInt(tz, 10);
|
|
84
|
-
return Number.isNaN(n) ? 0 : n;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/** `show_date` with `DATE_ISO8601`: "2005-04-07 15:13:13 -0700" in the given zone */
|
|
88
|
-
function isoDate(time: number, tz: string): string {
|
|
89
|
-
const t = tzValue(tz);
|
|
90
|
-
const minutes = Math.sign(t) * (Math.floor(Math.abs(t) / 100) * 60 + (Math.abs(t) % 100));
|
|
91
|
-
const d = new Date((time + minutes * 60) * 1000);
|
|
92
|
-
const p = (n: number, w = 2) => String(n).padStart(w, "0");
|
|
93
|
-
const zone = `${t < 0 ? "-" : "+"}${p(Math.abs(t), 4)}`;
|
|
94
|
-
return `${p(d.getUTCFullYear(), 4)}-${p(d.getUTCMonth() + 1)}-${p(d.getUTCDate())} ${p(
|
|
95
|
-
d.getUTCHours(),
|
|
96
|
-
)}:${p(d.getUTCMinutes())}:${p(d.getUTCSeconds())} ${zone}`;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
140
|
/** Commits blamed for more than one path (git's `MORE_THAN_ONE_PATH`) */
|
|
100
141
|
function multiPathCommits(entries: BlameEntry[]): Set<string> {
|
|
101
142
|
const paths = new Map<string, Set<string>>();
|
|
@@ -119,6 +160,15 @@ export function formatBlamePorcelain(
|
|
|
119
160
|
): Uint8Array {
|
|
120
161
|
const quote = options.quotePath ?? true;
|
|
121
162
|
const repeat = options.linePorcelain ?? false;
|
|
163
|
+
const lineMarks = options.lineMarks ?? true;
|
|
164
|
+
const markIgnored = lineMarks && (options.markIgnoredLines ?? result.markIgnoredLines ?? false);
|
|
165
|
+
const markUnblamable =
|
|
166
|
+
lineMarks && (options.markUnblamableLines ?? result.markUnblamableLines ?? false);
|
|
167
|
+
// emit_porcelain_per_line_details
|
|
168
|
+
const perLine = (e: BlameEntry) => {
|
|
169
|
+
if (markUnblamable && e.unblamable) sink.text("unblamable\n");
|
|
170
|
+
if (markIgnored && e.ignored) sink.text("ignored\n");
|
|
171
|
+
};
|
|
122
172
|
const lines = fileLines(result.content ?? new Uint8Array(0));
|
|
123
173
|
const multi = multiPathCommits(result.entries);
|
|
124
174
|
const shown = new Set<string>();
|
|
@@ -145,11 +195,13 @@ export function formatBlamePorcelain(
|
|
|
145
195
|
for (const e of result.entries) {
|
|
146
196
|
sink.text(`${e.commitId} ${e.sourceStart} ${e.resultStart} ${e.lineCount}\n`);
|
|
147
197
|
details(e, repeat);
|
|
198
|
+
perLine(e);
|
|
148
199
|
let last: Uint8Array | undefined;
|
|
149
200
|
for (let cnt = 0; cnt < e.lineCount; cnt++) {
|
|
150
201
|
if (cnt) {
|
|
151
202
|
sink.text(`${e.commitId} ${e.sourceStart + cnt} ${e.resultStart + cnt}\n`);
|
|
152
203
|
if (repeat) details(e, true);
|
|
204
|
+
perLine(e);
|
|
153
205
|
}
|
|
154
206
|
last = lines[e.resultStart - 1 + cnt] ?? new Uint8Array(0);
|
|
155
207
|
sink.text("\t");
|
|
@@ -160,10 +212,70 @@ export function formatBlamePorcelain(
|
|
|
160
212
|
return sink.bytes();
|
|
161
213
|
}
|
|
162
214
|
|
|
163
|
-
/**
|
|
215
|
+
/**
|
|
216
|
+
* builtin/blame.c's `parse_color_fields`: the colors and the dates they end at (the last
|
|
217
|
+
* one never ends)
|
|
218
|
+
*/
|
|
219
|
+
function parseColorFields(spec: string, now?: number): Array<{ hop: number; color: string }> {
|
|
220
|
+
const fields: Array<{ hop: number; color: string }> = [];
|
|
221
|
+
let color: string | undefined;
|
|
222
|
+
for (const item of spec.split(",")) {
|
|
223
|
+
if (color === undefined) {
|
|
224
|
+
const parsed = parseGitColor(item);
|
|
225
|
+
if (parsed === undefined) throw new BlameColorError(`fatal: expecting a color: ${item}`);
|
|
226
|
+
color = parsed;
|
|
227
|
+
} else {
|
|
228
|
+
fields.push({ hop: approxidateCareful(item, now).timestamp, color });
|
|
229
|
+
color = undefined;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
if (color === undefined) throw new BlameColorError("fatal: must end with a color");
|
|
233
|
+
fields.push({ hop: Number.POSITIVE_INFINITY, color });
|
|
234
|
+
return fields;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/** The width git pads dates to (`blame_date_width`) */
|
|
238
|
+
function dateWidth(mode: DateMode): number {
|
|
239
|
+
switch (mode.type) {
|
|
240
|
+
case "rfc2822":
|
|
241
|
+
return "Thu, 19 Oct 2006 16:00:04 -0700".length;
|
|
242
|
+
case "iso8601-strict":
|
|
243
|
+
return "2006-10-19T16:00:04-07:00".length;
|
|
244
|
+
case "iso8601":
|
|
245
|
+
return "2006-10-19 16:00:04 -0700".length;
|
|
246
|
+
case "raw":
|
|
247
|
+
return "1161298804 -0700".length;
|
|
248
|
+
case "unix":
|
|
249
|
+
return "1161298804".length;
|
|
250
|
+
case "short":
|
|
251
|
+
return "2006-10-19".length;
|
|
252
|
+
case "relative":
|
|
253
|
+
return "4 years, 11 months ago".length;
|
|
254
|
+
case "human":
|
|
255
|
+
return "Thu Oct 19 16:00".length;
|
|
256
|
+
case "normal":
|
|
257
|
+
return "Thu Oct 19 16:00:04 2006 -0700".length;
|
|
258
|
+
case "strftime":
|
|
259
|
+
return new TextEncoder().encode(showDate(0, "+0000", mode)).length;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/** printf's `%*s`: right-aligned in `width` bytes */
|
|
264
|
+
function padBytes(text: string, width: number): string {
|
|
265
|
+
const n = new TextEncoder().encode(text).length;
|
|
266
|
+
return n >= width ? text : " ".repeat(width - n) + text;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* git's default `blame` output (and `blame -c`, git annotate's columns, with `annotate`)
|
|
271
|
+
*
|
|
272
|
+
* @throws BlameColorError for a `highlightRecent` git cannot parse
|
|
273
|
+
*/
|
|
164
274
|
export function formatBlame(result: BlameResult, options: BlameFormatOptions = {}): Uint8Array {
|
|
165
275
|
const lines = fileLines(result.content ?? new Uint8Array(0));
|
|
166
276
|
const entries = result.entries;
|
|
277
|
+
const config = result.output ?? {};
|
|
278
|
+
const annotate = options.annotate ?? false;
|
|
167
279
|
let showName = options.showName ?? false;
|
|
168
280
|
let longestFile = 0;
|
|
169
281
|
let longestAuthor = 0;
|
|
@@ -171,10 +283,19 @@ export function formatBlame(result: BlameResult, options: BlameFormatOptions = {
|
|
|
171
283
|
let longestDst = 0;
|
|
172
284
|
let maxMarks = 0;
|
|
173
285
|
const seen = new Set<string>();
|
|
286
|
+
const showEmail = options.showEmail ?? config.showEmail ?? false;
|
|
287
|
+
const blankBoundary = options.blankBoundary ?? config.blankBoundary ?? false;
|
|
174
288
|
const authorOf = (e: BlameEntry) =>
|
|
175
|
-
|
|
289
|
+
showEmail ? `<${e.commit.author.email}>` : e.commit.author.name;
|
|
290
|
+
const markIgnored = options.markIgnoredLines ?? result.markIgnoredLines ?? false;
|
|
291
|
+
const markUnblamable = options.markUnblamableLines ?? result.markUnblamableLines ?? false;
|
|
292
|
+
/** print_marks: `^` for a boundary (not with -b or -c), `*` unblamable, `?` ignored */
|
|
293
|
+
const marksOf = (e: BlameEntry) =>
|
|
294
|
+
(e.boundary && !blankBoundary && !annotate ? "^" : "") +
|
|
295
|
+
(markUnblamable && e.unblamable ? "*" : "") +
|
|
296
|
+
(markIgnored && e.ignored ? "?" : "");
|
|
176
297
|
for (const e of entries) {
|
|
177
|
-
const marks = e.
|
|
298
|
+
const marks = marksOf(e).length;
|
|
178
299
|
if (maxMarks < marks) maxMarks = marks;
|
|
179
300
|
if (e.sourcePath !== result.path) showName = true;
|
|
180
301
|
const len = encodeGitPath(e.sourcePath).length;
|
|
@@ -199,41 +320,145 @@ export function formatBlame(result: BlameResult, options: BlameFormatOptions = {
|
|
|
199
320
|
abbrev += 1;
|
|
200
321
|
}
|
|
201
322
|
|
|
323
|
+
const dateOption = options.date ?? config.date ?? "iso";
|
|
324
|
+
const mode = typeof dateOption === "string" ? parseDateMode(dateOption) : dateOption;
|
|
325
|
+
const width = dateWidth(mode);
|
|
326
|
+
const context = options.dateContext ?? {};
|
|
327
|
+
const formatTime = (c: BlameEntry["commit"]) => {
|
|
328
|
+
if (options.rawTimestamp) return `${c.author.timestamp} ${c.author.tzOffset}`;
|
|
329
|
+
const text = showDate(c.author.timestamp, c.author.tzOffset, mode, context);
|
|
330
|
+
const w = displayWidth(text);
|
|
331
|
+
return w < width ? text + " ".repeat(width - w) : text;
|
|
332
|
+
};
|
|
333
|
+
|
|
334
|
+
// colors: the command line's, else blame.coloring; never with -c
|
|
335
|
+
let colorLines = options.colorLines ?? false;
|
|
336
|
+
let colorByAge = options.colorByAge ?? false;
|
|
337
|
+
if (!colorLines && !colorByAge) {
|
|
338
|
+
colorLines = config.colorLines ?? false;
|
|
339
|
+
colorByAge = config.colorByAge ?? false;
|
|
340
|
+
}
|
|
341
|
+
if (annotate) colorLines = colorByAge = false;
|
|
342
|
+
const repeatedColor =
|
|
343
|
+
(options.repeatedLinesColor ?? config.repeatedLinesColor ?? "") || GIT_COLOR_CYAN;
|
|
344
|
+
const colorFields = parseColorFields(
|
|
345
|
+
options.highlightRecent ?? config.highlightRecent ?? DEFAULT_HIGHLIGHT_RECENT,
|
|
346
|
+
context.now,
|
|
347
|
+
);
|
|
348
|
+
|
|
202
349
|
const sink = new ByteSink();
|
|
350
|
+
let prev: BlameEntry | undefined;
|
|
203
351
|
for (const e of entries) {
|
|
204
352
|
const c = e.commit;
|
|
353
|
+
let defaultColor: string | undefined;
|
|
354
|
+
let color: string | undefined;
|
|
355
|
+
let reset: string | undefined;
|
|
356
|
+
if (colorByAge) {
|
|
357
|
+
// determine_line_heat
|
|
358
|
+
let i = 0;
|
|
359
|
+
while (i < colorFields.length - 1 && c.author.timestamp > colorFields[i].hop) i++;
|
|
360
|
+
defaultColor = colorFields[i].color;
|
|
361
|
+
color = defaultColor;
|
|
362
|
+
reset = GIT_COLOR_RESET;
|
|
363
|
+
}
|
|
205
364
|
let last: Uint8Array | undefined;
|
|
206
365
|
for (let cnt = 0; cnt < e.lineCount; cnt++) {
|
|
366
|
+
if (colorLines) {
|
|
367
|
+
if (cnt > 0 || (!options.colorLinesWithinEntries && prev && prev.commitId === e.commitId)) {
|
|
368
|
+
color = repeatedColor;
|
|
369
|
+
reset = GIT_COLOR_RESET;
|
|
370
|
+
} else {
|
|
371
|
+
color = defaultColor;
|
|
372
|
+
reset = defaultColor ? GIT_COLOR_RESET : undefined;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
207
375
|
let length = options.longObjectName ? 40 : abbrev;
|
|
208
376
|
let hex = e.commitId;
|
|
209
|
-
if (e.boundary &&
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
377
|
+
if (e.boundary && blankBoundary) hex = " ".repeat(hex.length);
|
|
378
|
+
const marks = marksOf(e);
|
|
379
|
+
let line = (color ?? "") + marks;
|
|
380
|
+
length -= marks.length;
|
|
381
|
+
line += hex.slice(0, Math.max(0, Math.min(length, 40)));
|
|
382
|
+
if (annotate) {
|
|
383
|
+
line += `\t(${padBytes(authorOf(e), 10)}\t${padBytes(formatTime(c), 10)}\t${
|
|
384
|
+
e.resultStart + cnt
|
|
385
|
+
})`;
|
|
386
|
+
} else {
|
|
387
|
+
if (showName) {
|
|
388
|
+
const pad = Math.max(0, longestFile - encodeGitPath(e.sourcePath).length);
|
|
389
|
+
line += ` ${e.sourcePath}${" ".repeat(pad)}`;
|
|
390
|
+
}
|
|
391
|
+
if (options.showNumber) {
|
|
392
|
+
line += ` ${String(e.sourceStart + cnt).padStart(maxOrigDigits)}`;
|
|
393
|
+
}
|
|
394
|
+
if (!options.noAuthor) {
|
|
395
|
+
const name = authorOf(e);
|
|
396
|
+
const pad = Math.max(0, longestAuthor - displayWidth(name));
|
|
397
|
+
line += ` (${name}${" ".repeat(pad)} ${padBytes(formatTime(c), 10)}`;
|
|
398
|
+
}
|
|
399
|
+
line += ` ${String(e.resultStart + cnt).padStart(maxDigits)}) `;
|
|
222
400
|
}
|
|
223
|
-
if (
|
|
224
|
-
const name = authorOf(e);
|
|
225
|
-
const pad = Math.max(0, longestAuthor - displayWidth(name));
|
|
226
|
-
const time = options.rawTimestamp
|
|
227
|
-
? `${c.author.timestamp} ${c.author.tzOffset}`
|
|
228
|
-
: isoDate(c.author.timestamp, c.author.tzOffset);
|
|
229
|
-
line += ` (${name}${" ".repeat(pad)} ${time.padStart(10)}`;
|
|
230
|
-
}
|
|
231
|
-
line += ` ${String(e.resultStart + cnt).padStart(maxDigits)}) `;
|
|
401
|
+
if (reset) line += reset;
|
|
232
402
|
sink.text(line);
|
|
233
403
|
last = lines[e.resultStart - 1 + cnt] ?? new Uint8Array(0);
|
|
234
404
|
sink.push(last);
|
|
235
405
|
}
|
|
236
406
|
if (last && last.length > 0 && last[last.length - 1] !== 0x0a) sink.text("\n");
|
|
407
|
+
prev = e;
|
|
408
|
+
}
|
|
409
|
+
return sink.bytes();
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
/** Options of {@link formatAnnotate} */
|
|
413
|
+
export type AnnotateFormatOptions = Omit<
|
|
414
|
+
BlameFormatOptions,
|
|
415
|
+
"annotate" | "date" | "colorLines" | "colorByAge" | "showName" | "showNumber" | "noAuthor"
|
|
416
|
+
>;
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* `git annotate`: blame's `-c` columns with ISO dates whatever `--date` says (only the
|
|
420
|
+
* `-local` of `blame.date` is kept, as git keeps it)
|
|
421
|
+
*/
|
|
422
|
+
export function formatAnnotate(
|
|
423
|
+
result: BlameResult,
|
|
424
|
+
options: AnnotateFormatOptions = {},
|
|
425
|
+
): Uint8Array {
|
|
426
|
+
const configured = result.output?.date;
|
|
427
|
+
let local = false;
|
|
428
|
+
if (configured !== undefined) {
|
|
429
|
+
try {
|
|
430
|
+
local = parseDateMode(configured).local;
|
|
431
|
+
} catch {
|
|
432
|
+
local = false;
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
return formatBlame(result, { ...options, annotate: true, date: { type: "iso8601", local } });
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/** `git blame --incremental`: each entry as blame found it, with its commit's details once */
|
|
439
|
+
export function formatBlameIncremental(
|
|
440
|
+
result: BlameResult,
|
|
441
|
+
options: Pick<BlamePorcelainOptions, "quotePath"> = {},
|
|
442
|
+
): Uint8Array {
|
|
443
|
+
const quote = options.quotePath ?? true;
|
|
444
|
+
const shown = new Set<string>();
|
|
445
|
+
const sink = new ByteSink();
|
|
446
|
+
for (const e of result.incremental ?? []) {
|
|
447
|
+
sink.text(`${e.commitId} ${e.sourceStart} ${e.resultStart} ${e.lineCount}\n`);
|
|
448
|
+
if (!shown.has(e.commitId)) {
|
|
449
|
+
shown.add(e.commitId);
|
|
450
|
+
const c = e.commit;
|
|
451
|
+
sink.text(
|
|
452
|
+
`author ${c.author.name}\nauthor-mail <${c.author.email}>\nauthor-time ${c.author.timestamp}\nauthor-tz ${c.author.tzOffset}\n` +
|
|
453
|
+
`committer ${c.committer.name}\ncommitter-mail <${c.committer.email}>\ncommitter-time ${c.committer.timestamp}\ncommitter-tz ${c.committer.tzOffset}\n` +
|
|
454
|
+
`summary ${subjectOf(c.message, e.commitId)}\n`,
|
|
455
|
+
);
|
|
456
|
+
if (e.boundary) sink.text("boundary\n");
|
|
457
|
+
}
|
|
458
|
+
if (e.previous) {
|
|
459
|
+
sink.text(`previous ${e.previous.commitId} ${quotePath(e.previous.path, quote)}\n`);
|
|
460
|
+
}
|
|
461
|
+
sink.text(`filename ${quotePath(e.sourcePath, quote)}\n`);
|
|
237
462
|
}
|
|
238
463
|
return sink.bytes();
|
|
239
464
|
}
|
|
@@ -42,4 +42,10 @@ export interface CherryPickResult {
|
|
|
42
42
|
* despite sparse patterns:" block. Absent when there was nothing to say.
|
|
43
43
|
*/
|
|
44
44
|
readonly warnings?: string[];
|
|
45
|
+
/**
|
|
46
|
+
* What rerere printed on stderr: at a stopped pick (`Recorded preimage for 'f'`, `Resolved
|
|
47
|
+
* 'f' using previous resolution.`), after a `--continue`'s commit (`Recorded resolution
|
|
48
|
+
* for 'f'.`); absent when it said nothing.
|
|
49
|
+
*/
|
|
50
|
+
readonly rerereOutput?: string[];
|
|
45
51
|
}
|
|
@@ -36,6 +36,12 @@ export interface CloneResult {
|
|
|
36
36
|
*/
|
|
37
37
|
hookExitCode?: number;
|
|
38
38
|
|
|
39
|
+
/**
|
|
40
|
+
* `--recurse-submodules`: what the submodules' `git submodule update` printed (stdout,
|
|
41
|
+
* stderr) and its exit status, which git's clone exits with (the clone itself stands)
|
|
42
|
+
*/
|
|
43
|
+
submodules?: { stdout: string; stderr: string; exitCode: number };
|
|
44
|
+
|
|
39
45
|
/**
|
|
40
46
|
* What git prints on stderr besides progress: `--reference-if-able`'s "info: Could not add
|
|
41
47
|
* alternate for '<path>': <reason>" lines, each with its newline
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `--dirstat` (diff.c's `show_dirstat`, `show_dirstat_by_line`, `gather_dirstat`): how much
|
|
3
|
+
* of the change each directory holds, as a percentage of the whole.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```typescript
|
|
7
|
+
* formatDirstat([{ name: "a/x", changed: 3 }, { name: "b/y", changed: 1 }], DEFAULT_DIRSTAT);
|
|
8
|
+
* // " 75.0% a/\n 25.0% b/\n"
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { compareGitPaths } from "@statewalker/vcs-utils/encoding";
|
|
13
|
+
|
|
14
|
+
/** The dirstat's parameters (`diff_options`' dirstat flags and `dirstat_permille`) */
|
|
15
|
+
export interface DirstatParams {
|
|
16
|
+
/** `lines`: damage from the diffstat's line counts */
|
|
17
|
+
byLine: boolean;
|
|
18
|
+
/** `files`: each changed file counts one */
|
|
19
|
+
byFile: boolean;
|
|
20
|
+
/** `cumulative`: a directory's count includes its subdirectories' */
|
|
21
|
+
cumulative: boolean;
|
|
22
|
+
/** The cut-off, in tenths of a percent (default 30: 3%) */
|
|
23
|
+
permille: number;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** git's defaults: `changes,noncumulative,3` */
|
|
27
|
+
export const DEFAULT_DIRSTAT: DirstatParams = {
|
|
28
|
+
byLine: false,
|
|
29
|
+
byFile: false,
|
|
30
|
+
cumulative: false,
|
|
31
|
+
permille: 30,
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const isDigit = (c: string | undefined) => c !== undefined && c >= "0" && c <= "9";
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* diff.c's `parse_dirstat_params`: the comma-separated parameters applied over `params`;
|
|
38
|
+
* returns git's error lines (` Unknown dirstat parameter '<p>'`), the valid ones applied.
|
|
39
|
+
*/
|
|
40
|
+
export function parseDirstatParams(text: string, params: DirstatParams): string[] {
|
|
41
|
+
const errors: string[] = [];
|
|
42
|
+
if (text === "") return errors;
|
|
43
|
+
for (const p of text.split(",")) {
|
|
44
|
+
if (p === "changes") {
|
|
45
|
+
params.byLine = false;
|
|
46
|
+
params.byFile = false;
|
|
47
|
+
} else if (p === "lines") {
|
|
48
|
+
params.byLine = true;
|
|
49
|
+
params.byFile = false;
|
|
50
|
+
} else if (p === "files") {
|
|
51
|
+
params.byLine = false;
|
|
52
|
+
params.byFile = true;
|
|
53
|
+
} else if (p === "noncumulative") params.cumulative = false;
|
|
54
|
+
else if (p === "cumulative") params.cumulative = true;
|
|
55
|
+
else if (isDigit(p[0])) {
|
|
56
|
+
let at = 0;
|
|
57
|
+
while (isDigit(p[at])) at++;
|
|
58
|
+
let permille = Number(p.slice(0, at)) * 10;
|
|
59
|
+
if (p[at] === "." && isDigit(p[at + 1])) {
|
|
60
|
+
// only the first digit counts, the others are ignored
|
|
61
|
+
permille += p.charCodeAt(at + 1) - 48;
|
|
62
|
+
at += 2;
|
|
63
|
+
while (isDigit(p[at])) at++;
|
|
64
|
+
}
|
|
65
|
+
if (at === p.length) params.permille = permille;
|
|
66
|
+
else errors.push(` Failed to parse dirstat cut-off percentage '${p}'`);
|
|
67
|
+
} else errors.push(` Unknown dirstat parameter '${p}'`);
|
|
68
|
+
}
|
|
69
|
+
return errors;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** One file's damage (`struct dirstat_file`) */
|
|
73
|
+
export interface DirstatFile {
|
|
74
|
+
name: string;
|
|
75
|
+
changed: number;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/** `conclude_dirstat` / `gather_dirstat`: the directories at or above the cut-off */
|
|
79
|
+
export function formatDirstat(files: readonly DirstatFile[], params: DirstatParams): string {
|
|
80
|
+
let total = 0;
|
|
81
|
+
for (const f of files) total += f.changed;
|
|
82
|
+
// everything renamed: nothing changed
|
|
83
|
+
if (!total) return "";
|
|
84
|
+
const sorted = [...files].sort((a, b) => compareGitPaths(a.name, b.name));
|
|
85
|
+
let at = 0;
|
|
86
|
+
let out = "";
|
|
87
|
+
const gather = (base: string): number => {
|
|
88
|
+
let sum = 0;
|
|
89
|
+
let sources = 0;
|
|
90
|
+
while (at < sorted.length) {
|
|
91
|
+
const f = sorted[at] as DirstatFile;
|
|
92
|
+
if (!f.name.startsWith(base)) break;
|
|
93
|
+
const slash = f.name.indexOf("/", base.length);
|
|
94
|
+
let changes: number;
|
|
95
|
+
if (slash >= 0) {
|
|
96
|
+
changes = gather(f.name.slice(0, slash + 1));
|
|
97
|
+
sources++;
|
|
98
|
+
} else {
|
|
99
|
+
changes = f.changed;
|
|
100
|
+
at++;
|
|
101
|
+
sources += 2;
|
|
102
|
+
}
|
|
103
|
+
sum += changes;
|
|
104
|
+
}
|
|
105
|
+
// no line for the top level, or a directory whose changes all come from one subdirectory
|
|
106
|
+
if (base && sources !== 1 && sum) {
|
|
107
|
+
const permille = Math.trunc((sum * 1000) / total);
|
|
108
|
+
if (permille >= params.permille) {
|
|
109
|
+
out += `${String(Math.trunc(permille / 10)).padStart(4)}.${permille % 10}% ${base}\n`;
|
|
110
|
+
if (!params.cumulative) return 0;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return sum;
|
|
114
|
+
};
|
|
115
|
+
gather("");
|
|
116
|
+
return out;
|
|
117
|
+
}
|
|
@@ -101,6 +101,30 @@ export interface DiffEntry {
|
|
|
101
101
|
* when that commit is the old side's, and no rename pairs with it.
|
|
102
102
|
*/
|
|
103
103
|
newIdUnknown?: boolean;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* The raw output (`--raw`) shows the null id for the old side: a worktree file the
|
|
107
|
+
* plumbing diffs do not hash (git's `oid_valid` unset), on the old side of a `-R` diff
|
|
108
|
+
*/
|
|
109
|
+
oldIdNull?: boolean;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* The raw output shows the null id for the new side: a worktree file whose stat differs
|
|
113
|
+
* from its entry (`diff-files`, `diff-index`), which git does not hash
|
|
114
|
+
*/
|
|
115
|
+
newIdNull?: boolean;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* `git log -L`: the line ranges of the new side the patch is cut to (0-based, end
|
|
119
|
+
* exclusive, sorted and apart; line-log.c's `line_ranges` of the pair)
|
|
120
|
+
*/
|
|
121
|
+
lineRanges?: readonly LineRange[];
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/** Lines `[start, end)` of a file, 0-based (line-log.c's `struct range`) */
|
|
125
|
+
export interface LineRange {
|
|
126
|
+
start: number;
|
|
127
|
+
end: number;
|
|
104
128
|
}
|
|
105
129
|
|
|
106
130
|
/**
|
|
@@ -128,14 +128,18 @@ export function diffEntryToPair(entry: DiffEntry, blobs: Blobs): DiffFilePair {
|
|
|
128
128
|
entry.newDirtySubmodule === true && entry.newIdUnknown !== true,
|
|
129
129
|
);
|
|
130
130
|
if (newSide && entry.newSubmoduleDirt) newSide.submoduleDirt = entry.newSubmoduleDirt;
|
|
131
|
+
if (newSide && (entry.newIdNull || entry.newIdUnknown)) newSide.rawNullId = true;
|
|
132
|
+
const oldSide =
|
|
133
|
+
status === "A"
|
|
134
|
+
? undefined
|
|
135
|
+
: side(entry.oldPath ?? entry.newPath, entry.oldMode, entry.oldId, entry.readOld);
|
|
136
|
+
if (oldSide && entry.oldIdNull) oldSide.rawNullId = true;
|
|
131
137
|
return {
|
|
132
138
|
status,
|
|
133
|
-
old:
|
|
134
|
-
status === "A"
|
|
135
|
-
? undefined
|
|
136
|
-
: side(entry.oldPath ?? entry.newPath, entry.oldMode, entry.oldId, entry.readOld),
|
|
139
|
+
old: oldSide,
|
|
137
140
|
new: newSide,
|
|
138
141
|
...(entry.score !== undefined ? { score: entry.score } : {}),
|
|
142
|
+
...(entry.lineRanges ? { lineRanges: entry.lineRanges } : {}),
|
|
139
143
|
};
|
|
140
144
|
}
|
|
141
145
|
|