@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.
Files changed (468) hide show
  1. package/README.md +1 -1
  2. package/dist/commands/add-command.d.ts.map +1 -1
  3. package/dist/commands/add-patch/patch-backend.d.ts +2 -0
  4. package/dist/commands/add-patch/patch-backend.d.ts.map +1 -1
  5. package/dist/commands/add-patch/patch-modes.d.ts +6 -2
  6. package/dist/commands/add-patch/patch-modes.d.ts.map +1 -1
  7. package/dist/commands/add-patch/patch-session.d.ts +4 -0
  8. package/dist/commands/add-patch/patch-session.d.ts.map +1 -1
  9. package/dist/commands/am/am-command.d.ts +41 -2
  10. package/dist/commands/am/am-command.d.ts.map +1 -1
  11. package/dist/commands/apply/index.d.ts +1 -1
  12. package/dist/commands/apply/index.d.ts.map +1 -1
  13. package/dist/commands/archive/archive-command.d.ts +169 -0
  14. package/dist/commands/archive/archive-command.d.ts.map +1 -0
  15. package/dist/commands/archive/archive-entry.d.ts +60 -0
  16. package/dist/commands/archive/archive-entry.d.ts.map +1 -0
  17. package/dist/commands/archive/index.d.ts +8 -0
  18. package/dist/commands/archive/index.d.ts.map +1 -0
  19. package/dist/commands/archive/remote-archive-command.d.ts +56 -0
  20. package/dist/commands/archive/remote-archive-command.d.ts.map +1 -0
  21. package/dist/commands/archive/tar-archive.d.ts +31 -0
  22. package/dist/commands/archive/tar-archive.d.ts.map +1 -0
  23. package/dist/commands/archive/tar-commit-id.d.ts +13 -0
  24. package/dist/commands/archive/tar-commit-id.d.ts.map +1 -0
  25. package/dist/commands/archive/upload-archive-writer.d.ts +48 -0
  26. package/dist/commands/archive/upload-archive-writer.d.ts.map +1 -0
  27. package/dist/commands/archive/zip-archive.d.ts +42 -0
  28. package/dist/commands/archive/zip-archive.d.ts.map +1 -0
  29. package/dist/commands/attributes-source.d.ts +10 -0
  30. package/dist/commands/attributes-source.d.ts.map +1 -1
  31. package/dist/commands/blame-command.d.ts +43 -1
  32. package/dist/commands/blame-command.d.ts.map +1 -1
  33. package/dist/commands/bundle/bundle-create-command.d.ts +67 -0
  34. package/dist/commands/bundle/bundle-create-command.d.ts.map +1 -0
  35. package/dist/commands/bundle/bundle-format.d.ts +89 -0
  36. package/dist/commands/bundle/bundle-format.d.ts.map +1 -0
  37. package/dist/commands/bundle/bundle-list.d.ts +92 -0
  38. package/dist/commands/bundle/bundle-list.d.ts.map +1 -0
  39. package/dist/commands/bundle/bundle-read-commands.d.ts +81 -0
  40. package/dist/commands/bundle/bundle-read-commands.d.ts.map +1 -0
  41. package/dist/commands/bundle/bundle-support.d.ts +32 -0
  42. package/dist/commands/bundle/bundle-support.d.ts.map +1 -0
  43. package/dist/commands/bundle/bundle-transport.d.ts +38 -0
  44. package/dist/commands/bundle/bundle-transport.d.ts.map +1 -0
  45. package/dist/commands/bundle/bundle-uri-host.d.ts +43 -0
  46. package/dist/commands/bundle/bundle-uri-host.d.ts.map +1 -0
  47. package/dist/commands/bundle/bundle-uri.d.ts +55 -0
  48. package/dist/commands/bundle/bundle-uri.d.ts.map +1 -0
  49. package/dist/commands/bundle/bundle-verify.d.ts +63 -0
  50. package/dist/commands/bundle/bundle-verify.d.ts.map +1 -0
  51. package/dist/commands/bundle/index.d.ts +14 -0
  52. package/dist/commands/bundle/index.d.ts.map +1 -0
  53. package/dist/commands/cat-file/batch-format.d.ts +58 -0
  54. package/dist/commands/cat-file/batch-format.d.ts.map +1 -0
  55. package/dist/commands/cat-file/cat-file-command.d.ts +144 -0
  56. package/dist/commands/cat-file/cat-file-command.d.ts.map +1 -0
  57. package/dist/commands/cat-file/index.d.ts +3 -0
  58. package/dist/commands/cat-file/index.d.ts.map +1 -0
  59. package/dist/commands/check-attr-command.d.ts +66 -0
  60. package/dist/commands/check-attr-command.d.ts.map +1 -0
  61. package/dist/commands/check-ignore-command.d.ts +58 -0
  62. package/dist/commands/check-ignore-command.d.ts.map +1 -0
  63. package/dist/commands/check-ref-format-command.d.ts +60 -0
  64. package/dist/commands/check-ref-format-command.d.ts.map +1 -0
  65. package/dist/commands/checkout-command.d.ts.map +1 -1
  66. package/dist/commands/checkout-index-command.d.ts +96 -0
  67. package/dist/commands/checkout-index-command.d.ts.map +1 -0
  68. package/dist/commands/cherry-pick-command.d.ts +10 -0
  69. package/dist/commands/cherry-pick-command.d.ts.map +1 -1
  70. package/dist/commands/clone-command.d.ts +28 -0
  71. package/dist/commands/clone-command.d.ts.map +1 -1
  72. package/dist/commands/commit-command.d.ts +9 -1
  73. package/dist/commands/commit-command.d.ts.map +1 -1
  74. package/dist/commands/config-command.d.ts +2 -0
  75. package/dist/commands/config-command.d.ts.map +1 -1
  76. package/dist/commands/daemon-access-hook.d.ts +36 -0
  77. package/dist/commands/daemon-access-hook.d.ts.map +1 -0
  78. package/dist/commands/default-branch.d.ts +54 -0
  79. package/dist/commands/default-branch.d.ts.map +1 -1
  80. package/dist/commands/diff-command.d.ts +132 -5
  81. package/dist/commands/diff-command.d.ts.map +1 -1
  82. package/dist/commands/diff-external.d.ts +43 -0
  83. package/dist/commands/diff-external.d.ts.map +1 -0
  84. package/dist/commands/diff-plumbing/diff-pairs-command.d.ts +27 -0
  85. package/dist/commands/diff-plumbing/diff-pairs-command.d.ts.map +1 -0
  86. package/dist/commands/diff-plumbing/diff-plumbing-command.d.ts +129 -0
  87. package/dist/commands/diff-plumbing/diff-plumbing-command.d.ts.map +1 -0
  88. package/dist/commands/diff-plumbing/index.d.ts +3 -0
  89. package/dist/commands/diff-plumbing/index.d.ts.map +1 -0
  90. package/dist/commands/diff-textconv.d.ts +5 -1
  91. package/dist/commands/diff-textconv.d.ts.map +1 -1
  92. package/dist/commands/fast-export/fast-export-command.d.ts +135 -0
  93. package/dist/commands/fast-export/fast-export-command.d.ts.map +1 -0
  94. package/dist/commands/fast-export/fast-import-command.d.ts +182 -0
  95. package/dist/commands/fast-export/fast-import-command.d.ts.map +1 -0
  96. package/dist/commands/fast-export/fast-stream-support.d.ts +64 -0
  97. package/dist/commands/fast-export/fast-stream-support.d.ts.map +1 -0
  98. package/dist/commands/fast-export/index.d.ts +4 -0
  99. package/dist/commands/fast-export/index.d.ts.map +1 -0
  100. package/dist/commands/fetch-command.d.ts +65 -0
  101. package/dist/commands/fetch-command.d.ts.map +1 -1
  102. package/dist/commands/fetch-multiple-command.d.ts.map +1 -1
  103. package/dist/commands/format-rev-command.d.ts +60 -0
  104. package/dist/commands/format-rev-command.d.ts.map +1 -0
  105. package/dist/commands/fsck/fsck-command.d.ts.map +1 -1
  106. package/dist/commands/fsck/fsck-msg-ids.d.ts +18 -3
  107. package/dist/commands/fsck/fsck-msg-ids.d.ts.map +1 -1
  108. package/dist/commands/fsmonitor-ipc.d.ts +30 -0
  109. package/dist/commands/fsmonitor-ipc.d.ts.map +1 -0
  110. package/dist/commands/fsmonitor-refresh.d.ts +69 -0
  111. package/dist/commands/fsmonitor-refresh.d.ts.map +1 -0
  112. package/dist/commands/gc-command.d.ts +5 -0
  113. package/dist/commands/gc-command.d.ts.map +1 -1
  114. package/dist/commands/git-hooks.d.ts +32 -0
  115. package/dist/commands/git-hooks.d.ts.map +1 -1
  116. package/dist/commands/git-paths.d.ts +26 -0
  117. package/dist/commands/git-paths.d.ts.map +1 -0
  118. package/dist/commands/grep/grep-command.d.ts +2 -1
  119. package/dist/commands/grep/grep-command.d.ts.map +1 -1
  120. package/dist/commands/history-command.d.ts +156 -0
  121. package/dist/commands/history-command.d.ts.map +1 -0
  122. package/dist/commands/http-config.d.ts +38 -0
  123. package/dist/commands/http-config.d.ts.map +1 -0
  124. package/dist/commands/index-adder.d.ts +12 -1
  125. package/dist/commands/index-adder.d.ts.map +1 -1
  126. package/dist/commands/index-host.d.ts.map +1 -1
  127. package/dist/commands/index.d.ts +45 -1
  128. package/dist/commands/index.d.ts.map +1 -1
  129. package/dist/commands/index.js +6 -5
  130. package/dist/commands/init-command.d.ts.map +1 -1
  131. package/dist/commands/last-modified-command.d.ts +102 -0
  132. package/dist/commands/last-modified-command.d.ts.map +1 -0
  133. package/dist/commands/lfs/go-url.d.ts +43 -0
  134. package/dist/commands/lfs/go-url.d.ts.map +1 -0
  135. package/dist/commands/lfs/index.d.ts +3 -0
  136. package/dist/commands/lfs/index.d.ts.map +1 -0
  137. package/dist/commands/lfs/lfs-config.d.ts +174 -0
  138. package/dist/commands/lfs/lfs-config.d.ts.map +1 -0
  139. package/dist/commands/lfs/lfs-endpoint-command.d.ts +83 -0
  140. package/dist/commands/lfs/lfs-endpoint-command.d.ts.map +1 -0
  141. package/dist/commands/local-transport.d.ts.map +1 -1
  142. package/dist/commands/log-command.d.ts +26 -0
  143. package/dist/commands/log-command.d.ts.map +1 -1
  144. package/dist/commands/log-output.d.ts +28 -1
  145. package/dist/commands/log-output.d.ts.map +1 -1
  146. package/dist/commands/ls-files-command.d.ts +153 -0
  147. package/dist/commands/ls-files-command.d.ts.map +1 -0
  148. package/dist/commands/ls-remote-command.d.ts +5 -0
  149. package/dist/commands/ls-remote-command.d.ts.map +1 -1
  150. package/dist/commands/ls-tree-command.d.ts +105 -0
  151. package/dist/commands/ls-tree-command.d.ts.map +1 -0
  152. package/dist/commands/maintenance-run-command.d.ts +122 -0
  153. package/dist/commands/maintenance-run-command.d.ts.map +1 -0
  154. package/dist/commands/merge-command.d.ts +7 -0
  155. package/dist/commands/merge-command.d.ts.map +1 -1
  156. package/dist/commands/merge-config.d.ts +7 -0
  157. package/dist/commands/merge-config.d.ts.map +1 -1
  158. package/dist/commands/merge-drivers.d.ts +67 -5
  159. package/dist/commands/merge-drivers.d.ts.map +1 -1
  160. package/dist/commands/merge-support.d.ts +6 -0
  161. package/dist/commands/merge-support.d.ts.map +1 -1
  162. package/dist/commands/merge-tree-command.d.ts +122 -0
  163. package/dist/commands/merge-tree-command.d.ts.map +1 -0
  164. package/dist/commands/mktag-command.d.ts +51 -0
  165. package/dist/commands/mktag-command.d.ts.map +1 -0
  166. package/dist/commands/object-store/count-objects-command.d.ts +58 -0
  167. package/dist/commands/object-store/count-objects-command.d.ts.map +1 -0
  168. package/dist/commands/object-store/index.d.ts +5 -0
  169. package/dist/commands/object-store/index.d.ts.map +1 -0
  170. package/dist/commands/object-store/objects-directory.d.ts +12 -0
  171. package/dist/commands/object-store/objects-directory.d.ts.map +1 -0
  172. package/dist/commands/object-store/prune-command.d.ts +38 -0
  173. package/dist/commands/object-store/prune-command.d.ts.map +1 -0
  174. package/dist/commands/object-store/show-index-command.d.ts +23 -0
  175. package/dist/commands/object-store/show-index-command.d.ts.map +1 -0
  176. package/dist/commands/ort-merge.d.ts +24 -0
  177. package/dist/commands/ort-merge.d.ts.map +1 -1
  178. package/dist/commands/patch-id-command.d.ts +30 -0
  179. package/dist/commands/patch-id-command.d.ts.map +1 -0
  180. package/dist/commands/patch-id.d.ts +24 -0
  181. package/dist/commands/patch-id.d.ts.map +1 -1
  182. package/dist/commands/plumbing-command.d.ts +66 -0
  183. package/dist/commands/plumbing-command.d.ts.map +1 -0
  184. package/dist/commands/plumbing-input.d.ts +38 -0
  185. package/dist/commands/plumbing-input.d.ts.map +1 -0
  186. package/dist/commands/promisor-remote-reply.d.ts +35 -0
  187. package/dist/commands/promisor-remote-reply.d.ts.map +1 -0
  188. package/dist/commands/promisor-remote.d.ts.map +1 -1
  189. package/dist/commands/pull-command.d.ts.map +1 -1
  190. package/dist/commands/push-command.d.ts +17 -2
  191. package/dist/commands/push-command.d.ts.map +1 -1
  192. package/dist/commands/rebase-command.d.ts +108 -2
  193. package/dist/commands/rebase-command.d.ts.map +1 -1
  194. package/dist/commands/refs-command.d.ts +81 -0
  195. package/dist/commands/refs-command.d.ts.map +1 -0
  196. package/dist/commands/remote-object-info-command.d.ts +55 -0
  197. package/dist/commands/remote-object-info-command.d.ts.map +1 -0
  198. package/dist/commands/remote-transport.d.ts +40 -3
  199. package/dist/commands/remote-transport.d.ts.map +1 -1
  200. package/dist/commands/repack-command.d.ts +115 -0
  201. package/dist/commands/repack-command.d.ts.map +1 -0
  202. package/dist/commands/replace-command.d.ts +143 -0
  203. package/dist/commands/replace-command.d.ts.map +1 -0
  204. package/dist/commands/replay-command.d.ts +117 -0
  205. package/dist/commands/replay-command.d.ts.map +1 -0
  206. package/dist/commands/repo-command.d.ts +158 -0
  207. package/dist/commands/repo-command.d.ts.map +1 -0
  208. package/dist/commands/request-pull-command.d.ts +82 -0
  209. package/dist/commands/request-pull-command.d.ts.map +1 -0
  210. package/dist/commands/rerere-command.d.ts +36 -0
  211. package/dist/commands/rerere-command.d.ts.map +1 -0
  212. package/dist/commands/rerere.d.ts +102 -0
  213. package/dist/commands/rerere.d.ts.map +1 -0
  214. package/dist/commands/reset-command.d.ts +19 -2
  215. package/dist/commands/reset-command.d.ts.map +1 -1
  216. package/dist/commands/rev-filter/commit-grep.d.ts +3 -1
  217. package/dist/commands/rev-filter/commit-grep.d.ts.map +1 -1
  218. package/dist/commands/rev-list-command.d.ts +3 -0
  219. package/dist/commands/rev-list-command.d.ts.map +1 -1
  220. package/dist/commands/rev-parse-command.d.ts +5 -0
  221. package/dist/commands/rev-parse-command.d.ts.map +1 -1
  222. package/dist/commands/revert-command.d.ts +10 -0
  223. package/dist/commands/revert-command.d.ts.map +1 -1
  224. package/dist/commands/revision-range.d.ts +5 -0
  225. package/dist/commands/revision-range.d.ts.map +1 -1
  226. package/dist/commands/revision-resolver.d.ts +27 -1
  227. package/dist/commands/revision-resolver.d.ts.map +1 -1
  228. package/dist/commands/sequencer-pick.d.ts +18 -0
  229. package/dist/commands/sequencer-pick.d.ts.map +1 -1
  230. package/dist/commands/serve-repository.d.ts +23 -1
  231. package/dist/commands/serve-repository.d.ts.map +1 -1
  232. package/dist/commands/session-id.d.ts +18 -0
  233. package/dist/commands/session-id.d.ts.map +1 -0
  234. package/dist/commands/show-branch-command.d.ts +59 -0
  235. package/dist/commands/show-branch-command.d.ts.map +1 -0
  236. package/dist/commands/show-ref-command.d.ts +112 -0
  237. package/dist/commands/show-ref-command.d.ts.map +1 -0
  238. package/dist/commands/signature-check.d.ts +9 -2
  239. package/dist/commands/signature-check.d.ts.map +1 -1
  240. package/dist/commands/signing.d.ts +30 -2
  241. package/dist/commands/signing.d.ts.map +1 -1
  242. package/dist/commands/stash-apply-command.d.ts.map +1 -1
  243. package/dist/commands/stash-export-command.d.ts +115 -0
  244. package/dist/commands/stash-export-command.d.ts.map +1 -0
  245. package/dist/commands/status-command.d.ts +16 -2
  246. package/dist/commands/status-command.d.ts.map +1 -1
  247. package/dist/commands/stripspace-command.d.ts +44 -0
  248. package/dist/commands/stripspace-command.d.ts.map +1 -0
  249. package/dist/commands/submodule-add-command.d.ts +22 -1
  250. package/dist/commands/submodule-add-command.d.ts.map +1 -1
  251. package/dist/commands/submodule-auth.d.ts +3 -1
  252. package/dist/commands/submodule-auth.d.ts.map +1 -1
  253. package/dist/commands/submodule-commands.d.ts +9 -1
  254. package/dist/commands/submodule-commands.d.ts.map +1 -1
  255. package/dist/commands/submodule-update-command.d.ts +27 -1
  256. package/dist/commands/submodule-update-command.d.ts.map +1 -1
  257. package/dist/commands/tag-command.d.ts.map +1 -1
  258. package/dist/commands/textconv-cache.d.ts +58 -0
  259. package/dist/commands/textconv-cache.d.ts.map +1 -0
  260. package/dist/commands/tree-restore.d.ts +5 -0
  261. package/dist/commands/tree-restore.d.ts.map +1 -1
  262. package/dist/commands/unpack-objects-command.d.ts +47 -0
  263. package/dist/commands/unpack-objects-command.d.ts.map +1 -0
  264. package/dist/commands/update-index-command.d.ts +131 -0
  265. package/dist/commands/update-index-command.d.ts.map +1 -0
  266. package/dist/commands/uri-protocols.d.ts +13 -0
  267. package/dist/commands/uri-protocols.d.ts.map +1 -0
  268. package/dist/commands/url-parse-command.d.ts +30 -0
  269. package/dist/commands/url-parse-command.d.ts.map +1 -0
  270. package/dist/commands/var-command.d.ts +42 -0
  271. package/dist/commands/var-command.d.ts.map +1 -0
  272. package/dist/{commands-CNvli5bl.js → commands-bQQ9OmCh.js} +52514 -44630
  273. package/dist/errors/command-errors.d.ts +33 -0
  274. package/dist/errors/command-errors.d.ts.map +1 -1
  275. package/dist/errors/index.js +39 -1
  276. package/dist/{fsck-CPeDh9fh.js → fsck-BHT9bUS-.js} +184 -143
  277. package/dist/git-command.d.ts +66 -4
  278. package/dist/git-command.d.ts.map +1 -1
  279. package/dist/git.d.ts +532 -1
  280. package/dist/git.d.ts.map +1 -1
  281. package/dist/guarded-transport-command.d.ts +3 -1
  282. package/dist/guarded-transport-command.d.ts.map +1 -1
  283. package/dist/index.js +7 -6
  284. package/dist/maintenance-run-command-Cx2PlGV9.js +13544 -0
  285. package/dist/{remote-transport-CCmBadm-.js → remote-transport-BrQZfyHu.js} +1009 -10
  286. package/dist/results/cherry-pick-result.d.ts +6 -0
  287. package/dist/results/cherry-pick-result.d.ts.map +1 -1
  288. package/dist/results/diff-entry.d.ts +10 -0
  289. package/dist/results/diff-entry.d.ts.map +1 -1
  290. package/dist/results/diff-formatter.d.ts.map +1 -1
  291. package/dist/results/diff-output.d.ts +49 -3
  292. package/dist/results/diff-output.d.ts.map +1 -1
  293. package/dist/results/fetch-result.d.ts +12 -0
  294. package/dist/results/fetch-result.d.ts.map +1 -1
  295. package/dist/results/index.js +2 -2
  296. package/dist/results/merge-result.d.ts +5 -0
  297. package/dist/results/merge-result.d.ts.map +1 -1
  298. package/dist/results/push-result.d.ts +5 -0
  299. package/dist/results/push-result.d.ts.map +1 -1
  300. package/dist/results/rebase-result.d.ts +7 -0
  301. package/dist/results/rebase-result.d.ts.map +1 -1
  302. package/dist/results/revert-result.d.ts +6 -0
  303. package/dist/results/revert-result.d.ts.map +1 -1
  304. package/dist/results/stash-result.d.ts +5 -0
  305. package/dist/results/stash-result.d.ts.map +1 -1
  306. package/dist/{results-BDuEgdLU.js → results-CNHQnU5Y.js} +13707 -10608
  307. package/dist/transport-command.d.ts +79 -1
  308. package/dist/transport-command.d.ts.map +1 -1
  309. package/package.json +13 -13
  310. package/src/commands/add-command.ts +3 -0
  311. package/src/commands/add-patch/patch-backend.ts +4 -1
  312. package/src/commands/add-patch/patch-modes.ts +26 -2
  313. package/src/commands/add-patch/patch-session.ts +6 -0
  314. package/src/commands/am/am-command.ts +193 -22
  315. package/src/commands/apply/index.ts +1 -0
  316. package/src/commands/archive/archive-command.ts +1148 -0
  317. package/src/commands/archive/archive-entry.ts +93 -0
  318. package/src/commands/archive/index.ts +7 -0
  319. package/src/commands/archive/remote-archive-command.ts +140 -0
  320. package/src/commands/archive/tar-archive.ts +207 -0
  321. package/src/commands/archive/tar-commit-id.ts +72 -0
  322. package/src/commands/archive/upload-archive-writer.ts +213 -0
  323. package/src/commands/archive/zip-archive.ts +317 -0
  324. package/src/commands/attributes-source.ts +26 -12
  325. package/src/commands/blame-command.ts +118 -19
  326. package/src/commands/bundle/bundle-create-command.ts +405 -0
  327. package/src/commands/bundle/bundle-format.ts +228 -0
  328. package/src/commands/bundle/bundle-list.ts +276 -0
  329. package/src/commands/bundle/bundle-read-commands.ts +157 -0
  330. package/src/commands/bundle/bundle-support.ts +85 -0
  331. package/src/commands/bundle/bundle-transport.ts +107 -0
  332. package/src/commands/bundle/bundle-uri-host.ts +204 -0
  333. package/src/commands/bundle/bundle-uri.ts +236 -0
  334. package/src/commands/bundle/bundle-verify.ts +152 -0
  335. package/src/commands/bundle/index.ts +14 -0
  336. package/src/commands/cat-file/batch-format.ts +193 -0
  337. package/src/commands/cat-file/cat-file-command.ts +895 -0
  338. package/src/commands/cat-file/index.ts +2 -0
  339. package/src/commands/check-attr-command.ts +333 -0
  340. package/src/commands/check-ignore-command.ts +261 -0
  341. package/src/commands/check-ref-format-command.ts +129 -0
  342. package/src/commands/checkout-command.ts +61 -22
  343. package/src/commands/checkout-index-command.ts +568 -0
  344. package/src/commands/checkout-paths.ts +7 -0
  345. package/src/commands/cherry-pick-command.ts +21 -1
  346. package/src/commands/clone-command.ts +249 -9
  347. package/src/commands/commit-command.ts +22 -4
  348. package/src/commands/config-command.ts +9 -0
  349. package/src/commands/daemon-access-hook.ts +78 -0
  350. package/src/commands/default-branch.ts +118 -1
  351. package/src/commands/diff-command.ts +592 -47
  352. package/src/commands/diff-external.ts +131 -0
  353. package/src/commands/diff-plumbing/diff-pairs-command.ts +193 -0
  354. package/src/commands/diff-plumbing/diff-plumbing-command.ts +424 -0
  355. package/src/commands/diff-plumbing/index.ts +2 -0
  356. package/src/commands/diff-textconv.ts +5 -1
  357. package/src/commands/fast-export/fast-export-command.ts +911 -0
  358. package/src/commands/fast-export/fast-import-command.ts +1553 -0
  359. package/src/commands/fast-export/fast-stream-support.ts +162 -0
  360. package/src/commands/fast-export/index.ts +3 -0
  361. package/src/commands/fetch-command.ts +312 -8
  362. package/src/commands/fetch-multiple-command.ts +4 -1
  363. package/src/commands/format-rev-command.ts +267 -0
  364. package/src/commands/fsck/fsck-command.ts +47 -20
  365. package/src/commands/fsck/fsck-msg-ids.ts +19 -3
  366. package/src/commands/fsck/fsck-pack.ts +2 -2
  367. package/src/commands/fsmonitor-ipc.ts +121 -0
  368. package/src/commands/fsmonitor-refresh.ts +320 -0
  369. package/src/commands/gc-command.ts +10 -0
  370. package/src/commands/git-hooks.ts +123 -6
  371. package/src/commands/git-paths.ts +136 -0
  372. package/src/commands/grep/grep-command.ts +38 -15
  373. package/src/commands/history-command.ts +617 -0
  374. package/src/commands/http-config.ts +139 -0
  375. package/src/commands/index-adder.ts +37 -3
  376. package/src/commands/index-host.ts +6 -1
  377. package/src/commands/index.ts +46 -0
  378. package/src/commands/init-command.ts +14 -0
  379. package/src/commands/last-modified-command.ts +804 -0
  380. package/src/commands/lfs/go-url.ts +370 -0
  381. package/src/commands/lfs/index.ts +2 -0
  382. package/src/commands/lfs/lfs-config.ts +738 -0
  383. package/src/commands/lfs/lfs-endpoint-command.ts +180 -0
  384. package/src/commands/local-transport.ts +252 -4
  385. package/src/commands/log-command.ts +104 -5
  386. package/src/commands/log-output.ts +66 -5
  387. package/src/commands/ls-files-command.ts +1177 -0
  388. package/src/commands/ls-remote-command.ts +6 -0
  389. package/src/commands/ls-tree-command.ts +708 -0
  390. package/src/commands/maintenance-run-command.ts +949 -0
  391. package/src/commands/merge-command.ts +78 -32
  392. package/src/commands/merge-config.ts +23 -1
  393. package/src/commands/merge-drivers.ts +109 -20
  394. package/src/commands/merge-support.ts +29 -5
  395. package/src/commands/merge-tree-command.ts +786 -0
  396. package/src/commands/mktag-command.ts +149 -0
  397. package/src/commands/object-store/count-objects-command.ts +404 -0
  398. package/src/commands/object-store/index.ts +4 -0
  399. package/src/commands/object-store/objects-directory.ts +24 -0
  400. package/src/commands/object-store/prune-command.ts +129 -0
  401. package/src/commands/object-store/show-index-command.ts +151 -0
  402. package/src/commands/ort-merge.ts +92 -25
  403. package/src/commands/patch-id-command.ts +65 -0
  404. package/src/commands/patch-id.ts +218 -0
  405. package/src/commands/plumbing-command.ts +141 -0
  406. package/src/commands/plumbing-input.ts +87 -0
  407. package/src/commands/promisor-remote-reply.ts +276 -0
  408. package/src/commands/promisor-remote.ts +25 -2
  409. package/src/commands/pull-command.ts +2 -0
  410. package/src/commands/push-command.ts +87 -5
  411. package/src/commands/rebase-command.ts +507 -19
  412. package/src/commands/refs-command.ts +274 -0
  413. package/src/commands/remote-object-info-command.ts +109 -0
  414. package/src/commands/remote-transport.ts +116 -1
  415. package/src/commands/repack-command.ts +383 -0
  416. package/src/commands/replace-command.ts +816 -0
  417. package/src/commands/replay-command.ts +674 -0
  418. package/src/commands/repo-command.ts +1066 -0
  419. package/src/commands/request-pull-command.ts +356 -0
  420. package/src/commands/rerere-command.ts +179 -0
  421. package/src/commands/rerere.ts +925 -0
  422. package/src/commands/reset-command.ts +75 -3
  423. package/src/commands/rev-filter/commit-grep.ts +7 -2
  424. package/src/commands/rev-list-command.ts +9 -0
  425. package/src/commands/rev-parse-command.ts +49 -5
  426. package/src/commands/revert-command.ts +21 -1
  427. package/src/commands/revision-range.ts +7 -2
  428. package/src/commands/revision-resolver.ts +97 -14
  429. package/src/commands/sequencer-pick.ts +47 -0
  430. package/src/commands/serve-repository.ts +65 -0
  431. package/src/commands/session-id.ts +31 -0
  432. package/src/commands/show-branch-command.ts +981 -0
  433. package/src/commands/show-command.ts +1 -1
  434. package/src/commands/show-ref-command.ts +439 -0
  435. package/src/commands/signature-check.ts +37 -5
  436. package/src/commands/signing.ts +176 -23
  437. package/src/commands/stash-apply-command.ts +3 -0
  438. package/src/commands/stash-export-command.ts +397 -0
  439. package/src/commands/status-command.ts +74 -8
  440. package/src/commands/stripspace-command.ts +118 -0
  441. package/src/commands/submodule-add-command.ts +40 -2
  442. package/src/commands/submodule-auth.ts +61 -6
  443. package/src/commands/submodule-commands.ts +12 -2
  444. package/src/commands/submodule-update-command.ts +47 -1
  445. package/src/commands/tag-command.ts +33 -11
  446. package/src/commands/textconv-cache.ts +143 -0
  447. package/src/commands/tree-restore.ts +14 -0
  448. package/src/commands/unpack-objects-command.ts +235 -0
  449. package/src/commands/update-index-command.ts +1148 -0
  450. package/src/commands/uri-protocols.ts +13 -0
  451. package/src/commands/url-parse-command.ts +67 -0
  452. package/src/commands/var-command.ts +219 -0
  453. package/src/errors/command-errors.ts +45 -0
  454. package/src/git-command.ts +177 -3
  455. package/src/git.ts +808 -1
  456. package/src/guarded-transport-command.ts +6 -1
  457. package/src/results/cherry-pick-result.ts +6 -0
  458. package/src/results/diff-entry.ts +12 -0
  459. package/src/results/diff-formatter.ts +7 -4
  460. package/src/results/diff-output.ts +117 -11
  461. package/src/results/diff-pickaxe.ts +1 -1
  462. package/src/results/fetch-result.ts +12 -0
  463. package/src/results/merge-result.ts +5 -0
  464. package/src/results/push-result.ts +5 -0
  465. package/src/results/rebase-result.ts +7 -0
  466. package/src/results/revert-result.ts +6 -0
  467. package/src/results/stash-result.ts +6 -0
  468. package/src/transport-command.ts +182 -1
