@statewalker/vcs-commands 0.9.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.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 +41 -2
- package/dist/commands/am/am-command.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 +43 -1
- package/dist/commands/blame-command.d.ts.map +1 -1
- 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-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.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/cherry-pick-command.d.ts +10 -0
- package/dist/commands/cherry-pick-command.d.ts.map +1 -1
- package/dist/commands/clone-command.d.ts +19 -0
- package/dist/commands/clone-command.d.ts.map +1 -1
- package/dist/commands/commit-command.d.ts +9 -1
- 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/diff-command.d.ts +132 -5
- 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 +65 -0
- package/dist/commands/fetch-command.d.ts.map +1 -1
- package/dist/commands/fetch-multiple-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-hooks.d.ts +32 -0
- 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 +44 -1
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +6 -5
- 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/local-transport.d.ts.map +1 -1
- package/dist/commands/log-command.d.ts +26 -0
- package/dist/commands/log-command.d.ts.map +1 -1
- package/dist/commands/log-output.d.ts +22 -1
- 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/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 +7 -0
- 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 +67 -5
- package/dist/commands/merge-drivers.d.ts.map +1 -1
- package/dist/commands/merge-support.d.ts +6 -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/mktag-command.d.ts +51 -0
- package/dist/commands/mktag-command.d.ts.map +1 -0
- 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/ort-merge.d.ts +24 -0
- package/dist/commands/ort-merge.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 +24 -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.map +1 -1
- package/dist/commands/push-command.d.ts +17 -2
- package/dist/commands/push-command.d.ts.map +1 -1
- package/dist/commands/rebase-command.d.ts +108 -2
- 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/remote-object-info-command.d.ts +55 -0
- package/dist/commands/remote-object-info-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/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 +3 -0
- 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 +10 -0
- package/dist/commands/revert-command.d.ts.map +1 -1
- package/dist/commands/revision-range.d.ts +5 -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 +18 -0
- package/dist/commands/sequencer-pick.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/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 +2 -1
- 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 +9 -1
- package/dist/commands/submodule-commands.d.ts.map +1 -1
- package/dist/commands/submodule-update-command.d.ts +13 -1
- package/dist/commands/submodule-update-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-CNvli5bl.js → commands-Mlo1dxQN.js} +52078 -44471
- package/dist/errors/command-errors.d.ts +33 -0
- package/dist/errors/command-errors.d.ts.map +1 -1
- package/dist/errors/index.js +39 -1
- package/dist/{fsck-CPeDh9fh.js → fsck-CrhVMNIH.js} +184 -143
- package/dist/git-command.d.ts +58 -2
- package/dist/git-command.d.ts.map +1 -1
- package/dist/git.d.ts +532 -1
- package/dist/git.d.ts.map +1 -1
- package/dist/guarded-transport-command.d.ts +3 -1
- package/dist/guarded-transport-command.d.ts.map +1 -1
- package/dist/index.js +7 -6
- package/dist/maintenance-run-command-Bw21HEkH.js +13539 -0
- package/dist/{remote-transport-CCmBadm-.js → remote-transport-Bu4PGSMD.js} +1009 -10
- package/dist/results/cherry-pick-result.d.ts +6 -0
- package/dist/results/cherry-pick-result.d.ts.map +1 -1
- 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 +49 -3
- package/dist/results/diff-output.d.ts.map +1 -1
- package/dist/results/fetch-result.d.ts +12 -0
- package/dist/results/fetch-result.d.ts.map +1 -1
- package/dist/results/index.js +2 -2
- package/dist/results/merge-result.d.ts +5 -0
- package/dist/results/merge-result.d.ts.map +1 -1
- package/dist/results/push-result.d.ts +5 -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-BDuEgdLU.js → results-ERo9vELd.js} +28511 -25685
- package/dist/transport-command.d.ts +79 -1
- package/dist/transport-command.d.ts.map +1 -1
- package/package.json +12 -12
- package/src/commands/add-command.ts +3 -0
- package/src/commands/add-patch/patch-backend.ts +4 -1
- 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 +163 -8
- package/src/commands/apply/index.ts +1 -0
- 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 +118 -19
- 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-ref-format-command.ts +129 -0
- package/src/commands/checkout-command.ts +39 -21
- package/src/commands/checkout-index-command.ts +568 -0
- package/src/commands/checkout-paths.ts +7 -0
- package/src/commands/cherry-pick-command.ts +21 -1
- package/src/commands/clone-command.ts +208 -7
- package/src/commands/commit-command.ts +22 -4
- 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/diff-command.ts +573 -46
- 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 +312 -8
- package/src/commands/fetch-multiple-command.ts +4 -1
- 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-hooks.ts +123 -6
- 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 +45 -0
- package/src/commands/init-command.ts +14 -0
- 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/local-transport.ts +252 -4
- package/src/commands/log-command.ts +104 -5
- package/src/commands/log-output.ts +55 -5
- 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/maintenance-run-command.ts +949 -0
- package/src/commands/merge-command.ts +78 -32
- package/src/commands/merge-config.ts +23 -1
- package/src/commands/merge-drivers.ts +109 -20
- package/src/commands/merge-support.ts +29 -5
- package/src/commands/merge-tree-command.ts +786 -0
- package/src/commands/mktag-command.ts +149 -0
- 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/ort-merge.ts +92 -25
- package/src/commands/patch-id-command.ts +65 -0
- package/src/commands/patch-id.ts +218 -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 +2 -0
- package/src/commands/push-command.ts +87 -5
- package/src/commands/rebase-command.ts +507 -19
- package/src/commands/refs-command.ts +274 -0
- package/src/commands/remote-object-info-command.ts +109 -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/rev-filter/commit-grep.ts +7 -2
- package/src/commands/rev-list-command.ts +9 -0
- package/src/commands/rev-parse-command.ts +62 -4
- package/src/commands/revert-command.ts +21 -1
- package/src/commands/revision-range.ts +7 -2
- package/src/commands/revision-resolver.ts +44 -3
- package/src/commands/sequencer-pick.ts +47 -0
- package/src/commands/serve-repository.ts +65 -0
- package/src/commands/session-id.ts +31 -0
- package/src/commands/show-branch-command.ts +981 -0
- package/src/commands/show-command.ts +1 -1
- 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 +43 -6
- 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 +12 -2
- package/src/commands/submodule-update-command.ts +29 -0
- package/src/commands/textconv-cache.ts +143 -0
- package/src/commands/tree-restore.ts +14 -0
- 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/errors/command-errors.ts +45 -0
- package/src/git-command.ts +131 -1
- package/src/git.ts +808 -1
- package/src/guarded-transport-command.ts +6 -1
- package/src/results/cherry-pick-result.ts +6 -0
- package/src/results/diff-entry.ts +12 -0
- package/src/results/diff-formatter.ts +7 -4
- package/src/results/diff-output.ts +117 -11
- package/src/results/diff-pickaxe.ts +1 -1
- package/src/results/fetch-result.ts +12 -0
- package/src/results/merge-result.ts +5 -0
- package/src/results/push-result.ts +5 -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/transport-command.ts +182 -1
|
@@ -137,4 +137,37 @@ export declare class DescribeError extends GitApiError {
|
|
|
137
137
|
undescribable?: boolean;
|
|
138
138
|
});
|
|
139
139
|
}
|
|
140
|
+
/**
|
|
141
|
+
* Thrown by `mktag` when git dies (exit status 128): the input fails the strict fsck check
|
|
142
|
+
* (its `error: tag input does not pass fsck: ...` lines first), the tagged object is
|
|
143
|
+
* missing or of another type, or the tag cannot be written. The message is git's stderr.
|
|
144
|
+
*/
|
|
145
|
+
export declare class MktagFailedError extends GitApiError {
|
|
146
|
+
constructor(message: string);
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Thrown by `update-index` where git dies (exit status 128), before the index is written:
|
|
150
|
+
* a path it cannot add or remove (`Unable to process path <path>`), an entry it cannot mark,
|
|
151
|
+
* a malformed `--index-info` line. The message is git's stderr, `output` what it printed on
|
|
152
|
+
* stdout before (`--verbose`'s report).
|
|
153
|
+
*/
|
|
154
|
+
export declare class UpdateIndexFailedError extends GitApiError {
|
|
155
|
+
/** What git printed on stdout before dying */
|
|
156
|
+
readonly output: string;
|
|
157
|
+
constructor(message: string,
|
|
158
|
+
/** What git printed on stdout before dying */
|
|
159
|
+
output?: string);
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Thrown by `checkout-index` where git dies (exit status 128): options it refuses together
|
|
163
|
+
* (`--stage=all` with `--no-temp`, `--all` with paths), a badly quoted `--stdin` line, a file
|
|
164
|
+
* standing where a directory must be created without `-f`. The message is git's stderr.
|
|
165
|
+
*/
|
|
166
|
+
export declare class CheckoutIndexFailedError extends GitApiError {
|
|
167
|
+
/** What git printed on stdout before dying */
|
|
168
|
+
readonly output: string;
|
|
169
|
+
constructor(message: string,
|
|
170
|
+
/** What git printed on stdout before dying */
|
|
171
|
+
output?: string);
|
|
172
|
+
}
|
|
140
173
|
//# sourceMappingURL=command-errors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-errors.d.ts","sourceRoot":"","sources":["../../src/errors/command-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,WAAW;IACnD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAE9B,YAAY,YAAY,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAIjD;CACF;AAED;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,WAAW;IACnD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;I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C7E,MAAM,EAAE,MAAM,EACvB,QAAQ,SAAI,EAIb;CACF;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,aAAc,SAAQ,WAAW;IAC5C,gDAAgD;IAChD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAEhC,YACE,OAAO,EAAE,MAAM,EACf,MAAM,SAAK,EACX,QAAQ,CAAC,EAAE,MAAM,EACjB,OAAO,GAAE;QAAE,aAAa,CAAC,EAAE,OAAO,CAAA;KAAO,EAM1C;CACF;AAED;;;;GAIG;AACH,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,YAAY,OAAO,EAAE,MAAM,EAG1B;CACF;AAED;;;;;GAKG;AACH,qBAAa,sBAAuB,SAAQ,WAAW;IAGnD,8CAA8C;IAC9C,QAAQ,CAAC,MAAM;IAHjB,YACE,OAAO,EAAE,MAAM;IACf,8CAA8C;IACrC,MAAM,SAAK,EAIrB;CACF;AAED;;;;GAIG;AACH,qBAAa,wBAAyB,SAAQ,WAAW;IAGrD,8CAA8C;IAC9C,QAAQ,CAAC,MAAM;IAHjB,YACE,OAAO,EAAE,MAAM;IACf,8CAA8C;IACrC,MAAM,SAAK,EAIrB;CACF"}
|
package/dist/errors/index.js
CHANGED
|
@@ -401,6 +401,44 @@ var DescribeError = class extends GitApiError {
|
|
|
401
401
|
this.undescribable = options.undescribable ?? false;
|
|
402
402
|
}
|
|
403
403
|
};
|
|
404
|
+
/**
|
|
405
|
+
* Thrown by `mktag` when git dies (exit status 128): the input fails the strict fsck check
|
|
406
|
+
* (its `error: tag input does not pass fsck: ...` lines first), the tagged object is
|
|
407
|
+
* missing or of another type, or the tag cannot be written. The message is git's stderr.
|
|
408
|
+
*/
|
|
409
|
+
var MktagFailedError = class extends GitApiError {
|
|
410
|
+
constructor(message) {
|
|
411
|
+
super(message, { exitCode: 128 });
|
|
412
|
+
this.name = "MktagFailedError";
|
|
413
|
+
}
|
|
414
|
+
};
|
|
415
|
+
/**
|
|
416
|
+
* Thrown by `update-index` where git dies (exit status 128), before the index is written:
|
|
417
|
+
* a path it cannot add or remove (`Unable to process path <path>`), an entry it cannot mark,
|
|
418
|
+
* a malformed `--index-info` line. The message is git's stderr, `output` what it printed on
|
|
419
|
+
* stdout before (`--verbose`'s report).
|
|
420
|
+
*/
|
|
421
|
+
var UpdateIndexFailedError = class extends GitApiError {
|
|
422
|
+
output;
|
|
423
|
+
constructor(message, output = "") {
|
|
424
|
+
super(message, { exitCode: 128 });
|
|
425
|
+
this.output = output;
|
|
426
|
+
this.name = "UpdateIndexFailedError";
|
|
427
|
+
}
|
|
428
|
+
};
|
|
429
|
+
/**
|
|
430
|
+
* Thrown by `checkout-index` where git dies (exit status 128): options it refuses together
|
|
431
|
+
* (`--stage=all` with `--no-temp`, `--all` with paths), a badly quoted `--stdin` line, a file
|
|
432
|
+
* standing where a directory must be created without `-f`. The message is git's stderr.
|
|
433
|
+
*/
|
|
434
|
+
var CheckoutIndexFailedError = class extends GitApiError {
|
|
435
|
+
output;
|
|
436
|
+
constructor(message, output = "") {
|
|
437
|
+
super(message, { exitCode: 128 });
|
|
438
|
+
this.output = output;
|
|
439
|
+
this.name = "CheckoutIndexFailedError";
|
|
440
|
+
}
|
|
441
|
+
};
|
|
404
442
|
//#endregion
|
|
405
443
|
//#region src/errors/commit-errors.ts
|
|
406
444
|
/**
|
|
@@ -940,4 +978,4 @@ var BranchUsedByWorktreeError = class extends GitApiError {
|
|
|
940
978
|
}
|
|
941
979
|
};
|
|
942
980
|
//#endregion
|
|
943
|
-
export { AddFailedError, AuthenticationError, BranchUsedByWorktreeError, CannotDeleteCurrentBranchError, CloneCheckoutError, CloneDestinationError, CommitNotFoundError, DescribeError, DetachedHeadError, EmptyCommitError, EmptyTreeEntryNameError, FetchIntoCheckedOutBranchError, GitApiError, HookFailedError, IncompatibleOptionsError, IndexLockFailedError, InvalidArgumentError, InvalidConfigError, InvalidMainlineParentError, InvalidMergeHeadsError, InvalidPathError, InvalidRefNameError, InvalidRemoteError, InvalidStashIndexError, InvalidTagNameError, MergeConflictError, MergeFailureReason, MissingArgumentError, MultipleParentsNotAllowedError, MvFailedError, NoFilepatternError, NoHeadError, NoMergeBaseError, NoMessageError, NoRebaseInProgressError, NonFastForwardError, NotACommitError, NotADirectoryError, NotFastForwardError, NotImplementedError, NotMergedError, PathNotFoundInTreeError, PathNotInIndexError, PushRejectedException, ReadTreeFailedError, RebaseTodoMissingError, RefAlreadyExistsError, RefFilterError, RefNotFoundError, RemoteAlreadyExistsError, RemoteNotFoundError, ResetRefusedError, RevisionError, RmFailedError, StashApplyFailedError, StashNotFoundError, StoreNotAvailableError, SwitchRefusedError, TransportError, UnmergedPathsError, UpstreamRequiredError, WorktreeError, WorktreesUnsupportedError, exitCodeOfMessage };
|
|
981
|
+
export { AddFailedError, AuthenticationError, BranchUsedByWorktreeError, CannotDeleteCurrentBranchError, CheckoutIndexFailedError, CloneCheckoutError, CloneDestinationError, CommitNotFoundError, DescribeError, DetachedHeadError, EmptyCommitError, EmptyTreeEntryNameError, FetchIntoCheckedOutBranchError, GitApiError, HookFailedError, IncompatibleOptionsError, IndexLockFailedError, InvalidArgumentError, InvalidConfigError, InvalidMainlineParentError, InvalidMergeHeadsError, InvalidPathError, InvalidRefNameError, InvalidRemoteError, InvalidStashIndexError, InvalidTagNameError, MergeConflictError, MergeFailureReason, MissingArgumentError, MktagFailedError, MultipleParentsNotAllowedError, MvFailedError, NoFilepatternError, NoHeadError, NoMergeBaseError, NoMessageError, NoRebaseInProgressError, NonFastForwardError, NotACommitError, NotADirectoryError, NotFastForwardError, NotImplementedError, NotMergedError, PathNotFoundInTreeError, PathNotInIndexError, PushRejectedException, ReadTreeFailedError, RebaseTodoMissingError, RefAlreadyExistsError, RefFilterError, RefNotFoundError, RemoteAlreadyExistsError, RemoteNotFoundError, ResetRefusedError, RevisionError, RmFailedError, StashApplyFailedError, StashNotFoundError, StoreNotAvailableError, SwitchRefusedError, TransportError, UnmergedPathsError, UpdateIndexFailedError, UpstreamRequiredError, WorktreeError, WorktreesUnsupportedError, exitCodeOfMessage };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { TransportError } from "./errors/index.js";
|
|
2
|
-
import {
|
|
2
|
+
import { Fa as GitCommand, Ul as configBool, Wl as configValue, ec as hasPromisorRemote, eu as hostEnvironmentOf, fu as RemoteConfigStore } from "./results-ERo9vELd.js";
|
|
3
3
|
import { ObjectIdMismatchError, PACK_ENTRY_HEAD_MAX, PACK_MAX_CHAIN, PACK_MAX_OBJECT_SIZE, PACK_SCAN_MAX, PromisorObjectReadError, badPackIntIdAt, commitGraphCompatible, graftFileBaseDir, graftFileReader, inflateExactly, isDotGitComponent, isGitWorktreeFile, isNtfsGitWorktreeFile, isSymbolicRef, isValidRefName, loadMultiPackIndex, objectFormatOf, objectsWithoutLazyFetch, openPack, packEntryOrder, packIdxLookups, parseGraftFile, parseGraphCommit, parsePackEntryHead, readCommitGraph, readPackIndex, runSteps, scanPackObjects, verifyCommitGraph, verifyReverseIndexFile } from "@statewalker/vcs-core";
|
|
4
4
|
import { decodeGitPath } from "@statewalker/vcs-utils/encoding";
|
|
5
5
|
import { IndexCorruptError, parseCacheTree, parseResolveUndo, readIndexFileEntries } from "@statewalker/vcs-working-tree";
|
|
6
|
-
import { parseGitBool as parseGitBool$1 } from "@statewalker/vcs-utils";
|
|
6
|
+
import { parseGitBool as parseGitBool$1, startProgress } from "@statewalker/vcs-utils";
|
|
7
7
|
import { readFile as readFile$1 } from "@statewalker/vcs-utils/files";
|
|
8
8
|
import { SHA1_OBJECT_FORMAT as SHA1_OBJECT_FORMAT$1, isNullObjectId as isNullObjectId$1 } from "@statewalker/vcs-utils/hash";
|
|
9
9
|
import { multiPackIndexVerify } from "@statewalker/vcs-store-files";
|
|
10
10
|
import { bytesToHex as bytesToHex$2 } from "@statewalker/vcs-utils/hash/utils";
|
|
11
|
-
import { allocBytes } from "@statewalker/vcs-utils/streams";
|
|
12
11
|
import { InflateError, InflateOverflowError, TruncatedStreamError, createInflater as createInflater$1, inflateWhole } from "@statewalker/vcs-utils/compression";
|
|
13
|
-
import { createSha1 as createSha1$1, sha1Of as sha1Of$1 } from "@statewalker/vcs-utils/hash/hasher";
|
|
14
|
-
import { applyGitDelta } from "@statewalker/vcs-utils/diff";
|
|
15
12
|
import { CRC32 } from "@statewalker/vcs-utils/hash/crc32";
|
|
13
|
+
import { applyGitDelta } from "@statewalker/vcs-utils/diff";
|
|
14
|
+
import { allocBytes } from "@statewalker/vcs-utils/streams";
|
|
15
|
+
import { createSha1 as createSha1$1, sha1Of as sha1Of$1 } from "@statewalker/vcs-utils/hash/hasher";
|
|
16
16
|
//#region \0rolldown/runtime.js
|
|
17
17
|
var __defProp = Object.defineProperty;
|
|
18
18
|
var __exportAll = (all, no_symbols) => {
|
|
@@ -25,134 +25,6 @@ var __exportAll = (all, no_symbols) => {
|
|
|
25
25
|
return target;
|
|
26
26
|
};
|
|
27
27
|
//#endregion
|
|
28
|
-
//#region src/commands/fsck/fsck-msg-ids.ts
|
|
29
|
-
/**
|
|
30
|
-
* Every object message id git knows, with its default level, in git's order. The ref ids git
|
|
31
|
-
* 2.45+ added for `git refs verify` (`badRefContent`, ...) are not here: fsck's ref database
|
|
32
|
-
* checks are not done.
|
|
33
|
-
*/
|
|
34
|
-
const FSCK_MSG_IDS = {
|
|
35
|
-
nulInHeader: "fatal",
|
|
36
|
-
unterminatedHeader: "fatal",
|
|
37
|
-
badDate: "error",
|
|
38
|
-
badDateOverflow: "error",
|
|
39
|
-
badEmail: "error",
|
|
40
|
-
badGpgsig: "error",
|
|
41
|
-
badHeaderContinuation: "error",
|
|
42
|
-
badName: "error",
|
|
43
|
-
badObjectSha1: "error",
|
|
44
|
-
badParentSha1: "error",
|
|
45
|
-
badTimezone: "error",
|
|
46
|
-
badTree: "error",
|
|
47
|
-
badTreeSha1: "error",
|
|
48
|
-
badType: "error",
|
|
49
|
-
duplicateEntries: "error",
|
|
50
|
-
missingAuthor: "error",
|
|
51
|
-
missingCommitter: "error",
|
|
52
|
-
missingEmail: "error",
|
|
53
|
-
missingNameBeforeEmail: "error",
|
|
54
|
-
missingObject: "error",
|
|
55
|
-
missingSpaceBeforeDate: "error",
|
|
56
|
-
missingSpaceBeforeEmail: "error",
|
|
57
|
-
missingTag: "error",
|
|
58
|
-
missingTagEntry: "error",
|
|
59
|
-
missingTree: "error",
|
|
60
|
-
missingType: "error",
|
|
61
|
-
missingTypeEntry: "error",
|
|
62
|
-
multipleAuthors: "error",
|
|
63
|
-
treeNotSorted: "error",
|
|
64
|
-
unknownType: "error",
|
|
65
|
-
zeroPaddedDate: "error",
|
|
66
|
-
gitmodulesMissing: "error",
|
|
67
|
-
gitmodulesBlob: "error",
|
|
68
|
-
gitmodulesLarge: "error",
|
|
69
|
-
gitmodulesName: "error",
|
|
70
|
-
gitmodulesSymlink: "error",
|
|
71
|
-
gitmodulesUrl: "error",
|
|
72
|
-
gitmodulesPath: "error",
|
|
73
|
-
gitmodulesUpdate: "error",
|
|
74
|
-
gitattributesMissing: "error",
|
|
75
|
-
gitattributesLarge: "error",
|
|
76
|
-
gitattributesLineLength: "error",
|
|
77
|
-
gitattributesBlob: "error",
|
|
78
|
-
emptyName: "warn",
|
|
79
|
-
fullPathname: "warn",
|
|
80
|
-
hasDot: "warn",
|
|
81
|
-
hasDotdot: "warn",
|
|
82
|
-
hasDotgit: "warn",
|
|
83
|
-
nullSha1: "warn",
|
|
84
|
-
zeroPaddedFilemode: "warn",
|
|
85
|
-
nulInCommit: "warn",
|
|
86
|
-
largePathname: "warn",
|
|
87
|
-
badFilemode: "info",
|
|
88
|
-
gitmodulesParse: "info",
|
|
89
|
-
gitignoreSymlink: "info",
|
|
90
|
-
gitattributesSymlink: "info",
|
|
91
|
-
mailmapSymlink: "info",
|
|
92
|
-
badTagName: "info",
|
|
93
|
-
missingTaggerEntry: "info",
|
|
94
|
-
extraHeaderEntry: "ignore"
|
|
95
|
-
};
|
|
96
|
-
/** A message id given in config or on the command line was not one git knows. */
|
|
97
|
-
var UnknownFsckMsgIdError = class extends Error {
|
|
98
|
-
name = "UnknownFsckMsgIdError";
|
|
99
|
-
};
|
|
100
|
-
const BY_DOWNCASED = new Map(Object.keys(FSCK_MSG_IDS).map((id) => [id.toLowerCase(), id]));
|
|
101
|
-
/**
|
|
102
|
-
* The message id a config key or argument names (git's `parse_msg_id`: lowercased, underscores
|
|
103
|
-
* dropped), or undefined.
|
|
104
|
-
*/
|
|
105
|
-
function parseFsckMsgId(text) {
|
|
106
|
-
return BY_DOWNCASED.get(text.replace(/_/g, "").toLowerCase());
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* The severities of one fsck run: git's defaults, `--strict` (warnings become errors, and the
|
|
110
|
-
* nonstandard mode `100664` a bad file mode), then overrides from `fsck.<msg-id>`.
|
|
111
|
-
*/
|
|
112
|
-
var FsckMessageTypes = class {
|
|
113
|
-
strict;
|
|
114
|
-
/** git's max_tree_entry_len, set with `fsck.largePathname=<type>:<length>` */
|
|
115
|
-
maxTreeEntryLength = 4096;
|
|
116
|
-
overrides = /* @__PURE__ */ new Map();
|
|
117
|
-
constructor(options = {}) {
|
|
118
|
-
this.strict = options.strict === true;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Sets a message's type (`error`, `warn` or `ignore`), as `fsck.<msg-id>=<type>` does.
|
|
122
|
-
* `largePathname` takes `<type>:<length>` too. A fatal message can only be set to `error`.
|
|
123
|
-
*/
|
|
124
|
-
set(msgId, type) {
|
|
125
|
-
const id = parseFsckMsgId(msgId);
|
|
126
|
-
if (!id) throw new UnknownFsckMsgIdError(`Unhandled message id: ${msgId}`);
|
|
127
|
-
let value = type;
|
|
128
|
-
if (id === "largePathname") {
|
|
129
|
-
const colon = value.indexOf(":");
|
|
130
|
-
if (colon >= 0) {
|
|
131
|
-
const length = Number(value.slice(colon + 1));
|
|
132
|
-
if (!Number.isInteger(length)) throw new UnknownFsckMsgIdError(`unable to parse max tree entry len: ${value.slice(colon + 1)}`);
|
|
133
|
-
this.maxTreeEntryLength = length;
|
|
134
|
-
value = value.slice(0, colon);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
if (value !== "error" && value !== "warn" && value !== "ignore") throw new UnknownFsckMsgIdError(`Unknown fsck message type: '${value}'`);
|
|
138
|
-
if (value !== "error" && FSCK_MSG_IDS[id] === "fatal") throw new UnknownFsckMsgIdError(`Cannot demote ${msgId} to ${value}`);
|
|
139
|
-
this.overrides.set(id, value);
|
|
140
|
-
}
|
|
141
|
-
/** The level a message has in this run, before fatal/info are folded (git's `fsck_msg_type`). */
|
|
142
|
-
level(id) {
|
|
143
|
-
const override = this.overrides.get(id);
|
|
144
|
-
if (override) return override;
|
|
145
|
-
const level = FSCK_MSG_IDS[id];
|
|
146
|
-
return this.strict && level === "warn" ? "error" : level;
|
|
147
|
-
}
|
|
148
|
-
/** What a message is reported as: fatal ones as errors, infos as warnings. */
|
|
149
|
-
severity(id) {
|
|
150
|
-
const level = this.level(id);
|
|
151
|
-
if (level === "ignore") return "ignore";
|
|
152
|
-
return level === "fatal" || level === "error" ? "error" : "warning";
|
|
153
|
-
}
|
|
154
|
-
};
|
|
155
|
-
//#endregion
|
|
156
28
|
//#region src/commands/fsck/fsck-object-checks.ts
|
|
157
29
|
/**
|
|
158
30
|
* The object checks of git's `fsck.c` (`fsck_tree`, `fsck_commit`, `fsck_tag`, `fsck_blob`),
|
|
@@ -975,6 +847,149 @@ function parseTagBuffer(buf, id, shape = SHA1_ID_SHAPE) {
|
|
|
975
847
|
};
|
|
976
848
|
}
|
|
977
849
|
//#endregion
|
|
850
|
+
//#region src/commands/fsck/fsck-msg-ids.ts
|
|
851
|
+
/**
|
|
852
|
+
* Every message id git knows, with its default level: the object ids in git's order, then
|
|
853
|
+
* the ref ids `git refs verify` reports (git 2.47+: `badRefContent`, ...; `RefsVerifyCommand`).
|
|
854
|
+
*/
|
|
855
|
+
const FSCK_MSG_IDS = {
|
|
856
|
+
nulInHeader: "fatal",
|
|
857
|
+
unterminatedHeader: "fatal",
|
|
858
|
+
badDate: "error",
|
|
859
|
+
badDateOverflow: "error",
|
|
860
|
+
badEmail: "error",
|
|
861
|
+
badGpgsig: "error",
|
|
862
|
+
badHeaderContinuation: "error",
|
|
863
|
+
badName: "error",
|
|
864
|
+
badObjectSha1: "error",
|
|
865
|
+
badParentSha1: "error",
|
|
866
|
+
badTimezone: "error",
|
|
867
|
+
badTree: "error",
|
|
868
|
+
badTreeSha1: "error",
|
|
869
|
+
badType: "error",
|
|
870
|
+
duplicateEntries: "error",
|
|
871
|
+
missingAuthor: "error",
|
|
872
|
+
missingCommitter: "error",
|
|
873
|
+
missingEmail: "error",
|
|
874
|
+
missingNameBeforeEmail: "error",
|
|
875
|
+
missingObject: "error",
|
|
876
|
+
missingSpaceBeforeDate: "error",
|
|
877
|
+
missingSpaceBeforeEmail: "error",
|
|
878
|
+
missingTag: "error",
|
|
879
|
+
missingTagEntry: "error",
|
|
880
|
+
missingTree: "error",
|
|
881
|
+
missingType: "error",
|
|
882
|
+
missingTypeEntry: "error",
|
|
883
|
+
multipleAuthors: "error",
|
|
884
|
+
treeNotSorted: "error",
|
|
885
|
+
unknownType: "error",
|
|
886
|
+
zeroPaddedDate: "error",
|
|
887
|
+
gitmodulesMissing: "error",
|
|
888
|
+
gitmodulesBlob: "error",
|
|
889
|
+
gitmodulesLarge: "error",
|
|
890
|
+
gitmodulesName: "error",
|
|
891
|
+
gitmodulesSymlink: "error",
|
|
892
|
+
gitmodulesUrl: "error",
|
|
893
|
+
gitmodulesPath: "error",
|
|
894
|
+
gitmodulesUpdate: "error",
|
|
895
|
+
gitattributesMissing: "error",
|
|
896
|
+
gitattributesLarge: "error",
|
|
897
|
+
gitattributesLineLength: "error",
|
|
898
|
+
gitattributesBlob: "error",
|
|
899
|
+
emptyName: "warn",
|
|
900
|
+
fullPathname: "warn",
|
|
901
|
+
hasDot: "warn",
|
|
902
|
+
hasDotdot: "warn",
|
|
903
|
+
hasDotgit: "warn",
|
|
904
|
+
nullSha1: "warn",
|
|
905
|
+
zeroPaddedFilemode: "warn",
|
|
906
|
+
nulInCommit: "warn",
|
|
907
|
+
largePathname: "warn",
|
|
908
|
+
badFilemode: "info",
|
|
909
|
+
gitmodulesParse: "info",
|
|
910
|
+
gitignoreSymlink: "info",
|
|
911
|
+
gitattributesSymlink: "info",
|
|
912
|
+
mailmapSymlink: "info",
|
|
913
|
+
badTagName: "info",
|
|
914
|
+
missingTaggerEntry: "info",
|
|
915
|
+
extraHeaderEntry: "ignore",
|
|
916
|
+
badHeadTarget: "error",
|
|
917
|
+
badPackedRefEntry: "error",
|
|
918
|
+
badPackedRefHeader: "error",
|
|
919
|
+
badReferentName: "error",
|
|
920
|
+
badRefContent: "error",
|
|
921
|
+
badRefFiletype: "error",
|
|
922
|
+
badRefName: "error",
|
|
923
|
+
badRefOid: "error",
|
|
924
|
+
packedRefEntryNotTerminated: "error",
|
|
925
|
+
packedRefUnsorted: "error",
|
|
926
|
+
badReftableTableName: "warn",
|
|
927
|
+
emptyPackedRefsFile: "info",
|
|
928
|
+
refMissingNewline: "info",
|
|
929
|
+
symlinkRef: "info",
|
|
930
|
+
symrefTargetIsNotARef: "info",
|
|
931
|
+
trailingRefContent: "info"
|
|
932
|
+
};
|
|
933
|
+
/** A message id given in config or on the command line was not one git knows. */
|
|
934
|
+
var UnknownFsckMsgIdError = class extends Error {
|
|
935
|
+
name = "UnknownFsckMsgIdError";
|
|
936
|
+
};
|
|
937
|
+
const BY_DOWNCASED = new Map(Object.keys(FSCK_MSG_IDS).map((id) => [id.toLowerCase(), id]));
|
|
938
|
+
/**
|
|
939
|
+
* The message id a config key or argument names (git's `parse_msg_id`: lowercased, underscores
|
|
940
|
+
* dropped), or undefined.
|
|
941
|
+
*/
|
|
942
|
+
function parseFsckMsgId(text) {
|
|
943
|
+
return BY_DOWNCASED.get(text.replace(/_/g, "").toLowerCase());
|
|
944
|
+
}
|
|
945
|
+
/**
|
|
946
|
+
* The severities of one fsck run: git's defaults, `--strict` (warnings become errors, and the
|
|
947
|
+
* nonstandard mode `100664` a bad file mode), then overrides from `fsck.<msg-id>`.
|
|
948
|
+
*/
|
|
949
|
+
var FsckMessageTypes = class {
|
|
950
|
+
strict;
|
|
951
|
+
/** git's max_tree_entry_len, set with `fsck.largePathname=<type>:<length>` */
|
|
952
|
+
maxTreeEntryLength = 4096;
|
|
953
|
+
overrides = /* @__PURE__ */ new Map();
|
|
954
|
+
constructor(options = {}) {
|
|
955
|
+
this.strict = options.strict === true;
|
|
956
|
+
}
|
|
957
|
+
/**
|
|
958
|
+
* Sets a message's type (`error`, `warn` or `ignore`), as `fsck.<msg-id>=<type>` does.
|
|
959
|
+
* `largePathname` takes `<type>:<length>` too. A fatal message can only be set to `error`.
|
|
960
|
+
*/
|
|
961
|
+
set(msgId, type) {
|
|
962
|
+
const id = parseFsckMsgId(msgId);
|
|
963
|
+
if (!id) throw new UnknownFsckMsgIdError(`Unhandled message id: ${msgId}`);
|
|
964
|
+
let value = type;
|
|
965
|
+
if (id === "largePathname") {
|
|
966
|
+
const colon = value.indexOf(":");
|
|
967
|
+
if (colon >= 0) {
|
|
968
|
+
const length = Number(value.slice(colon + 1));
|
|
969
|
+
if (!Number.isInteger(length)) throw new UnknownFsckMsgIdError(`unable to parse max tree entry len: ${value.slice(colon + 1)}`);
|
|
970
|
+
this.maxTreeEntryLength = length;
|
|
971
|
+
value = value.slice(0, colon);
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
if (value !== "error" && value !== "warn" && value !== "ignore") throw new UnknownFsckMsgIdError(`Unknown fsck message type: '${value}'`);
|
|
975
|
+
if (value !== "error" && FSCK_MSG_IDS[id] === "fatal") throw new UnknownFsckMsgIdError(`Cannot demote ${msgId} to ${value}`);
|
|
976
|
+
this.overrides.set(id, value);
|
|
977
|
+
}
|
|
978
|
+
/** The level a message has in this run, before fatal/info are folded (git's `fsck_msg_type`). */
|
|
979
|
+
level(id) {
|
|
980
|
+
const override = this.overrides.get(id);
|
|
981
|
+
if (override) return override;
|
|
982
|
+
const level = FSCK_MSG_IDS[id];
|
|
983
|
+
return this.strict && level === "warn" ? "error" : level;
|
|
984
|
+
}
|
|
985
|
+
/** What a message is reported as: fatal ones as errors, infos as warnings. */
|
|
986
|
+
severity(id) {
|
|
987
|
+
const level = this.level(id);
|
|
988
|
+
if (level === "ignore") return "ignore";
|
|
989
|
+
return level === "fatal" || level === "error" ? "error" : "warning";
|
|
990
|
+
}
|
|
991
|
+
};
|
|
992
|
+
//#endregion
|
|
978
993
|
//#region src/commands/fsck/fetch-fsck.ts
|
|
979
994
|
/**
|
|
980
995
|
* The fsck of received objects git's fetch runs, or undefined when neither `fetch.fsckObjects`
|
|
@@ -1785,7 +1800,7 @@ async function checkPack(files, packPath, idxPath, hooks, options) {
|
|
|
1785
1800
|
opened: false
|
|
1786
1801
|
};
|
|
1787
1802
|
}
|
|
1788
|
-
if (!sameBytes(format.
|
|
1803
|
+
if (!sameBytes(format.createUnsafeHasher().update(idxBytes.subarray(0, idxBytes.length - raw)).digest(), 0, idxBytes, idxBytes.length - raw, raw)) {
|
|
1789
1804
|
hooks.error(`Packfile index for ${packPath} hash mismatch`);
|
|
1790
1805
|
failed = true;
|
|
1791
1806
|
}
|
|
@@ -1933,7 +1948,7 @@ async function checkPack(files, packPath, idxPath, hooks, options) {
|
|
|
1933
1948
|
if (slow instanceof Promise) return slow.then((u) => hooks.entry(entry, noted(u), pack));
|
|
1934
1949
|
return hooks.entry(entry, noted(slow), pack);
|
|
1935
1950
|
};
|
|
1936
|
-
const sha = format.
|
|
1951
|
+
const sha = format.createUnsafeHasher();
|
|
1937
1952
|
const trailer = new Uint8Array(raw);
|
|
1938
1953
|
let at = 0;
|
|
1939
1954
|
let k = 0;
|
|
@@ -2198,7 +2213,10 @@ const FSCK_ERROR_BITMAP_243 = 128;
|
|
|
2198
2213
|
const DEFAULT_LINKS_KEPT = 33554432;
|
|
2199
2214
|
const DEFAULT_GRAPH_COMMITS_KEPT = 262144;
|
|
2200
2215
|
const OID = /^(?:[0-9a-f]{40}|[0-9a-f]{64})$/;
|
|
2201
|
-
|
|
2216
|
+
/** every `*.idx` of a pack directory, as git's prepare_packed_git_one (`custom-<id>.idx` too) */
|
|
2217
|
+
const PACK_IDX = /^[^/\\]+\.idx$/;
|
|
2218
|
+
/** a `pack-<hex>.idx` name, whose id length tells its object format */
|
|
2219
|
+
const PACK_ID_IDX = /^pack-[0-9a-f]+\.idx$/;
|
|
2202
2220
|
/** Refs one worktree has of its own (git's `is_per_worktree_ref`). */
|
|
2203
2221
|
const PER_WORKTREE = /^(?:refs\/(?:bisect|worktree|rewritten)\/|[A-Z_]+$)/;
|
|
2204
2222
|
const dec = new TextDecoder();
|
|
@@ -2442,6 +2460,7 @@ var FsckCommand = class extends GitCommand {
|
|
|
2442
2460
|
const result = await new FsckRun(stores, objects, types, {
|
|
2443
2461
|
...loadPromised ? { loadPromised } : {},
|
|
2444
2462
|
connectivityOnly: this._connectivityOnly,
|
|
2463
|
+
...this.progress ? { progress: this.progress } : {},
|
|
2445
2464
|
dangling: this._dangling,
|
|
2446
2465
|
unreachable: this._unreachable,
|
|
2447
2466
|
reflogs: this._reflogs && !this._lostFound,
|
|
@@ -2703,6 +2722,10 @@ var FsckRun = class {
|
|
|
2703
2722
|
}
|
|
2704
2723
|
if (this.o.connectivityOnly) this.graph = await this.loadCommitGraph();
|
|
2705
2724
|
if (packed) await this.scanPacks(packed, loose ?? []);
|
|
2725
|
+
if (this.files && this.o.compatibility === "2.43") {
|
|
2726
|
+
if (await this.verifyReverseIndexes(this.packs)) this.errorsFound |= 64;
|
|
2727
|
+
if (await this.verifyBitmapFiles(this.packs)) this.errorsFound |= 128;
|
|
2728
|
+
}
|
|
2706
2729
|
try {
|
|
2707
2730
|
await this.checkConnectivity();
|
|
2708
2731
|
if (badMidx) {
|
|
@@ -2713,8 +2736,6 @@ var FsckRun = class {
|
|
|
2713
2736
|
}
|
|
2714
2737
|
}
|
|
2715
2738
|
await this.verifyCommitGraph();
|
|
2716
|
-
if (this.files && this.o.compatibility === "2.43" && await this.verifyReverseIndexes(this.packs)) this.errorsFound |= 64;
|
|
2717
|
-
if (this.files && this.o.compatibility === "2.43" && await this.verifyBitmapFiles(this.packs)) this.errorsFound |= 128;
|
|
2718
2739
|
if (this.files && this.o.compatibility === "2.43") {
|
|
2719
2740
|
for (const dir of this.sourceDirs()) if (await this.verifyMultiPackIndex(dir)) this.errorsFound |= 32;
|
|
2720
2741
|
}
|
|
@@ -3281,7 +3302,7 @@ var FsckRun = class {
|
|
|
3281
3302
|
const found = [];
|
|
3282
3303
|
for await (const e of files.list(dir)) {
|
|
3283
3304
|
if (e.kind !== "file" || !PACK_IDX.test(e.name)) continue;
|
|
3284
|
-
if (e.name.length !== 9 + this.format.hexLength) continue;
|
|
3305
|
+
if (PACK_ID_IDX.test(e.name) && e.name.length !== 9 + this.format.hexLength) continue;
|
|
3285
3306
|
const idxPath = pathOf(dir, e.name);
|
|
3286
3307
|
const packPath = `${idxPath.slice(0, -4)}.pack`;
|
|
3287
3308
|
const stats = await files.stats(packPath);
|
|
@@ -3322,10 +3343,12 @@ var FsckRun = class {
|
|
|
3322
3343
|
yield this.looseName.test(e.name) ? {
|
|
3323
3344
|
id: sub + e.name,
|
|
3324
3345
|
path,
|
|
3325
|
-
name: e.name
|
|
3346
|
+
name: e.name,
|
|
3347
|
+
fanout: i
|
|
3326
3348
|
} : {
|
|
3327
3349
|
path,
|
|
3328
|
-
name: e.name
|
|
3350
|
+
name: e.name,
|
|
3351
|
+
fanout: i
|
|
3329
3352
|
};
|
|
3330
3353
|
}
|
|
3331
3354
|
}
|
|
@@ -3724,7 +3747,13 @@ var FsckRun = class {
|
|
|
3724
3747
|
/** git's `fsck_object_dir`: every loose object file of `objectsDir`. */
|
|
3725
3748
|
async fsckLooseObjects(objectsDir) {
|
|
3726
3749
|
const files = this.files;
|
|
3750
|
+
const progress = startProgress(this.o.progress, "Checking object directories", 256);
|
|
3751
|
+
let directory = -1;
|
|
3727
3752
|
for await (const e of this.looseEntries(objectsDir)) {
|
|
3753
|
+
if (e.fanout > directory) {
|
|
3754
|
+
if (directory >= 0) progress.update(directory + 1);
|
|
3755
|
+
directory = e.fanout;
|
|
3756
|
+
}
|
|
3728
3757
|
if (!e.id) {
|
|
3729
3758
|
if (!e.name.startsWith("tmp_obj_")) this.emit({
|
|
3730
3759
|
kind: "notice",
|
|
@@ -3748,6 +3777,9 @@ var FsckRun = class {
|
|
|
3748
3777
|
}
|
|
3749
3778
|
if (await this.fsckObjBuffer(e.id, typeOf(read.object.type), read.object.content, this.o.compatibility === "2.56" ? `${e.id}: object corrupt or missing` : `${e.id}: object could not be parsed: ${e.path}`, read.object.size) > 0) this.errorsFound |= 1;
|
|
3750
3779
|
}
|
|
3780
|
+
if (directory >= 0) progress.update(directory + 1);
|
|
3781
|
+
progress.update(256);
|
|
3782
|
+
progress.stop();
|
|
3751
3783
|
}
|
|
3752
3784
|
/**
|
|
3753
3785
|
* git's check of each pack's `.rev` (`verify_reverse_indices`; 2.43's
|
|
@@ -3756,12 +3788,15 @@ var FsckRun = class {
|
|
|
3756
3788
|
async verifyReverseIndexes(packs) {
|
|
3757
3789
|
const files = this.files;
|
|
3758
3790
|
let bad = false;
|
|
3791
|
+
const progress = startProgress(this.o.progress, "Verifying reverse pack-indexes", packs.length);
|
|
3759
3792
|
for (const p of packs) {
|
|
3760
3793
|
const lines = await verifyReverseIndexFile(files, p.packPath, p.idx.objectCount, (i) => p.idx.getOffset(i), this.format);
|
|
3794
|
+
progress.tick();
|
|
3761
3795
|
if (!lines) continue;
|
|
3762
3796
|
for (const line of lines) this.error(line.replace(/^error: /, ""));
|
|
3763
3797
|
bad = true;
|
|
3764
3798
|
}
|
|
3799
|
+
progress.stop();
|
|
3765
3800
|
return bad;
|
|
3766
3801
|
}
|
|
3767
3802
|
/**
|
|
@@ -3787,7 +3822,7 @@ var FsckRun = class {
|
|
|
3787
3822
|
const raw = this.format.rawLength;
|
|
3788
3823
|
let valid = size >= raw;
|
|
3789
3824
|
if (valid) {
|
|
3790
|
-
const hasher = this.format.
|
|
3825
|
+
const hasher = this.format.createUnsafeHasher();
|
|
3791
3826
|
for await (const c of files.read(path, {
|
|
3792
3827
|
start: 0,
|
|
3793
3828
|
length: size - raw
|
|
@@ -3810,6 +3845,7 @@ var FsckRun = class {
|
|
|
3810
3845
|
/** git's `verify_pack` for each of `packs`, with `fsck_obj_buffer` for each object. */
|
|
3811
3846
|
async fsckPacks(packs) {
|
|
3812
3847
|
const files = this.files;
|
|
3848
|
+
const progress = startProgress(this.o.progress, "Checking objects", packs.reduce((n, p) => n + p.idx.objectCount, 0));
|
|
3813
3849
|
for (const p of packs) {
|
|
3814
3850
|
let err = 0;
|
|
3815
3851
|
let checksumAt = 0;
|
|
@@ -3827,6 +3863,7 @@ var FsckRun = class {
|
|
|
3827
3863
|
});
|
|
3828
3864
|
},
|
|
3829
3865
|
entry: (entry, unpacked) => {
|
|
3866
|
+
progress.tick();
|
|
3830
3867
|
if (p.idx.version > 1 && !entry.crcOk) {
|
|
3831
3868
|
this.error(`index CRC mismatch for object ${entry.id} from ${p.packPath} at offset ${entry.offset}`, entry.id);
|
|
3832
3869
|
err = 1;
|
|
@@ -3858,6 +3895,7 @@ var FsckRun = class {
|
|
|
3858
3895
|
})).failed) err = 1;
|
|
3859
3896
|
if (err) this.errorsFound |= this.o.compatibility === "2.56" ? 1 : 4;
|
|
3860
3897
|
}
|
|
3898
|
+
progress.stop();
|
|
3861
3899
|
}
|
|
3862
3900
|
/** Every object of a store without files: read, hash-checked and checked. */
|
|
3863
3901
|
async fsckStoredObjects() {
|
|
@@ -4813,8 +4851,10 @@ var FsckRun = class {
|
|
|
4813
4851
|
const t = this.t;
|
|
4814
4852
|
const pending = this.pending;
|
|
4815
4853
|
const scanAt = this.scanAt;
|
|
4854
|
+
const progress = startProgress(this.o.progress, "Checking connectivity");
|
|
4816
4855
|
while (pending.length > 0) {
|
|
4817
4856
|
const n = pending.pop();
|
|
4857
|
+
progress.tick();
|
|
4818
4858
|
if (t.type(n) === 3) continue;
|
|
4819
4859
|
const s = n < scanAt.length ? scanAt[n] - 1 : -1;
|
|
4820
4860
|
if (s >= 0 && (this.scanKids[s] & 3) === 2 && !(t.flags(n) & 16) && t.type(n) === 2) {
|
|
@@ -4828,6 +4868,7 @@ var FsckRun = class {
|
|
|
4828
4868
|
const r = runSteps(this.traverseOne(n));
|
|
4829
4869
|
if (r instanceof Promise) await r;
|
|
4830
4870
|
}
|
|
4871
|
+
progress.stop();
|
|
4831
4872
|
if (this.o.connectivityOnly && (this.o.dangling || this.o.lostFound)) await this.forEachStored((raw, at) => this.markUnreachableReferents(raw, at));
|
|
4832
4873
|
for (const n of [...t.inSlotOrder()]) {
|
|
4833
4874
|
const id = t.id(n);
|
|
@@ -5135,4 +5176,4 @@ var fsck_exports = /* @__PURE__ */ __exportAll({
|
|
|
5135
5176
|
walkTree: () => walkTree
|
|
5136
5177
|
});
|
|
5137
5178
|
//#endregion
|
|
5138
|
-
export {
|
|
5179
|
+
export { parseGitmodulesConfig as A, fsckBlob as C, hexIdAt as D, fsckTree as E, walkTree as F, __exportAll as I, rawIdAt as M, scanTree as N, parseCommitBuffer as O, treeEntryId as P, checkSubmoduleUrl as S, fsckTag as T, UnknownFsckMsgIdError as _, FSCK_ERROR_MULTI_PACK_INDEX_243 as a, canonMode as b, FSCK_ERROR_PACK_REV_INDEX_243 as c, FsckCommand as d, FsckConfigError as f, FsckMessageTypes as g, FSCK_MSG_IDS as h, FSCK_ERROR_COMMIT_GRAPH as i, parseTagBuffer as j, parseCommitLinks as k, FSCK_ERROR_REACHABLE as l, receiveFsckOf as m, VerifyPackCommand as n, FSCK_ERROR_OBJECT as o, fetchFsckOf as p, FSCK_ERROR_BITMAP_243 as r, FSCK_ERROR_PACK as s, fsck_exports as t, FSCK_ERROR_REFS as u, parseFsckMsgId as v, fsckCommit as w, checkSubmoduleName as x, SHA1_ID_SHAPE as y };
|