@statewalker/vcs-commands 0.9.0 → 0.11.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 +144 -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 +28 -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 +54 -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 +60 -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-ipc.d.ts +30 -0
- package/dist/commands/fsmonitor-ipc.d.ts.map +1 -0
- 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 +45 -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 +28 -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 +158 -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 -2
- package/dist/commands/reset-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 +3 -0
- package/dist/commands/rev-list-command.d.ts.map +1 -1
- package/dist/commands/rev-parse-command.d.ts +5 -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 +27 -1
- 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 +30 -2
- 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 +16 -2
- 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 +22 -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 +27 -1
- package/dist/commands/submodule-update-command.d.ts.map +1 -1
- package/dist/commands/tag-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 +131 -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-bQQ9OmCh.js} +52514 -44630
- 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-BHT9bUS-.js} +184 -143
- package/dist/git-command.d.ts +66 -4
- 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-Cx2PlGV9.js +13544 -0
- package/dist/{remote-transport-CCmBadm-.js → remote-transport-BrQZfyHu.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-CNHQnU5Y.js} +13707 -10608
- package/dist/transport-command.d.ts +79 -1
- package/dist/transport-command.d.ts.map +1 -1
- package/package.json +13 -13
- 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 +193 -22
- 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 +895 -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 +61 -22
- 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 +249 -9
- 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 +118 -1
- package/src/commands/diff-command.ts +592 -47
- 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 +267 -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-ipc.ts +121 -0
- package/src/commands/fsmonitor-refresh.ts +320 -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 +46 -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 +66 -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 +708 -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 +1066 -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 +75 -3
- 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 +49 -5
- package/src/commands/revert-command.ts +21 -1
- package/src/commands/revision-range.ts +7 -2
- package/src/commands/revision-resolver.ts +97 -14
- 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 +176 -23
- package/src/commands/stash-apply-command.ts +3 -0
- package/src/commands/stash-export-command.ts +397 -0
- package/src/commands/status-command.ts +74 -8
- package/src/commands/stripspace-command.ts +118 -0
- package/src/commands/submodule-add-command.ts +40 -2
- package/src/commands/submodule-auth.ts +61 -6
- package/src/commands/submodule-commands.ts +12 -2
- package/src/commands/submodule-update-command.ts +47 -1
- package/src/commands/tag-command.ts +33 -11
- 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 +1148 -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 +177 -3
- 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
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The part of Go's `net/url` git-lfs relies on to read endpoint URLs (`url.Parse` and
|
|
3
|
+
* `(*URL).String`, Go 1.22): git-lfs passes an http(s), `file:` or `git:` URL through
|
|
4
|
+
* `String()`, which re-escapes its path, and reads an ssh URL's host, user and decoded path.
|
|
5
|
+
* Only what changes an endpoint is kept: parse errors (a colon in the first path segment of a
|
|
6
|
+
* URL without scheme, a port that is no number, a bad escape), the lower-cased scheme, the
|
|
7
|
+
* opaque form (`host:path`) and the path's re-encoding.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* const u = goUrlParse("HTTPS://h/a b");
|
|
12
|
+
* goUrlString(u); // "https://h/a%20b"
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/** A parsed URL, as Go's `url.URL` holds it. */
|
|
17
|
+
export interface GoUrl {
|
|
18
|
+
/** Lower case */
|
|
19
|
+
scheme: string;
|
|
20
|
+
opaque: string;
|
|
21
|
+
/** `undefined` when the URL has no `@` */
|
|
22
|
+
user?: { username: string; password?: string };
|
|
23
|
+
host: string;
|
|
24
|
+
/** Unescaped */
|
|
25
|
+
path: string;
|
|
26
|
+
/** The path as written when it differs from Go's own encoding */
|
|
27
|
+
rawPath: string;
|
|
28
|
+
omitHost: boolean;
|
|
29
|
+
forceQuery: boolean;
|
|
30
|
+
rawQuery: string;
|
|
31
|
+
/** Unescaped */
|
|
32
|
+
fragment: string;
|
|
33
|
+
rawFragment: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
type EncodeMode = "path" | "pathSegment" | "host" | "zone" | "userPassword" | "query" | "fragment";
|
|
37
|
+
|
|
38
|
+
const isHex = (c: number) =>
|
|
39
|
+
(c >= 0x30 && c <= 0x39) || (c >= 0x61 && c <= 0x66) || (c >= 0x41 && c <= 0x46);
|
|
40
|
+
const unhex = (c: number) =>
|
|
41
|
+
c >= 0x30 && c <= 0x39 ? c - 0x30 : c >= 0x61 && c <= 0x66 ? c - 0x57 : c - 0x37;
|
|
42
|
+
|
|
43
|
+
/** Go's `shouldEscape` for one byte. */
|
|
44
|
+
function shouldEscape(c: number, mode: EncodeMode): boolean {
|
|
45
|
+
if ((c >= 0x61 && c <= 0x7a) || (c >= 0x41 && c <= 0x5a) || (c >= 0x30 && c <= 0x39)) {
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
if (mode === "host" || mode === "zone") {
|
|
49
|
+
switch (String.fromCharCode(c)) {
|
|
50
|
+
case "!":
|
|
51
|
+
case "$":
|
|
52
|
+
case "&":
|
|
53
|
+
case "'":
|
|
54
|
+
case "(":
|
|
55
|
+
case ")":
|
|
56
|
+
case "*":
|
|
57
|
+
case "+":
|
|
58
|
+
case ",":
|
|
59
|
+
case ";":
|
|
60
|
+
case "=":
|
|
61
|
+
case ":":
|
|
62
|
+
case "[":
|
|
63
|
+
case "]":
|
|
64
|
+
case "<":
|
|
65
|
+
case ">":
|
|
66
|
+
case '"':
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
switch (String.fromCharCode(c)) {
|
|
71
|
+
case "-":
|
|
72
|
+
case "_":
|
|
73
|
+
case ".":
|
|
74
|
+
case "~":
|
|
75
|
+
return false;
|
|
76
|
+
case "$":
|
|
77
|
+
case "&":
|
|
78
|
+
case "+":
|
|
79
|
+
case ",":
|
|
80
|
+
case "/":
|
|
81
|
+
case ":":
|
|
82
|
+
case ";":
|
|
83
|
+
case "=":
|
|
84
|
+
case "?":
|
|
85
|
+
case "@":
|
|
86
|
+
switch (mode) {
|
|
87
|
+
case "path":
|
|
88
|
+
return c === 0x3f; // '?'
|
|
89
|
+
case "pathSegment":
|
|
90
|
+
return c === 0x2f || c === 0x3b || c === 0x2c || c === 0x3f;
|
|
91
|
+
case "userPassword":
|
|
92
|
+
return c === 0x40 || c === 0x2f || c === 0x3f || c === 0x3a;
|
|
93
|
+
case "query":
|
|
94
|
+
return true;
|
|
95
|
+
case "fragment":
|
|
96
|
+
return false;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
if (mode === "fragment") {
|
|
100
|
+
switch (String.fromCharCode(c)) {
|
|
101
|
+
case "!":
|
|
102
|
+
case "(":
|
|
103
|
+
case ")":
|
|
104
|
+
case "*":
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
const encoder = new TextEncoder();
|
|
112
|
+
const decoder = new TextDecoder();
|
|
113
|
+
|
|
114
|
+
/** Go's `unescape`; throws where Go returns an error. */
|
|
115
|
+
function goUnescape(s: string, mode: EncodeMode): string {
|
|
116
|
+
const bytes = encoder.encode(s);
|
|
117
|
+
let hasPercent = false;
|
|
118
|
+
for (let i = 0; i < bytes.length; ) {
|
|
119
|
+
const c = bytes[i] as number;
|
|
120
|
+
if (c === 0x25) {
|
|
121
|
+
hasPercent = true;
|
|
122
|
+
if (
|
|
123
|
+
i + 2 >= bytes.length ||
|
|
124
|
+
!isHex(bytes[i + 1] as number) ||
|
|
125
|
+
!isHex(bytes[i + 2] as number)
|
|
126
|
+
) {
|
|
127
|
+
throw new Error("invalid URL escape");
|
|
128
|
+
}
|
|
129
|
+
if (mode === "host" && unhex(bytes[i + 1] as number) < 8 && s.slice(i, i + 3) !== "%25") {
|
|
130
|
+
throw new Error("invalid URL escape");
|
|
131
|
+
}
|
|
132
|
+
i += 3;
|
|
133
|
+
} else {
|
|
134
|
+
if ((mode === "host" || mode === "zone") && c < 0x80 && shouldEscape(c, mode)) {
|
|
135
|
+
throw new Error("invalid character in host name");
|
|
136
|
+
}
|
|
137
|
+
i++;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
if (!hasPercent) return s;
|
|
141
|
+
const out: number[] = [];
|
|
142
|
+
for (let i = 0; i < bytes.length; ) {
|
|
143
|
+
const c = bytes[i] as number;
|
|
144
|
+
if (c === 0x25) {
|
|
145
|
+
out.push((unhex(bytes[i + 1] as number) << 4) | unhex(bytes[i + 2] as number));
|
|
146
|
+
i += 3;
|
|
147
|
+
} else {
|
|
148
|
+
out.push(c);
|
|
149
|
+
i++;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
return decoder.decode(new Uint8Array(out));
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/** Go's `escape`. */
|
|
156
|
+
function goEscape(s: string, mode: EncodeMode): string {
|
|
157
|
+
let out = "";
|
|
158
|
+
for (const c of encoder.encode(s)) {
|
|
159
|
+
if (shouldEscape(c, mode)) out += `%${c.toString(16).toUpperCase().padStart(2, "0")}`;
|
|
160
|
+
else out += String.fromCharCode(c);
|
|
161
|
+
}
|
|
162
|
+
return out;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/** Go's `validEncoded`: `s` is a valid encoding of some text in `mode`. */
|
|
166
|
+
function validEncoded(s: string, mode: EncodeMode): boolean {
|
|
167
|
+
for (let i = 0; i < s.length; i++) {
|
|
168
|
+
const ch = s[i] as string;
|
|
169
|
+
if ("!$&'()*+,;=:@[]".includes(ch)) continue;
|
|
170
|
+
if (ch === "%") continue;
|
|
171
|
+
const c = s.charCodeAt(i);
|
|
172
|
+
if (c >= 0x80 || shouldEscape(c, mode)) return false;
|
|
173
|
+
}
|
|
174
|
+
return true;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
function getScheme(raw: string): [string, string] {
|
|
178
|
+
for (let i = 0; i < raw.length; i++) {
|
|
179
|
+
const c = raw.charCodeAt(i);
|
|
180
|
+
if ((c >= 0x61 && c <= 0x7a) || (c >= 0x41 && c <= 0x5a)) continue;
|
|
181
|
+
if ((c >= 0x30 && c <= 0x39) || c === 0x2b || c === 0x2d || c === 0x2e) {
|
|
182
|
+
if (i === 0) return ["", raw];
|
|
183
|
+
continue;
|
|
184
|
+
}
|
|
185
|
+
if (c === 0x3a) {
|
|
186
|
+
if (i === 0) throw new Error("missing protocol scheme");
|
|
187
|
+
return [raw.slice(0, i), raw.slice(i + 1)];
|
|
188
|
+
}
|
|
189
|
+
return ["", raw];
|
|
190
|
+
}
|
|
191
|
+
return ["", raw];
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
function validOptionalPort(port: string): boolean {
|
|
195
|
+
if (port === "") return true;
|
|
196
|
+
if (port[0] !== ":") return false;
|
|
197
|
+
return /^[0-9]*$/.test(port.slice(1));
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
function parseHost(host: string): string {
|
|
201
|
+
if (host.startsWith("[")) {
|
|
202
|
+
const i = host.lastIndexOf("]");
|
|
203
|
+
if (i < 0) throw new Error("missing ']' in host");
|
|
204
|
+
const colonPort = host.slice(i + 1);
|
|
205
|
+
if (!validOptionalPort(colonPort)) throw new Error("invalid port");
|
|
206
|
+
const zone = host.slice(0, i).indexOf("%25");
|
|
207
|
+
if (zone >= 0) {
|
|
208
|
+
return (
|
|
209
|
+
goUnescape(host.slice(0, zone), "host") +
|
|
210
|
+
goUnescape(host.slice(zone, i), "zone") +
|
|
211
|
+
goUnescape(host.slice(i), "host")
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
} else {
|
|
215
|
+
const i = host.lastIndexOf(":");
|
|
216
|
+
if (i >= 0 && !validOptionalPort(host.slice(i))) throw new Error("invalid port");
|
|
217
|
+
}
|
|
218
|
+
return goUnescape(host, "host");
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
const validUserinfo = (s: string) => /^[A-Za-z0-9\-._:~!$&'()*+,;=%@]*$/.test(s);
|
|
222
|
+
|
|
223
|
+
function parseAuthority(authority: string): Pick<GoUrl, "user" | "host"> {
|
|
224
|
+
const i = authority.lastIndexOf("@");
|
|
225
|
+
if (i < 0) return { host: parseHost(authority) };
|
|
226
|
+
const host = parseHost(authority.slice(i + 1));
|
|
227
|
+
const userinfo = authority.slice(0, i);
|
|
228
|
+
if (!validUserinfo(userinfo)) throw new Error("net/url: invalid userinfo");
|
|
229
|
+
const colon = userinfo.indexOf(":");
|
|
230
|
+
if (colon < 0) return { host, user: { username: goUnescape(userinfo, "userPassword") } };
|
|
231
|
+
return {
|
|
232
|
+
host,
|
|
233
|
+
user: {
|
|
234
|
+
username: goUnescape(userinfo.slice(0, colon), "userPassword"),
|
|
235
|
+
password: goUnescape(userinfo.slice(colon + 1), "userPassword"),
|
|
236
|
+
},
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/** Go's `url.Parse`; throws where it returns an error. */
|
|
241
|
+
export function goUrlParse(rawUrl: string): GoUrl {
|
|
242
|
+
const hash = rawUrl.indexOf("#");
|
|
243
|
+
const beforeFragment = hash >= 0 ? rawUrl.slice(0, hash) : rawUrl;
|
|
244
|
+
const rawFragment = hash >= 0 ? rawUrl.slice(hash + 1) : "";
|
|
245
|
+
const u: GoUrl = {
|
|
246
|
+
scheme: "",
|
|
247
|
+
opaque: "",
|
|
248
|
+
host: "",
|
|
249
|
+
path: "",
|
|
250
|
+
rawPath: "",
|
|
251
|
+
omitHost: false,
|
|
252
|
+
forceQuery: false,
|
|
253
|
+
rawQuery: "",
|
|
254
|
+
fragment: "",
|
|
255
|
+
rawFragment: "",
|
|
256
|
+
};
|
|
257
|
+
if ([...beforeFragment].some((ch) => ch.charCodeAt(0) < 0x20 || ch.charCodeAt(0) === 0x7f)) {
|
|
258
|
+
throw new Error("net/url: invalid control character in URL");
|
|
259
|
+
}
|
|
260
|
+
if (beforeFragment === "*") {
|
|
261
|
+
u.path = "*";
|
|
262
|
+
} else if (beforeFragment !== "") {
|
|
263
|
+
let [scheme, rest] = getScheme(beforeFragment);
|
|
264
|
+
u.scheme = scheme.toLowerCase();
|
|
265
|
+
if (rest.endsWith("?") && rest.split("?").length === 2) {
|
|
266
|
+
u.forceQuery = true;
|
|
267
|
+
rest = rest.slice(0, -1);
|
|
268
|
+
} else {
|
|
269
|
+
const q = rest.indexOf("?");
|
|
270
|
+
if (q >= 0) {
|
|
271
|
+
u.rawQuery = rest.slice(q + 1);
|
|
272
|
+
rest = rest.slice(0, q);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
if (!rest.startsWith("/")) {
|
|
276
|
+
if (u.scheme !== "") {
|
|
277
|
+
u.opaque = rest;
|
|
278
|
+
setFragment(u, rawFragment);
|
|
279
|
+
return u;
|
|
280
|
+
}
|
|
281
|
+
const colon = rest.indexOf(":");
|
|
282
|
+
const slash = rest.indexOf("/");
|
|
283
|
+
if (colon >= 0 && (slash < 0 || colon < slash)) {
|
|
284
|
+
throw new Error("first path segment in URL cannot contain colon");
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
if ((u.scheme !== "" || !rest.startsWith("///")) && rest.startsWith("//")) {
|
|
288
|
+
let authority = rest.slice(2);
|
|
289
|
+
rest = "";
|
|
290
|
+
const slash = authority.indexOf("/");
|
|
291
|
+
if (slash >= 0) {
|
|
292
|
+
rest = authority.slice(slash);
|
|
293
|
+
authority = authority.slice(0, slash);
|
|
294
|
+
}
|
|
295
|
+
const parsed = parseAuthority(authority);
|
|
296
|
+
u.host = parsed.host;
|
|
297
|
+
if (parsed.user) u.user = parsed.user;
|
|
298
|
+
} else if (u.scheme !== "" && rest.startsWith("/")) {
|
|
299
|
+
u.omitHost = true;
|
|
300
|
+
}
|
|
301
|
+
u.path = goUnescape(rest, "path");
|
|
302
|
+
u.rawPath = goEscape(u.path, "path") === rest ? "" : rest;
|
|
303
|
+
}
|
|
304
|
+
setFragment(u, rawFragment);
|
|
305
|
+
return u;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
function setFragment(u: GoUrl, raw: string): void {
|
|
309
|
+
u.fragment = goUnescape(raw, "fragment");
|
|
310
|
+
u.rawFragment = goEscape(u.fragment, "fragment") === raw ? "" : raw;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
function escapedPath(u: GoUrl): string {
|
|
314
|
+
if (u.rawPath !== "" && validEncoded(u.rawPath, "path")) {
|
|
315
|
+
try {
|
|
316
|
+
if (goUnescape(u.rawPath, "path") === u.path) return u.rawPath;
|
|
317
|
+
} catch {
|
|
318
|
+
// not a valid encoding
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
if (u.path === "*") return "*";
|
|
322
|
+
return goEscape(u.path, "path");
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
function escapedFragment(u: GoUrl): string {
|
|
326
|
+
if (u.rawFragment !== "" && validEncoded(u.rawFragment, "fragment")) {
|
|
327
|
+
try {
|
|
328
|
+
if (goUnescape(u.rawFragment, "fragment") === u.fragment) return u.rawFragment;
|
|
329
|
+
} catch {
|
|
330
|
+
// not a valid encoding
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
return goEscape(u.fragment, "fragment");
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/** `(&url.URL{Path: path}).EscapedPath()`. */
|
|
337
|
+
export function goEscapedPath(path: string): string {
|
|
338
|
+
return path === "*" ? "*" : goEscape(path, "path");
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
/** Go's `(*URL).String`. */
|
|
342
|
+
export function goUrlString(u: GoUrl): string {
|
|
343
|
+
let buf = "";
|
|
344
|
+
if (u.scheme !== "") buf += `${u.scheme}:`;
|
|
345
|
+
if (u.opaque !== "") {
|
|
346
|
+
buf += u.opaque;
|
|
347
|
+
} else {
|
|
348
|
+
if (u.scheme !== "" || u.host !== "" || u.user !== undefined) {
|
|
349
|
+
if (!(u.omitHost && u.host === "" && u.user === undefined)) {
|
|
350
|
+
if (u.host !== "" || u.path !== "" || u.user !== undefined) buf += "//";
|
|
351
|
+
if (u.user !== undefined) {
|
|
352
|
+
buf += goEscape(u.user.username, "userPassword");
|
|
353
|
+
if (u.user.password !== undefined) buf += `:${goEscape(u.user.password, "userPassword")}`;
|
|
354
|
+
buf += "@";
|
|
355
|
+
}
|
|
356
|
+
if (u.host !== "") buf += goEscape(u.host, "host");
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
const path = escapedPath(u);
|
|
360
|
+
if (path !== "" && path[0] !== "/" && u.host !== "") buf += "/";
|
|
361
|
+
if (buf === "") {
|
|
362
|
+
const segment = path.split("/")[0] ?? "";
|
|
363
|
+
if (segment.includes(":")) buf += "./";
|
|
364
|
+
}
|
|
365
|
+
buf += path;
|
|
366
|
+
}
|
|
367
|
+
if (u.forceQuery || u.rawQuery !== "") buf += `?${u.rawQuery}`;
|
|
368
|
+
if (u.fragment !== "") buf += `#${escapedFragment(u)}`;
|
|
369
|
+
return buf;
|
|
370
|
+
}
|