@@ -0,0 +1,38 @@
1
+ /**
2
+ * git's bundle transport (transport.c's `bundle_vtable`): a remote URL that is a path to a
3
+ * bundle file is read as a repository whose refs are the bundle's and whose only pack is the
4
+ * bundle's. Fetch, clone, pull and ls-remote reach it through an upload-pack served in
5
+ * process from the bundle: its refs advertised (in git's order: the bundle's refs reversed,
6
+ * as `get_refs_from_bundle` prepends each), and any fetch answered with the bundle's pack,
7
+ * once the fetching repository has the bundle's prerequisites (`unbundle`'s `verify_bundle`).
8
+ */
9
+ import { type Duplex, type UploadPackConnection } from "@statewalker/vcs-transport";
10
+ import { TransportError } from "../../errors/index.js";
11
+ import type { OpenedBundle } from "./bundle-verify.js";
12
+ /** A bundle remote: its file read, and how to check it against the fetching repository. */
13
+ export interface BundleRemote {
14
+ readonly bundle: OpenedBundle;
15
+ /**
16
+ * `verify_bundle` against the repository fetching (its `error:` lines on failure), run
17
+ * before the pack is handed over
18
+ */
19
+ verify(): Promise<{
20
+ ok: boolean;
21
+ stderr: string;
22
+ }>;
23
+ }
24
+ /**
25
+ * A fetch from a bundle the repository lacks the prerequisites of: `verify_bundle`'s lines
26
+ * (`git fetch` exits 1; `git clone` adds `fatal: remote transport reported error`, 128).
27
+ */
28
+ export declare class BundlePrerequisitesError extends TransportError {
29
+ readonly lines: string;
30
+ constructor(lines: string);
31
+ }
32
+ /**
33
+ * Runs `run` over a connection to an upload-pack serving the bundle (protocol v0). A fetch
34
+ * that needs the pack verifies the bundle first: when the repository lacks its prerequisites
35
+ * the fetch fails with git's lines (exit 1, as `git fetch` returns).
36
+ */
37
+ export declare function withBundleUploadPack<T>(remote: BundleRemote, createPair: () => [Duplex, Duplex], run: (connection: UploadPackConnection) => Promise<T>): Promise<T>;
38
+ //# sourceMappingURL=bundle-transport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundle-transport.d.ts","sourceRoot":"","sources":["../../../src/commands/bundle/bundle-transport.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,KAAK,MAAM,EAKX,KAAK,oBAAoB,EAC1B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,2FAA2F;AAC3F,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B;;;OAGG;IACH,MAAM,IAAI,OAAO,CAAC;QAAE,EAAE,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACpD;AAED;;;GAGG;AACH,qBAAa,wBAAyB,SAAQ,cAAc;IAC9C,QAAQ,CAAC,KAAK,EAAE,MAAM;IAAlC,YAAqB,KAAK,EAAE,MAAM,EAGjC;CACF;AAKD;;;;GAIG;AACH,wBAAsB,oBAAoB,CAAC,CAAC,EAC1C,MAAM,EAAE,YAAY,EACpB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAClC,GAAG,EAAE,CAAC,UAAU,EAAE,oBAAoB,KAAK,OAAO,CAAC,CAAC,CAAC,GACpD,OAAO,CAAC,CAAC,CAAC,CAwCZ"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * The repository side of bundle URIs for clone and fetch: downloads (`copy_uri_to_file`),
3
+ * `unbundle_from_file` (the bundle verified quietly, its pack indexed and kept, its refs
4
+ * written under `refs/bundles/`) and `fetch.bundleCreationToken`.
5
+ */
6
+ import { type ObjectId, type RefLogOptions } from "@statewalker/vcs-core";
7
+ import { type Credentials, type HttpClientSettings, type HttpCredentialHelper } from "@statewalker/vcs-transport";
8
+ import type { WorkingCopy } from "../../types.js";
9
+ import type { BundleUriHost } from "./bundle-uri.js";
10
+ /** What {@link createBundleUriHost} works with. */
11
+ export interface BundleUriHostOptions {
12
+ workingCopy: WorkingCopy;
13
+ /** Writes a ref (no old value checked: git reads it right before) */
14
+ setRef(name: string, id: ObjectId, log: RefLogOptions): Promise<void>;
15
+ /** Reads a ref's value */
16
+ getRef(name: string): Promise<ObjectId | undefined>;
17
+ /** The reflog entry of a write (`fetched bundle`) */
18
+ reflogLine(message: string): RefLogOptions;
19
+ /**
20
+ * git 2.43 maps only `refs/heads/<name>` to `refs/bundles/<name>`; 2.5x maps every
21
+ * `refs/<name>` to `refs/bundles/<name>` (tags too)
22
+ */
23
+ compatibility?: "2.43" | "2.56";
24
+ /** A local path's bytes (relative paths as the clone resolves its source) */
25
+ readLocalFile(path: string): Promise<Uint8Array | undefined>;
26
+ /** HTTP: the remote's URL; static credentials and headers go only to its origin */
27
+ remoteUrl?: string;
28
+ credentials?: Credentials;
29
+ headers?: Record<string, string>;
30
+ credentialHelper?: HttpCredentialHelper;
31
+ httpSettings?(url: string): HttpClientSettings;
32
+ fetchImpl?: (request: Request) => Promise<Response>;
33
+ /** Reads `fetch.bundleCreationToken` */
34
+ configValue(key: string): string | null | undefined;
35
+ /** Stores `fetch.bundleCreationToken` */
36
+ setConfigValue(key: string, value: string): Promise<void>;
37
+ message(line: string): void;
38
+ /** How the downloaded list file is named in errors */
39
+ tempFileName?(): string;
40
+ }
41
+ /** A host over a repository (see {@link BundleUriHostOptions}). */
42
+ export declare function createBundleUriHost(options: BundleUriHostOptions): BundleUriHost;
43
+ //# sourceMappingURL=bundle-uri-host.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundle-uri-host.d.ts","sourceRoot":"","sources":["../../../src/commands/bundle/bundle-uri-host.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAA2B,KAAK,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACnG,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EAE1B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGrD,mDAAmD;AACnD,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,WAAW,CAAC;IACzB,qEAAqE;IACrE,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,QA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les are downloaded from a URI (`git clone --bundle-uri`, `fetch.bundleURI`) or from the
4
+ * list the server advertises (`transfer.bundleURI`, the v2 `bundle-uri` command) and
5
+ * unbundled into the repository, their refs written under `refs/bundles/`. The fetch that
6
+ * follows then has them as local tips, so it asks only for what they lack.
7
+ *
8
+ * The engine is the host's: {@link BundleUriHost} downloads a URI, unbundles bytes and reads
9
+ * and writes `fetch.bundleCreationToken`. {@link fetchBundleUri} and {@link fetchBundleList}
10
+ * follow git's walk, its recursion limit, `all`/`any` modes and the `creationToken`
11
+ * heuristic, and give git's warnings in order.
12
+ */
13
+ import { BundleList } from "./bundle-list.js";
14
+ /** What the walk needs of the repository and the network. */
15
+ export interface BundleUriHost {
16
+ /**
17
+ * `copy_uri_to_file`: the bytes at `uri` (an `http(s)://` URL, a `file://` URL or a path),
18
+ * or undefined when they cannot be had (git's warning follows)
19
+ */
20
+ download(uri: string): Promise<Uint8Array | undefined>;
21
+ /**
22
+ * `unbundle_from_file`: the bundle verified (quietly) and its pack indexed, then its refs
23
+ * written under `refs/bundles/`; false when the header, the prerequisites or the pack fail
24
+ */
25
+ unbundle(bytes: Uint8Array): Promise<boolean>;
26
+ /** `fetch.bundleCreationToken` as set (undefined: unset; null: set without a value) */
27
+ creationToken(): string | null | undefined;
28
+ /** Stores `fetch.bundleCreationToken` in the repository's config */
29
+ setCreationToken(value: string): Promise<void>;
30
+ /** A line git prints on stderr (`warning: ...`, `error: ...`) */
31
+ message(line: string): void;
32
+ /**
33
+ * How git names a downloaded list in its `bad config line` error (its temporary file,
34
+ * `<objects>/bundles/tmp_uri_XXXXXX`)
35
+ */
36
+ tempFileName?(): string;
37
+ }
38
+ /** Whether the bytes read as a bundle (`is_bundle`: the whole header parses). */
39
+ export declare function isBundle(bytes: Uint8Array): boolean;
40
+ /**
41
+ * `fetch_bundle_uri`: the bundle (or bundle list) at `uri` downloaded and applied. An empty
42
+ * URI does nothing (a configured `fetch.bundleURI` turned off). `ok` false where git returns
43
+ * nonzero (its warnings already given); `hasHeuristic` when a list used `creationToken` (git's
44
+ * clone then stores the URI as `fetch.bundleURI`).
45
+ */
46
+ export declare function fetchBundleUri(host: BundleUriHost, uri: string): Promise<{
47
+ ok: boolean;
48
+ hasHeuristic: boolean;
49
+ }>;
50
+ /**
51
+ * `fetch_bundle_list`: the list a server advertised, downloaded and applied (by token under
52
+ * the `creationToken` heuristic). False where git warns `failed to fetch advertised bundles`.
53
+ */
54
+ export declare function fetchBundleList(host: BundleUriHost, list: BundleList): Promise<boolean>;
55
+ //# sourceMappingURL=bundle-uri.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundle-uri.d.ts","sourceRoot":"","sources":["../../../src/commands/bundle/bundle-uri.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,UAAU,EAAgD,MAAM,kBAAkB,CAAC;AAE5F,6DAA6D;AAC7D,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAAC;IACvD;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9C,uFAAuF;IACvF,aAAa,IAAI,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3C,oEAAoE;IACpE,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/C,iEAAiE;IACjE,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B;;;OAGG;IACH,YAAY,CAAC,IAAI,MAAM,CAAC;CACzB;AAKD,iFAAiF;AACjF,wBAAgB,QAAQ,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAEnD;AAgKD;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,aAAa,EACnB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,YAAY,EAAE,OAAO,CAAA;CAAE,CAAC,CAOjD;AAED;;;GAGG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,CAM7F"}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * bundle.c's reading side without a command: a bundle's bytes read (`read_bundle_header`)
3
+ * and checked against a repository (`verify_bundle`), as the bundle commands and the bundle
4
+ * transport do.
5
+ */
6
+ import { type History, type ObjectId } from "@statewalker/vcs-core";
7
+ import { type BundleHeader } from "./bundle-format.js";
8
+ /** git's text and exit status for a bundle command. */
9
+ export interface BundleCommandResult {
10
+ /** 0, or git's exit status (1 for an `error()` return) */
11
+ exitCode: number;
12
+ /** What git prints on stdout */
13
+ stdout: string;
14
+ /** What git prints on stderr (`error:` lines, `<file> is okay`) */
15
+ stderr: string;
16
+ }
17
+ /** How {@link BundleCommandBase.verifyBundle} reports (bundle.h `verify_bundle_flags`). */
18
+ export interface VerifyBundleOptions {
19
+ /** VERIFY_BUNDLE_VERBOSE: the refs, the prerequisites, the hash and filter on stdout */
20
+ verbose?: boolean;
21
+ /** VERIFY_BUNDLE_QUIET: no line per missing prerequisite */
22
+ quiet?: boolean;
23
+ }
24
+ /** A bundle's bytes as the commands take them: whole, or a stream of chunks. */
25
+ export type BundleInput = Uint8Array | AsyncIterable<Uint8Array> | Iterable<Uint8Array>;
26
+ /** The bytes of a {@link BundleInput}, collected. */
27
+ export declare function bundleBytes(input: BundleInput): Promise<Uint8Array>;
28
+ /** A bundle read: its header and its pack. */
29
+ export interface OpenedBundle {
30
+ header: BundleHeader;
31
+ pack: Uint8Array;
32
+ }
33
+ /**
34
+ * builtin/bundle.c's `open_bundle` (`read_bundle_header`): the header and the pack, or git's
35
+ * `error:` line (the bundle reported as `name`: its path, `<stdin>` for `-`).
36
+ */
37
+ export declare function openBundle(bytes: Uint8Array, name: string): {
38
+ ok: true;
39
+ bundle: OpenedBundle;
40
+ } | {
41
+ ok: false;
42
+ error: string;
43
+ };
44
+ /** What {@link verifyBundleIn} reads of a repository. */
45
+ export interface BundleVerifyRepository {
46
+ history: History;
47
+ /** What `rev-list --all` starts from: every ref's value and HEAD's */
48
+ refValues(): Promise<ObjectId[]>;
49
+ /** The repository's shallow commits */
50
+ shallow(): Promise<ObjectId[]>;
51
+ }
52
+ /**
53
+ * bundle.c's `verify_bundle`: every prerequisite must be an object here (each missing one
54
+ * on an `error:` line after `Repository lacks these prerequisite commits:`, unless quiet),
55
+ * then connected to the refs (`check_connected` of the prerequisites, `--not --all`); with
56
+ * `verbose`, what the bundle holds on stdout.
57
+ */
58
+ export declare function verifyBundleIn(repository: BundleVerifyRepository, header: BundleHeader, options?: VerifyBundleOptions): Promise<{
59
+ ok: boolean;
60
+ stdout: string;
61
+ stderr: string;
62
+ }>;
63
+ //# sourceMappingURL=bundle-verify.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundle-verify.d.ts","sourceRoot":"","sources":["../../../src/commands/bundle/bundle-verify.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,OAAO,EAA2B,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAG7F,OAAO,EAAE,KAAK,YAAY,EAAqC,MAAM,oBAAoB,CAAC;AAE1F,uDAAuD;AACvD,MAAM,WAAW,mBAAmB;IAClC,0DAA0D;IAC1D,QAAQ,EAAE,MAAM,CAAC;IACjB,gCAAgC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,mEAAmE;IACnE,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,2FAA2F;AAC3F,MAAM,WAAW,mBAAmB;IAClC,wFAAwF;IACxF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,gFAAgF;AAChF,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,aAAa,CAAC,UAAU,CAAC,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC;AAExF,qDAAqD;AACrD,wBAAsB,WAAW,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CAezE;AAED,8CAA8C;AAC9C,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,YAAY,CAAC;IACrB,IAAI,EAAE,UAAU,CAAC;CAClB;AAED;;;GAGG;AACH,wBAAgB,UAAU,CACxB,KAAK,EAAE,UAAU,EACjB,IAAI,EAAE,MAAM,GACX;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,YAAY,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAInE;AAED,yDAAyD;AACzD,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,OAAO,CAAC;IACjB,sEAAsE;IACtE,SAAS,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IACjC,uCAAuC;IACvC,OAAO,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;CAChC;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,UAAU,EAAE,sBAAsB,EAClC,MAAM,EAAE,YAAY,EACpB,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAkD1D"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * git's bundles: `git bundle create`, `verify`, `list-heads`, `unbundle`, the format (v2 and
3
+ * v3, bundle.c) and the bundle transport fetch, clone and ls-remote read a bundle file through.
4
+ */
5
+ export * from "./bundle-create-command.js";
6
+ export * from "./bundle-format.js";
7
+ export * from "./bundle-list.js";
8
+ export * from "./bundle-read-commands.js";
9
+ export * from "./bundle-support.js";
10
+ export * from "./bundle-transport.js";
11
+ export * from "./bundle-uri.js";
12
+ export * from "./bundle-uri-host.js";
13
+ export * from "./bundle-verify.js";
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/bundle/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * cat-file's `--batch` format (builtin/cat-file.c `expand_format`/`expand_atom`): the atoms
3
+ * a format names, checked once before any input is read (git's `mark_query` pass), then
4
+ * expanded per object.
5
+ */
6
+ import { PlumbingError } from "../plumbing-command.js";
7
+ /** What one object expands with. */
8
+ export interface BatchObjectData {
9
+ id: string;
10
+ type?: string;
11
+ size?: number;
12
+ /** The tree or index entry's mode (`<rev>:<path>`), undefined otherwise */
13
+ mode?: number;
14
+ /** `%(rest)`: the input line after the object name and its whitespace */
15
+ rest?: string;
16
+ }
17
+ type Part = string | {
18
+ atom: "objectname" | "objecttype" | "objectsize" | "rest" | "objectmode" | "objectsize:disk" | "deltabase";
19
+ };
20
+ /** A parsed format and what it needs read. */
21
+ export interface BatchFormat {
22
+ parts: Part[];
23
+ /** `%(objecttype)` (or contents) needs the type */
24
+ needsType: boolean;
25
+ needsSize: boolean;
26
+ /** `%(rest)`: input lines are split at their first whitespace */
27
+ splitOnWhitespace: boolean;
28
+ /**
29
+ * An atom the stores cannot answer (`objectsize:disk`, `deltabase`), kept by a parse with
30
+ * `deferUnsupported`: refused only when a local object needs it (`remote-object-info`
31
+ * expands it to nothing, as git)
32
+ */
33
+ unsupported?: string;
34
+ }
35
+ /** The default format, `%(objectname) %(objecttype) %(objectsize)`. */
36
+ export declare const DEFAULT_BATCH_FORMAT = "%(objectname) %(objecttype) %(objectsize)";
37
+ /**
38
+ * Parses `format` as git's mark_query pass reads it: an atom git does not know dies there
39
+ * (2.43 `unknown format element: <atom>`, 2.5x `bad cat-file format: %(<atom>)`).
40
+ * `%(objectsize:disk)` and `%(deltabase)` are refused: the stores do not report on-disk sizes
41
+ * or delta bases, and printing a made-up value would lie.
42
+ */
43
+ export declare function parseBatchFormat(format: string, compatibility: "2.43" | "2.56", options?: {
44
+ deferUnsupported?: boolean;
45
+ }): BatchFormat;
46
+ /** The refusal of an atom the stores cannot answer (see {@link BatchFormat.unsupported}). */
47
+ export declare function unsupportedAtom(atom: string): PlumbingError;
48
+ /**
49
+ * The format expanded for one object. With `remote` (an object `remote-object-info` asked
50
+ * about), an atom the server did not answer expands to nothing, as git's `expand_atom` with
51
+ * `is_remote`: `%(objectname)` always, `%(objectsize)` and `%(objecttype)` when answered.
52
+ */
53
+ export declare function expandBatchFormat(format: BatchFormat, data: BatchObjectData, remote?: {
54
+ size: boolean;
55
+ type: boolean;
56
+ }): string;
57
+ export {};
58
+ //# sourceMappingURL=batch-format.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"batch-format.d.ts","sourceRoot":"","sources":["../../../src/commands/cat-file/batch-format.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,oCAAoC;AACpC,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,KAAK,IAAI,GACL,MAAM,GACN;IACE,IAAI,EACA,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,MAAM,GACN,YAAY,GACZ,iBAAiB,GACjB,WAAW,CAAC;CACjB,CAAC;AAEN,8CAA8C;AAC9C,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,mDAAmD;IACnD,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,iEAAiE;IACjE,iBAAiB,EAAE,OAAO,CAAC;IAC3B;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,uEAAuE;AACvE,eAAO,MAAM,oBAAoB,8CAA8C,CAAC;AAEhF;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,MAAM,GAAG,MAAM,EAC9B,OAAO,GAAE;IAAE,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAAO,GAC3C,WAAW,CAoEb;AAED,6FAA6F;AAC7F,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,CAE3D;AAUD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,WAAW,EACnB,IAAI,EAAE,eAAe,EACrB,MAAM,CAAC,EAAE;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,GACxC,MAAM,CAuCR"}
@@ -0,0 +1,144 @@
1
+ /**
2
+ * `git cat-file` (builtin/cat-file.c): an object's type, size, existence or content, one
3
+ * object named on the command line (`-t`, `-s`, `-e`, `-p`, `<type> <object>`) or many read
4
+ * from stdin (`--batch`, `--batch-check`, `--batch-command`, `--batch-all-objects`).
5
+ *
6
+ * @example
7
+ * ```typescript
8
+ * // git cat-file -p HEAD:README.md
9
+ * await git.catFile().setMode("pretty").setObject("HEAD:README.md").setStdout(write).call();
10
+ * // printf 'HEAD\nHEAD:a.txt\n' | git cat-file --batch-check
11
+ * const { stdout } = await git.catFile().setBatch("info").setStdin("HEAD\nHEAD:a.txt\n").callOutput();
12
+ * ```
13
+ */
14
+ import { PlumbingCommand } from "../plumbing-command.js";
15
+ import { RemoteObjectInfoCommand } from "../remote-object-info-command.js";
16
+ /** `-t`, `-s`, `-e`, `-p`. */
17
+ export type CatFileMode = "type" | "size" | "exists" | "pretty";
18
+ /** `--batch` (contents), `--batch-check` (info), `--batch-command` (command). */
19
+ export type CatFileBatchMode = "contents" | "info" | "command";
20
+ /** What `--batch*` reads as stdin: text, bytes, or chunks read as they come. */
21
+ export type CatFileInput = string | Uint8Array | AsyncIterable<Uint8Array> | Iterable<Uint8Array>;
22
+ /**
23
+ * `git cat-file`. Stdout goes to {@link setStdout} as git writes it: a blob's content is
24
+ * streamed chunk by chunk as the store reads it (never held whole), and `--batch` input is
25
+ * read line by line as {@link setStdin}'s chunks arrive, so a caller can feed names while it
26
+ * reads the answers.
27
+ *
28
+ * Replace refs apply as in git (`OBJECT_INFO_LOOKUP_REPLACE`): the name printed is the one
29
+ * asked, the type, size and content the replacement's; `--batch-all-objects` reads none.
30
+ *
31
+ * `--batch-command`'s `remote-object-info <remote> <id>...` (2.56) asks the remote's v2
32
+ * `object-info` through {@link setRemoteObjectInfo}'s command: only the atoms the server
33
+ * answered expand (`%(objectname)` always), and an object it lacks prints `<id> missing`.
34
+ *
35
+ * Not implemented: `--textconv`, `--filters`, `--path`, `--follow-symlinks`, `--filter`
36
+ * (2.5x), and the `%(objectsize:disk)` and `%(deltabase)` atoms (refused: the stores report
37
+ * neither; git's `remote-object-info` would print them empty). `--unordered` lists objects in
38
+ * the store's listing order, not pack order. The promisor-remote warning of
39
+ * `--batch-all-objects` is not printed.
40
+ */
41
+ export declare class CatFileCommand extends PlumbingCommand {
42
+ private mode?;
43
+ private type?;
44
+ private object?;
45
+ private batch?;
46
+ private format?;
47
+ private buffer?;
48
+ private nulInput;
49
+ private nulTerminated;
50
+ private allObjects;
51
+ private unordered;
52
+ private useMailmap;
53
+ private stdin?;
54
+ private compatibility;
55
+ /** `-t` (type), `-s` (size), `-e` (exists: exit 1 when absent), `-p` (pretty). */
56
+ setMode(mode: CatFileMode): this;
57
+ /** `<type> <object>`: the object peeled to this type (`blob`, `tree`, `commit`, `tag`). */
58
+ setType(type: string): this;
59
+ /** The object named on the command line. */
60
+ setObject(name: string): this;
61
+ /**
62
+ * `--batch[=<format>]` (`contents`), `--batch-check[=<format>]` (`info`),
63
+ * `--batch-command[=<format>]` (`command`).
64
+ */
65
+ setBatch(mode: CatFileBatchMode, format?: string): this;
66
+ /** `--buffer` (`--batch-command`'s `flush` needs it; output itself is the same). */
67
+ setBuffer(buffer: boolean): this;
68
+ /** `-z`: stdin is NUL-terminated. */
69
+ setNulInput(nul: boolean): this;
70
+ /** `-Z`: stdin and stdout are NUL-terminated. */
71
+ setNulTerminated(nul: boolean): this;
72
+ /** `--batch-all-objects`: every object of the repository, stdin ignored. */
73
+ setBatchAllObjects(all: boolean): this;
74
+ /** `--unordered` (with `--batch-all-objects`): the store's order, not sorted by id. */
75
+ setUnordered(unordered: boolean): this;
76
+ /**
77
+ * The `remote-object-info` command a `--batch-command` line runs (default: one over the
78
+ * default transports; `Git.catFile()` gives the facade's): its credentials and transports.
79
+ */
80
+ setRemoteObjectInfo(factory: () => RemoteObjectInfoCommand): this;
81
+ private remoteObjectInfoFactory?;
82
+ /** `--use-mailmap`: idents of commits and tags mapped through the mailmap. */
83
+ setUseMailmap(use: boolean): this;
84
+ /** The batch modes' stdin. */
85
+ setStdin(input: CatFileInput): this;
86
+ /** The git version whose behaviour to follow (default 2.56). */
87
+ setCompatibility(version: "2.43" | "2.56"): this;
88
+ protected writesNoObjects(): boolean;
89
+ protected run(): Promise<number>;
90
+ /** The option checks of cmd_cat_file that the setters can still break. */
91
+ private checkOptions;
92
+ private get objects();
93
+ /** `lookup_replace_object`: the object reads go to. */
94
+ private replaced;
95
+ /** `oid_object_info`: type and size from the headers, else from a read. */
96
+ private info;
97
+ /** The whole content of a (small) object. */
98
+ private read;
99
+ /** `stream_blob`: the blob's content written chunk by chunk. */
100
+ private streamBlob;
101
+ private mailmapped?;
102
+ /** `replace_idents_using_mailmap` (identity without `--use-mailmap`). */
103
+ private mapIdents;
104
+ /** cat_one_file */
105
+ private catOne;
106
+ /** The compatibility objects when `id` is an id of the compatibility format (not storage's) */
107
+ private compatIdOf;
108
+ /**
109
+ * cat_one_file for an id of the compatibility format: the object read through the map and
110
+ * converted (`odb_read_object_info_extended` with an id of the other format).
111
+ */
112
+ private catOneCompat;
113
+ /** `-p` */
114
+ private pretty;
115
+ /** `git ls-tree <tree>`, as `-p` prints a tree. */
116
+ private listTree;
117
+ /** `<type> <object>` */
118
+ private catTyped;
119
+ /** `odb_read_object_peeled`: tags followed, a commit's tree for a tree. */
120
+ private peeled;
121
+ /** batch_objects */
122
+ private runBatch;
123
+ /** batch_objects_command: `contents`, `info`, `flush` (and 2.5x's `mailmap`). */
124
+ private batchCommands;
125
+ /**
126
+ * parse_cmd_remote_object_info: `<remote> <id>...` split as git's `split_cmdline` (quotes
127
+ * and backslashes), the ids checked before the remote is asked, then one line per id in
128
+ * order: `<id> missing` for an object the server lacks, else the format with only the
129
+ * atoms the server answered (the default format prints the type and size it got).
130
+ */
131
+ private remoteObjectInfo;
132
+ /** batch_one_object */
133
+ private batchOne;
134
+ /**
135
+ * batch_object_write for an id of the compatibility format (`GET_OID_HASH_ANY` in
136
+ * batch_one_object): the object read through the map and converted, so its id, type, size
137
+ * and content are the compatibility format's. Replace refs are storage ids: they do not
138
+ * apply to it.
139
+ */
140
+ private batchCompatWrite;
141
+ /** batch_object_write */
142
+ private batchObjectWrite;
143
+ }
144
+ //# sourceMappingURL=cat-file-command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cat-file-command.d.ts","sourceRoot":"","sources":["../../../src/commands/cat-file/cat-file-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAaH,OAAO,EAAE,eAAe,EAAiB,MAAM,wBAAwB,CAAC;AACxE,OAAO,EACL,uBAAuB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3B;;;;;OAKG;YACW,gBAAgB;IAiE9B,uBAAuB;YACT,QAAQ;IAyBtB;;;;;OAKG;YACW,gBAAgB;IA0B9B,yBAAyB;YACX,gBAAgB;CA6C/B"}
@@ -0,0 +1,3 @@
1
+ export * from "./batch-format.js";
2
+ export * from "./cat-file-command.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/cat-file/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,66 @@
1
+ /**
2
+ * `git check-attr` (builtin/check-attr.c): the attributes of paths as git's attribute
3
+ * stack gives them, from the worktree's `.gitattributes` files (then the index's), the
4
+ * index's alone (`--cached`), or a tree's (`--source`).
5
+ *
6
+ * @example
7
+ * ```typescript
8
+ * // git check-attr text eol -- a.txt
9
+ * await git.checkAttr().addAttribute("text").addAttribute("eol").addPath("a.txt").call();
10
+ * // { exitCode: 0, stdout: "a.txt: text: set\na.txt: eol: unspecified\n", stderr: "" }
11
+ * ```
12
+ */
13
+ import { GitCommand } from "../git-command.js";
14
+ import type { PlumbingTextOutput } from "./check-ref-format-command.js";
15
+ /**
16
+ * An attributes file's message as git prints it: its `warning()`s (negative patterns, an
17
+ * overly long line or large file) prefixed, the others (an invalid name, a macro where none
18
+ * is allowed) as they are.
19
+ */
20
+ export declare function attributeWarningLine(message: string): string;
21
+ /**
22
+ * `git check-attr [--source <tree-ish>] [--cached] [-a | <attr>...] [--] <pathname>...` or
23
+ * with `--stdin` [-z]: one line per path and attribute, `<path>: <attr>: <value>` (the path
24
+ * as given, C-quoted as `core.quotePath` asks), the value `set`, `unset`, `unspecified` or
25
+ * the string. `--all` lists the attributes a path has, in the order git first read their
26
+ * names. git's argument errors give its usage (129); an invalid attribute name exits 255, a
27
+ * bad `--source` 128. Paths are read against {@link setCurrentDirectory}. git 2.5x computes
28
+ * `builtin_objectmode` (the path's mode in the worktree, or the index's with `--cached`).
29
+ */
30
+ export declare class CheckAttrCommand extends GitCommand<PlumbingTextOutput> {
31
+ private readonly attributes;
32
+ private readonly paths;
33
+ private all;
34
+ private cached;
35
+ private stdin?;
36
+ private nul;
37
+ private source?;
38
+ private prefix;
39
+ private compatibility;
40
+ /** An attribute to report. */
41
+ addAttribute(name: string): this;
42
+ /** A path to check. */
43
+ addPath(path: string): this;
44
+ /** `--all`: every attribute set on each path. */
45
+ setAll(all: boolean): this;
46
+ /** `--cached`: the index's `.gitattributes` files only. */
47
+ setCached(cached: boolean): this;
48
+ /** `--stdin`: the paths of this input (git's stdin). */
49
+ setStdin(input: string | Uint8Array): this;
50
+ /** `-z`: NUL-terminated input records and output fields. */
51
+ setNulTerminated(nul: boolean): this;
52
+ /** `--source <tree-ish>`: the in-tree files of this tree-ish. */
53
+ setSource(treeish: string | undefined): this;
54
+ /** The directory git runs in, from the top of the worktree (paths are relative to it). */
55
+ setCurrentDirectory(dir: string): this;
56
+ /** The git version whose behaviour to follow (default 2.56). */
57
+ setCompatibility(version: "2.43" | "2.56"): this;
58
+ call(): Promise<PlumbingTextOutput>;
59
+ /** The worktree; undefined in a bare repository. */
60
+ private worktreeIfAny;
61
+ /** Where the attributes come from: the content filter's stack, or the bare resolver's. */
62
+ private reader;
63
+ /** attr.c's `builtin_object_mode_attr`: the mode as `%06o`, or unspecified. */
64
+ private objectMode;
65
+ }
66
+ //# sourceMappingURL=check-attr-command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-attr-command.d.ts","sourceRoot":"","sources":["../../src/commands/check-attr-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAUH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAoBxE;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,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}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * `git check-ignore` (builtin/check-ignore.c): which paths the ignore rules exclude, and with
3
+ * `-v` the pattern that decides (`<source>:<line>:<pattern>\t<path>`).
4
+ *
5
+ * @example
6
+ * ```typescript
7
+ * // git check-ignore -v build/out.o
8
+ * await git.checkIgnore().setVerbose(true).addPath("build/out.o").call();
9
+ * // { exitCode: 0, stdout: ".gitignore:1:build/\tbuild/out.o\n", stderr: "" }
10
+ * ```
11
+ */
12
+ import { GitCommand } from "../git-command.js";
13
+ import type { PlumbingTextOutput } from "./check-ref-format-command.js";
14
+ /**
15
+ * `git check-ignore [-q] [-v [-n]] [--no-index] (<pathname>... | --stdin [-z])`: each path the
16
+ * ignore rules exclude is printed (as given, C-quoted as `core.quotePath` asks); with `-v`
17
+ * the deciding pattern before it, negated patterns too, and with `-n` the paths no pattern
18
+ * matches (`::\t<path>`). A path the index holds (or a directory holding one) is never
19
+ * checked, unless `--no-index`. Exit status 0 when a path was printed with a pattern, 1 when
20
+ * none, 128 for git's deaths (its argument errors, a path beyond a symbolic link or inside a
21
+ * submodule, a bare repository). Paths are read against {@link setCurrentDirectory}.
22
+ */
23
+ export declare class CheckIgnoreCommand extends GitCommand<PlumbingTextOutput> {
24
+ private readonly paths;
25
+ private stdin?;
26
+ private nul;
27
+ private quiet;
28
+ private verbose;
29
+ private nonMatching;
30
+ private noIndex;
31
+ private prefix;
32
+ /** A path to check. */
33
+ addPath(path: string): this;
34
+ /** `--stdin`: the paths of this input (git's stdin). */
35
+ setStdin(input: string | Uint8Array): this;
36
+ /** `-z`: NUL-terminated input and output records. */
37
+ setNulTerminated(nul: boolean): this;
38
+ /** `-q`: print nothing, only the exit status. */
39
+ setQuiet(quiet: boolean): this;
40
+ /** `-v`: the deciding pattern too. */
41
+ setVerbose(verbose: boolean): this;
42
+ /** `-n` (with `-v`): the paths no pattern matches too. */
43
+ setNonMatching(nonMatching: boolean): this;
44
+ /** `--no-index`: paths the index holds are checked too. */
45
+ setNoIndex(noIndex: boolean): this;
46
+ /** The directory git runs in, from the top of the worktree (paths are relative to it). */
47
+ setCurrentDirectory(dir: string): this;
48
+ call(): Promise<PlumbingTextOutput>;
49
+ /** One output record (`output_pattern`). */
50
+ private line;
51
+ /** The index's entries git asks (`PS_HEED_SKIP_WORKTREE`: skip-worktree ones left out). */
52
+ private indexEntries;
53
+ /** `find_pathspecs_matching_against_index`: whether the element names an index entry. */
54
+ private seenInIndex;
55
+ /** How git names the exclude files in `-v` lines. */
56
+ private sourceNames;
57
+ }
58
+ //# sourceMappingURL=check-ignore-command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-ignore-command.d.ts","sourceRoot":"","sources":["../../src/commands/check-ignore-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAYxE;;;;;;;;GAQG;AACH,qBAAa,kBAAmB,SAAQ,UAAU,CAAC,kBAAkB,CAAC;IACpE,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IACtC,OAAO,CAAC,KAAK,CAAC,CAAa;IAC3B,OAAO,CAAC,GAAG,CAAS;IACpB,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,MAAM,CAAM;IAEpB,uBAAuB;IACvB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAI1B;IAED,wDAAwD;IACxD,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAIzC;IAED,qDAAqD;IACrD,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAInC;IAED,iDAAiD;IACjD,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAI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