@statewalker/vcs-commands 0.8.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (622) hide show
  1. package/README.md +1 -1
  2. package/dist/commands/add-command.d.ts +32 -0
  3. package/dist/commands/add-command.d.ts.map +1 -1
  4. package/dist/commands/add-patch/add-patch.d.ts +7 -0
  5. package/dist/commands/add-patch/add-patch.d.ts.map +1 -1
  6. package/dist/commands/add-patch/patch-backend.d.ts +2 -0
  7. package/dist/commands/add-patch/patch-backend.d.ts.map +1 -1
  8. package/dist/commands/add-patch/patch-modes.d.ts +6 -2
  9. package/dist/commands/add-patch/patch-modes.d.ts.map +1 -1
  10. package/dist/commands/add-patch/patch-session.d.ts +4 -0
  11. package/dist/commands/add-patch/patch-session.d.ts.map +1 -1
  12. package/dist/commands/am/am-command.d.ts +88 -2
  13. package/dist/commands/am/am-command.d.ts.map +1 -1
  14. package/dist/commands/apply/apply-command.d.ts +2 -0
  15. package/dist/commands/apply/apply-command.d.ts.map +1 -1
  16. package/dist/commands/apply/apply-parse.d.ts +7 -0
  17. package/dist/commands/apply/apply-parse.d.ts.map +1 -1
  18. package/dist/commands/apply/index.d.ts +1 -1
  19. package/dist/commands/apply/index.d.ts.map +1 -1
  20. package/dist/commands/archive/archive-command.d.ts +169 -0
  21. package/dist/commands/archive/archive-command.d.ts.map +1 -0
  22. package/dist/commands/archive/archive-entry.d.ts +60 -0
  23. package/dist/commands/archive/archive-entry.d.ts.map +1 -0
  24. package/dist/commands/archive/index.d.ts +8 -0
  25. package/dist/commands/archive/index.d.ts.map +1 -0
  26. package/dist/commands/archive/remote-archive-command.d.ts +56 -0
  27. package/dist/commands/archive/remote-archive-command.d.ts.map +1 -0
  28. package/dist/commands/archive/tar-archive.d.ts +31 -0
  29. package/dist/commands/archive/tar-archive.d.ts.map +1 -0
  30. package/dist/commands/archive/tar-commit-id.d.ts +13 -0
  31. package/dist/commands/archive/tar-commit-id.d.ts.map +1 -0
  32. package/dist/commands/archive/upload-archive-writer.d.ts +48 -0
  33. package/dist/commands/archive/upload-archive-writer.d.ts.map +1 -0
  34. package/dist/commands/archive/zip-archive.d.ts +42 -0
  35. package/dist/commands/archive/zip-archive.d.ts.map +1 -0
  36. package/dist/commands/attributes-source.d.ts +10 -0
  37. package/dist/commands/attributes-source.d.ts.map +1 -1
  38. package/dist/commands/blame-command.d.ts +345 -8
  39. package/dist/commands/blame-command.d.ts.map +1 -1
  40. package/dist/commands/blame-ignore.d.ts +48 -0
  41. package/dist/commands/blame-ignore.d.ts.map +1 -0
  42. package/dist/commands/bundle/bundle-create-command.d.ts +67 -0
  43. package/dist/commands/bundle/bundle-create-command.d.ts.map +1 -0
  44. package/dist/commands/bundle/bundle-format.d.ts +89 -0
  45. package/dist/commands/bundle/bundle-format.d.ts.map +1 -0
  46. package/dist/commands/bundle/bundle-list.d.ts +92 -0
  47. package/dist/commands/bundle/bundle-list.d.ts.map +1 -0
  48. package/dist/commands/bundle/bundle-read-commands.d.ts +81 -0
  49. package/dist/commands/bundle/bundle-read-commands.d.ts.map +1 -0
  50. package/dist/commands/bundle/bundle-support.d.ts +32 -0
  51. package/dist/commands/bundle/bundle-support.d.ts.map +1 -0
  52. package/dist/commands/bundle/bundle-transport.d.ts +38 -0
  53. package/dist/commands/bundle/bundle-transport.d.ts.map +1 -0
  54. package/dist/commands/bundle/bundle-uri-host.d.ts +43 -0
  55. package/dist/commands/bundle/bundle-uri-host.d.ts.map +1 -0
  56. package/dist/commands/bundle/bundle-uri.d.ts +55 -0
  57. package/dist/commands/bundle/bundle-uri.d.ts.map +1 -0
  58. package/dist/commands/bundle/bundle-verify.d.ts +63 -0
  59. package/dist/commands/bundle/bundle-verify.d.ts.map +1 -0
  60. package/dist/commands/bundle/index.d.ts +14 -0
  61. package/dist/commands/bundle/index.d.ts.map +1 -0
  62. package/dist/commands/cat-file/batch-format.d.ts +58 -0
  63. package/dist/commands/cat-file/batch-format.d.ts.map +1 -0
  64. package/dist/commands/cat-file/cat-file-command.d.ts +135 -0
  65. package/dist/commands/cat-file/cat-file-command.d.ts.map +1 -0
  66. package/dist/commands/cat-file/index.d.ts +3 -0
  67. package/dist/commands/cat-file/index.d.ts.map +1 -0
  68. package/dist/commands/check-attr-command.d.ts +66 -0
  69. package/dist/commands/check-attr-command.d.ts.map +1 -0
  70. package/dist/commands/check-ignore-command.d.ts +58 -0
  71. package/dist/commands/check-ignore-command.d.ts.map +1 -0
  72. package/dist/commands/check-mailmap-command.d.ts +49 -0
  73. package/dist/commands/check-mailmap-command.d.ts.map +1 -0
  74. package/dist/commands/check-ref-format-command.d.ts +60 -0
  75. package/dist/commands/check-ref-format-command.d.ts.map +1 -0
  76. package/dist/commands/checkout-command.d.ts +7 -0
  77. package/dist/commands/checkout-command.d.ts.map +1 -1
  78. package/dist/commands/checkout-index-command.d.ts +96 -0
  79. package/dist/commands/checkout-index-command.d.ts.map +1 -0
  80. package/dist/commands/checkout-paths.d.ts +4 -0
  81. package/dist/commands/checkout-paths.d.ts.map +1 -1
  82. package/dist/commands/cherry-command.d.ts +61 -0
  83. package/dist/commands/cherry-command.d.ts.map +1 -0
  84. package/dist/commands/cherry-pick-command.d.ts +33 -1
  85. package/dist/commands/cherry-pick-command.d.ts.map +1 -1
  86. package/dist/commands/clean-command.d.ts +32 -0
  87. package/dist/commands/clean-command.d.ts.map +1 -1
  88. package/dist/commands/clean-interactive.d.ts +56 -0
  89. package/dist/commands/clean-interactive.d.ts.map +1 -0
  90. package/dist/commands/clone-command.d.ts +135 -2
  91. package/dist/commands/clone-command.d.ts.map +1 -1
  92. package/dist/commands/commit-command.d.ts +59 -3
  93. package/dist/commands/commit-command.d.ts.map +1 -1
  94. package/dist/commands/config-command.d.ts +2 -0
  95. package/dist/commands/config-command.d.ts.map +1 -1
  96. package/dist/commands/daemon-access-hook.d.ts +36 -0
  97. package/dist/commands/daemon-access-hook.d.ts.map +1 -0
  98. package/dist/commands/default-branch.d.ts +42 -0
  99. package/dist/commands/default-branch.d.ts.map +1 -1
  100. package/dist/commands/describe-command.d.ts +71 -64
  101. package/dist/commands/describe-command.d.ts.map +1 -1
  102. package/dist/commands/diff-command.d.ts +249 -10
  103. package/dist/commands/diff-command.d.ts.map +1 -1
  104. package/dist/commands/diff-external.d.ts +43 -0
  105. package/dist/commands/diff-external.d.ts.map +1 -0
  106. package/dist/commands/diff-plumbing/diff-pairs-command.d.ts +27 -0
  107. package/dist/commands/diff-plumbing/diff-pairs-command.d.ts.map +1 -0
  108. package/dist/commands/diff-plumbing/diff-plumbing-command.d.ts +129 -0
  109. package/dist/commands/diff-plumbing/diff-plumbing-command.d.ts.map +1 -0
  110. package/dist/commands/diff-plumbing/index.d.ts +3 -0
  111. package/dist/commands/diff-plumbing/index.d.ts.map +1 -0
  112. package/dist/commands/diff-textconv.d.ts +5 -1
  113. package/dist/commands/diff-textconv.d.ts.map +1 -1
  114. package/dist/commands/fast-export/fast-export-command.d.ts +135 -0
  115. package/dist/commands/fast-export/fast-export-command.d.ts.map +1 -0
  116. package/dist/commands/fast-export/fast-import-command.d.ts +182 -0
  117. package/dist/commands/fast-export/fast-import-command.d.ts.map +1 -0
  118. package/dist/commands/fast-export/fast-stream-support.d.ts +64 -0
  119. package/dist/commands/fast-export/fast-stream-support.d.ts.map +1 -0
  120. package/dist/commands/fast-export/index.d.ts +4 -0
  121. package/dist/commands/fast-export/index.d.ts.map +1 -0
  122. package/dist/commands/fetch-command.d.ts +125 -0
  123. package/dist/commands/fetch-command.d.ts.map +1 -1
  124. package/dist/commands/fetch-multiple-command.d.ts +193 -0
  125. package/dist/commands/fetch-multiple-command.d.ts.map +1 -0
  126. package/dist/commands/format-patch-command.d.ts +28 -2
  127. package/dist/commands/format-patch-command.d.ts.map +1 -1
  128. package/dist/commands/format-rev-command.d.ts +58 -0
  129. package/dist/commands/format-rev-command.d.ts.map +1 -0
  130. package/dist/commands/fsck/fsck-command.d.ts.map +1 -1
  131. package/dist/commands/fsck/fsck-msg-ids.d.ts +18 -3
  132. package/dist/commands/fsck/fsck-msg-ids.d.ts.map +1 -1
  133. package/dist/commands/fsmonitor-refresh.d.ts +69 -0
  134. package/dist/commands/fsmonitor-refresh.d.ts.map +1 -0
  135. package/dist/commands/gc-command.d.ts +5 -0
  136. package/dist/commands/gc-command.d.ts.map +1 -1
  137. package/dist/commands/git-describe.d.ts +77 -4
  138. package/dist/commands/git-describe.d.ts.map +1 -1
  139. package/dist/commands/git-hooks.d.ts +47 -1
  140. package/dist/commands/git-hooks.d.ts.map +1 -1
  141. package/dist/commands/git-paths.d.ts +26 -0
  142. package/dist/commands/git-paths.d.ts.map +1 -0
  143. package/dist/commands/grep/grep-command.d.ts +2 -1
  144. package/dist/commands/grep/grep-command.d.ts.map +1 -1
  145. package/dist/commands/history-command.d.ts +156 -0
  146. package/dist/commands/history-command.d.ts.map +1 -0
  147. package/dist/commands/http-config.d.ts +38 -0
  148. package/dist/commands/http-config.d.ts.map +1 -0
  149. package/dist/commands/index-adder.d.ts +12 -1
  150. package/dist/commands/index-adder.d.ts.map +1 -1
  151. package/dist/commands/index-host.d.ts.map +1 -1
  152. package/dist/commands/index.d.ts +56 -1
  153. package/dist/commands/index.d.ts.map +1 -1
  154. package/dist/commands/index.js +6 -3
  155. package/dist/commands/init-command.d.ts +89 -0
  156. package/dist/commands/init-command.d.ts.map +1 -1
  157. package/dist/commands/last-modified-command.d.ts +102 -0
  158. package/dist/commands/last-modified-command.d.ts.map +1 -0
  159. package/dist/commands/lfs/go-url.d.ts +43 -0
  160. package/dist/commands/lfs/go-url.d.ts.map +1 -0
  161. package/dist/commands/lfs/index.d.ts +3 -0
  162. package/dist/commands/lfs/index.d.ts.map +1 -0
  163. package/dist/commands/lfs/lfs-config.d.ts +174 -0
  164. package/dist/commands/lfs/lfs-config.d.ts.map +1 -0
  165. package/dist/commands/lfs/lfs-endpoint-command.d.ts +83 -0
  166. package/dist/commands/lfs/lfs-endpoint-command.d.ts.map +1 -0
  167. package/dist/commands/line-log.d.ts +161 -0
  168. package/dist/commands/line-log.d.ts.map +1 -0
  169. package/dist/commands/local-transport.d.ts.map +1 -1
  170. package/dist/commands/log-command.d.ts +261 -6
  171. package/dist/commands/log-command.d.ts.map +1 -1
  172. package/dist/commands/log-graph.d.ts +4 -2
  173. package/dist/commands/log-graph.d.ts.map +1 -1
  174. package/dist/commands/log-output.d.ts +88 -2
  175. package/dist/commands/log-output.d.ts.map +1 -1
  176. package/dist/commands/ls-files-command.d.ts +153 -0
  177. package/dist/commands/ls-files-command.d.ts.map +1 -0
  178. package/dist/commands/ls-remote-command.d.ts +5 -0
  179. package/dist/commands/ls-remote-command.d.ts.map +1 -1
  180. package/dist/commands/ls-tree-command.d.ts +105 -0
  181. package/dist/commands/ls-tree-command.d.ts.map +1 -0
  182. package/dist/commands/mailmap.d.ts +24 -1
  183. package/dist/commands/mailmap.d.ts.map +1 -1
  184. package/dist/commands/maintenance-run-command.d.ts +122 -0
  185. package/dist/commands/maintenance-run-command.d.ts.map +1 -0
  186. package/dist/commands/merge-command.d.ts +58 -1
  187. package/dist/commands/merge-command.d.ts.map +1 -1
  188. package/dist/commands/merge-config.d.ts +7 -0
  189. package/dist/commands/merge-config.d.ts.map +1 -1
  190. package/dist/commands/merge-drivers.d.ts +69 -5
  191. package/dist/commands/merge-drivers.d.ts.map +1 -1
  192. package/dist/commands/merge-strategy-options.d.ts +69 -0
  193. package/dist/commands/merge-strategy-options.d.ts.map +1 -0
  194. package/dist/commands/merge-support.d.ts +16 -0
  195. package/dist/commands/merge-support.d.ts.map +1 -1
  196. package/dist/commands/merge-tree-command.d.ts +122 -0
  197. package/dist/commands/merge-tree-command.d.ts.map +1 -0
  198. package/dist/commands/message-cleanup.d.ts +2 -0
  199. package/dist/commands/message-cleanup.d.ts.map +1 -1
  200. package/dist/commands/mktag-command.d.ts +51 -0
  201. package/dist/commands/mktag-command.d.ts.map +1 -0
  202. package/dist/commands/name-rev-command.d.ts +65 -0
  203. package/dist/commands/name-rev-command.d.ts.map +1 -0
  204. package/dist/commands/name-rev.d.ts +110 -22
  205. package/dist/commands/name-rev.d.ts.map +1 -1
  206. package/dist/commands/object-store/count-objects-command.d.ts +58 -0
  207. package/dist/commands/object-store/count-objects-command.d.ts.map +1 -0
  208. package/dist/commands/object-store/index.d.ts +5 -0
  209. package/dist/commands/object-store/index.d.ts.map +1 -0
  210. package/dist/commands/object-store/objects-directory.d.ts +12 -0
  211. package/dist/commands/object-store/objects-directory.d.ts.map +1 -0
  212. package/dist/commands/object-store/prune-command.d.ts +38 -0
  213. package/dist/commands/object-store/prune-command.d.ts.map +1 -0
  214. package/dist/commands/object-store/show-index-command.d.ts +23 -0
  215. package/dist/commands/object-store/show-index-command.d.ts.map +1 -0
  216. package/dist/commands/octopus-merge.d.ts +26 -1
  217. package/dist/commands/octopus-merge.d.ts.map +1 -1
  218. package/dist/commands/ort-merge.d.ts +40 -0
  219. package/dist/commands/ort-merge.d.ts.map +1 -1
  220. package/dist/commands/ort-recursive.d.ts.map +1 -1
  221. package/dist/commands/patch-id-command.d.ts +30 -0
  222. package/dist/commands/patch-id-command.d.ts.map +1 -0
  223. package/dist/commands/patch-id.d.ts +82 -0
  224. package/dist/commands/patch-id.d.ts.map +1 -1
  225. package/dist/commands/plumbing-command.d.ts +66 -0
  226. package/dist/commands/plumbing-command.d.ts.map +1 -0
  227. package/dist/commands/plumbing-input.d.ts +38 -0
  228. package/dist/commands/plumbing-input.d.ts.map +1 -0
  229. package/dist/commands/promisor-remote-reply.d.ts +35 -0
  230. package/dist/commands/promisor-remote-reply.d.ts.map +1 -0
  231. package/dist/commands/promisor-remote.d.ts.map +1 -1
  232. package/dist/commands/pull-command.d.ts +182 -38
  233. package/dist/commands/pull-command.d.ts.map +1 -1
  234. package/dist/commands/push-command.d.ts +82 -2
  235. package/dist/commands/push-command.d.ts.map +1 -1
  236. package/dist/commands/range-diff/index.d.ts +4 -0
  237. package/dist/commands/range-diff/index.d.ts.map +1 -0
  238. package/dist/commands/range-diff/linear-assignment.d.ts +27 -0
  239. package/dist/commands/range-diff/linear-assignment.d.ts.map +1 -0
  240. package/dist/commands/range-diff/range-diff-command.d.ts +121 -0
  241. package/dist/commands/range-diff/range-diff-command.d.ts.map +1 -0
  242. package/dist/commands/range-diff/range-diff.d.ts +106 -0
  243. package/dist/commands/range-diff/range-diff.d.ts.map +1 -0
  244. package/dist/commands/read-tree-command.d.ts +14 -0
  245. package/dist/commands/read-tree-command.d.ts.map +1 -1
  246. package/dist/commands/rebase-command.d.ts +129 -4
  247. package/dist/commands/rebase-command.d.ts.map +1 -1
  248. package/dist/commands/refs-command.d.ts +81 -0
  249. package/dist/commands/refs-command.d.ts.map +1 -0
  250. package/dist/commands/remerge-diff.d.ts +59 -0
  251. package/dist/commands/remerge-diff.d.ts.map +1 -0
  252. package/dist/commands/remote-command.d.ts +41 -0
  253. package/dist/commands/remote-command.d.ts.map +1 -1
  254. package/dist/commands/remote-object-info-command.d.ts +55 -0
  255. package/dist/commands/remote-object-info-command.d.ts.map +1 -0
  256. package/dist/commands/remote-show-command.d.ts +204 -0
  257. package/dist/commands/remote-show-command.d.ts.map +1 -0
  258. package/dist/commands/remote-transport.d.ts +40 -3
  259. package/dist/commands/remote-transport.d.ts.map +1 -1
  260. package/dist/commands/repack-command.d.ts +115 -0
  261. package/dist/commands/repack-command.d.ts.map +1 -0
  262. package/dist/commands/replace-command.d.ts +143 -0
  263. package/dist/commands/replace-command.d.ts.map +1 -0
  264. package/dist/commands/replay-command.d.ts +117 -0
  265. package/dist/commands/replay-command.d.ts.map +1 -0
  266. package/dist/commands/repo-command.d.ts +136 -0
  267. package/dist/commands/repo-command.d.ts.map +1 -0
  268. package/dist/commands/request-pull-command.d.ts +82 -0
  269. package/dist/commands/request-pull-command.d.ts.map +1 -0
  270. package/dist/commands/rerere-command.d.ts +36 -0
  271. package/dist/commands/rerere-command.d.ts.map +1 -0
  272. package/dist/commands/rerere.d.ts +102 -0
  273. package/dist/commands/rerere.d.ts.map +1 -0
  274. package/dist/commands/reset-command.d.ts +19 -1
  275. package/dist/commands/reset-command.d.ts.map +1 -1
  276. package/dist/commands/restore-command.d.ts +7 -0
  277. package/dist/commands/restore-command.d.ts.map +1 -1
  278. package/dist/commands/rev-filter/commit-grep.d.ts +3 -1
  279. package/dist/commands/rev-filter/commit-grep.d.ts.map +1 -1
  280. package/dist/commands/rev-list-command.d.ts +78 -3
  281. package/dist/commands/rev-list-command.d.ts.map +1 -1
  282. package/dist/commands/rev-parse-command.d.ts +9 -0
  283. package/dist/commands/rev-parse-command.d.ts.map +1 -1
  284. package/dist/commands/revert-command.d.ts +32 -1
  285. package/dist/commands/revert-command.d.ts.map +1 -1
  286. package/dist/commands/revision-range.d.ts +7 -0
  287. package/dist/commands/revision-range.d.ts.map +1 -1
  288. package/dist/commands/revision-resolver.d.ts +12 -0
  289. package/dist/commands/revision-resolver.d.ts.map +1 -1
  290. package/dist/commands/sequencer-pick.d.ts +120 -1
  291. package/dist/commands/sequencer-pick.d.ts.map +1 -1
  292. package/dist/commands/sequencer-support.d.ts +10 -1
  293. package/dist/commands/sequencer-support.d.ts.map +1 -1
  294. package/dist/commands/serve-repository.d.ts +23 -1
  295. package/dist/commands/serve-repository.d.ts.map +1 -1
  296. package/dist/commands/session-id.d.ts +18 -0
  297. package/dist/commands/session-id.d.ts.map +1 -0
  298. package/dist/commands/shortlog-command.d.ts +109 -0
  299. package/dist/commands/shortlog-command.d.ts.map +1 -0
  300. package/dist/commands/shortlog.d.ts +151 -0
  301. package/dist/commands/shortlog.d.ts.map +1 -0
  302. package/dist/commands/show-branch-command.d.ts +59 -0
  303. package/dist/commands/show-branch-command.d.ts.map +1 -0
  304. package/dist/commands/show-ref-command.d.ts +112 -0
  305. package/dist/commands/show-ref-command.d.ts.map +1 -0
  306. package/dist/commands/signature-check.d.ts +9 -2
  307. package/dist/commands/signature-check.d.ts.map +1 -1
  308. package/dist/commands/signing.d.ts +22 -1
  309. package/dist/commands/signing.d.ts.map +1 -1
  310. package/dist/commands/stash-apply-command.d.ts.map +1 -1
  311. package/dist/commands/stash-export-command.d.ts +115 -0
  312. package/dist/commands/stash-export-command.d.ts.map +1 -0
  313. package/dist/commands/status-command.d.ts +33 -3
  314. package/dist/commands/status-command.d.ts.map +1 -1
  315. package/dist/commands/stripspace-command.d.ts +44 -0
  316. package/dist/commands/stripspace-command.d.ts.map +1 -0
  317. package/dist/commands/submodule-add-command.d.ts +10 -1
  318. package/dist/commands/submodule-add-command.d.ts.map +1 -1
  319. package/dist/commands/submodule-auth.d.ts +3 -1
  320. package/dist/commands/submodule-auth.d.ts.map +1 -1
  321. package/dist/commands/submodule-commands.d.ts +99 -3
  322. package/dist/commands/submodule-commands.d.ts.map +1 -1
  323. package/dist/commands/submodule-fetch.d.ts +149 -0
  324. package/dist/commands/submodule-fetch.d.ts.map +1 -0
  325. package/dist/commands/submodule-model.d.ts +8 -0
  326. package/dist/commands/submodule-model.d.ts.map +1 -1
  327. package/dist/commands/submodule-unpack.d.ts +120 -0
  328. package/dist/commands/submodule-unpack.d.ts.map +1 -0
  329. package/dist/commands/submodule-update-command.d.ts +21 -1
  330. package/dist/commands/submodule-update-command.d.ts.map +1 -1
  331. package/dist/commands/subtree-shift.d.ts +27 -0
  332. package/dist/commands/subtree-shift.d.ts.map +1 -0
  333. package/dist/commands/switch-command.d.ts +3 -0
  334. package/dist/commands/switch-command.d.ts.map +1 -1
  335. package/dist/commands/textconv-cache.d.ts +58 -0
  336. package/dist/commands/textconv-cache.d.ts.map +1 -0
  337. package/dist/commands/tree-restore.d.ts +5 -0
  338. package/dist/commands/tree-restore.d.ts.map +1 -1
  339. package/dist/commands/unpack-objects-command.d.ts +47 -0
  340. package/dist/commands/unpack-objects-command.d.ts.map +1 -0
  341. package/dist/commands/update-index-command.d.ts +110 -0
  342. package/dist/commands/update-index-command.d.ts.map +1 -0
  343. package/dist/commands/uri-protocols.d.ts +13 -0
  344. package/dist/commands/uri-protocols.d.ts.map +1 -0
  345. package/dist/commands/url-parse-command.d.ts +30 -0
  346. package/dist/commands/url-parse-command.d.ts.map +1 -0
  347. package/dist/commands/var-command.d.ts +42 -0
  348. package/dist/commands/var-command.d.ts.map +1 -0
  349. package/dist/commands/worktree-overwrite-checks.d.ts +2 -0
  350. package/dist/commands/worktree-overwrite-checks.d.ts.map +1 -1
  351. package/dist/{commands-ISM52N0n.js → commands-Mlo1dxQN.js} +56133 -70269
  352. package/dist/errors/command-errors.d.ts +58 -0
  353. package/dist/errors/command-errors.d.ts.map +1 -1
  354. package/dist/errors/index.js +67 -1
  355. package/dist/fsck-CrhVMNIH.js +5179 -0
  356. package/dist/git-command.d.ts +89 -3
  357. package/dist/git-command.d.ts.map +1 -1
  358. package/dist/git.d.ts +628 -1
  359. package/dist/git.d.ts.map +1 -1
  360. package/dist/guarded-transport-command.d.ts +84 -0
  361. package/dist/guarded-transport-command.d.ts.map +1 -0
  362. package/dist/index.d.ts +1 -0
  363. package/dist/index.d.ts.map +1 -1
  364. package/dist/index.js +7 -5
  365. package/dist/maintenance-run-command-Bw21HEkH.js +13539 -0
  366. package/dist/remote-transport-Bu4PGSMD.js +2605 -0
  367. package/dist/rename/detect-renames.d.ts +20 -0
  368. package/dist/rename/detect-renames.d.ts.map +1 -1
  369. package/dist/rename/diffcore-break.d.ts +51 -0
  370. package/dist/rename/diffcore-break.d.ts.map +1 -0
  371. package/dist/rename/index.d.ts +1 -0
  372. package/dist/rename/index.d.ts.map +1 -1
  373. package/dist/results/blame-format.d.ts +62 -1
  374. package/dist/results/blame-format.d.ts.map +1 -1
  375. package/dist/results/cherry-pick-result.d.ts +6 -0
  376. package/dist/results/cherry-pick-result.d.ts.map +1 -1
  377. package/dist/results/clone-result.d.ts +9 -0
  378. package/dist/results/clone-result.d.ts.map +1 -1
  379. package/dist/results/diff-dirstat.d.ts +36 -0
  380. package/dist/results/diff-dirstat.d.ts.map +1 -0
  381. package/dist/results/diff-entry.d.ts +20 -0
  382. package/dist/results/diff-entry.d.ts.map +1 -1
  383. package/dist/results/diff-formatter.d.ts.map +1 -1
  384. package/dist/results/diff-output.d.ts +67 -3
  385. package/dist/results/diff-output.d.ts.map +1 -1
  386. package/dist/results/fetch-result.d.ts +24 -1
  387. package/dist/results/fetch-result.d.ts.map +1 -1
  388. package/dist/results/index.d.ts +2 -0
  389. package/dist/results/index.d.ts.map +1 -1
  390. package/dist/results/index.js +2 -2
  391. package/dist/results/init-result.d.ts +8 -1
  392. package/dist/results/init-result.d.ts.map +1 -1
  393. package/dist/results/line-range-hunks.d.ts +27 -0
  394. package/dist/results/line-range-hunks.d.ts.map +1 -0
  395. package/dist/results/merge-result.d.ts +13 -1
  396. package/dist/results/merge-result.d.ts.map +1 -1
  397. package/dist/results/pull-result.d.ts +11 -0
  398. package/dist/results/pull-result.d.ts.map +1 -1
  399. package/dist/results/push-result.d.ts +10 -0
  400. package/dist/results/push-result.d.ts.map +1 -1
  401. package/dist/results/rebase-result.d.ts +7 -0
  402. package/dist/results/rebase-result.d.ts.map +1 -1
  403. package/dist/results/revert-result.d.ts +6 -0
  404. package/dist/results/revert-result.d.ts.map +1 -1
  405. package/dist/results/stash-result.d.ts +5 -0
  406. package/dist/results/stash-result.d.ts.map +1 -1
  407. package/dist/results/status-result.d.ts +1 -1
  408. package/dist/results/status-result.d.ts.map +1 -1
  409. package/dist/results-ERo9vELd.js +49673 -0
  410. package/dist/transport-command.d.ts +93 -1
  411. package/dist/transport-command.d.ts.map +1 -1
  412. package/package.json +12 -12
  413. package/src/commands/add-command.ts +118 -0
  414. package/src/commands/add-patch/add-patch.ts +8 -0
  415. package/src/commands/add-patch/patch-backend.ts +24 -3
  416. package/src/commands/add-patch/patch-modes.ts +26 -2
  417. package/src/commands/add-patch/patch-session.ts +6 -0
  418. package/src/commands/am/am-command.ts +301 -12
  419. package/src/commands/apply/apply-command.ts +52 -9
  420. package/src/commands/apply/apply-parse.ts +10 -0
  421. package/src/commands/apply/index.ts +9 -1
  422. package/src/commands/archive/archive-command.ts +1148 -0
  423. package/src/commands/archive/archive-entry.ts +93 -0
  424. package/src/commands/archive/index.ts +7 -0
  425. package/src/commands/archive/remote-archive-command.ts +140 -0
  426. package/src/commands/archive/tar-archive.ts +207 -0
  427. package/src/commands/archive/tar-commit-id.ts +72 -0
  428. package/src/commands/archive/upload-archive-writer.ts +213 -0
  429. package/src/commands/archive/zip-archive.ts +317 -0
  430. package/src/commands/attributes-source.ts +26 -12
  431. package/src/commands/blame-command.ts +1551 -53
  432. package/src/commands/blame-ignore.ts +307 -0
  433. package/src/commands/bundle/bundle-create-command.ts +405 -0
  434. package/src/commands/bundle/bundle-format.ts +228 -0
  435. package/src/commands/bundle/bundle-list.ts +276 -0
  436. package/src/commands/bundle/bundle-read-commands.ts +157 -0
  437. package/src/commands/bundle/bundle-support.ts +85 -0
  438. package/src/commands/bundle/bundle-transport.ts +107 -0
  439. package/src/commands/bundle/bundle-uri-host.ts +204 -0
  440. package/src/commands/bundle/bundle-uri.ts +236 -0
  441. package/src/commands/bundle/bundle-verify.ts +152 -0
  442. package/src/commands/bundle/index.ts +14 -0
  443. package/src/commands/cat-file/batch-format.ts +193 -0
  444. package/src/commands/cat-file/cat-file-command.ts +857 -0
  445. package/src/commands/cat-file/index.ts +2 -0
  446. package/src/commands/check-attr-command.ts +333 -0
  447. package/src/commands/check-ignore-command.ts +261 -0
  448. package/src/commands/check-mailmap-command.ts +129 -0
  449. package/src/commands/check-ref-format-command.ts +129 -0
  450. package/src/commands/checkout-command.ts +131 -28
  451. package/src/commands/checkout-index-command.ts +568 -0
  452. package/src/commands/checkout-paths.ts +35 -0
  453. package/src/commands/cherry-command.ts +187 -0
  454. package/src/commands/cherry-pick-command.ts +63 -2
  455. package/src/commands/clean-command.ts +92 -12
  456. package/src/commands/clean-interactive.ts +522 -0
  457. package/src/commands/clone-command.ts +803 -50
  458. package/src/commands/commit-command.ts +202 -51
  459. package/src/commands/config-command.ts +9 -0
  460. package/src/commands/daemon-access-hook.ts +78 -0
  461. package/src/commands/default-branch.ts +99 -1
  462. package/src/commands/describe-command.ts +341 -254
  463. package/src/commands/diff-command.ts +1186 -99
  464. package/src/commands/diff-external.ts +131 -0
  465. package/src/commands/diff-plumbing/diff-pairs-command.ts +193 -0
  466. package/src/commands/diff-plumbing/diff-plumbing-command.ts +424 -0
  467. package/src/commands/diff-plumbing/index.ts +2 -0
  468. package/src/commands/diff-textconv.ts +5 -1
  469. package/src/commands/fast-export/fast-export-command.ts +911 -0
  470. package/src/commands/fast-export/fast-import-command.ts +1553 -0
  471. package/src/commands/fast-export/fast-stream-support.ts +162 -0
  472. package/src/commands/fast-export/index.ts +3 -0
  473. package/src/commands/fetch-command.ts +665 -14
  474. package/src/commands/fetch-multiple-command.ts +668 -0
  475. package/src/commands/format-patch-command.ts +189 -77
  476. package/src/commands/format-rev-command.ts +251 -0
  477. package/src/commands/fsck/fsck-command.ts +47 -20
  478. package/src/commands/fsck/fsck-msg-ids.ts +19 -3
  479. package/src/commands/fsck/fsck-pack.ts +2 -2
  480. package/src/commands/fsmonitor-refresh.ts +315 -0
  481. package/src/commands/gc-command.ts +10 -0
  482. package/src/commands/git-describe.ts +456 -217
  483. package/src/commands/git-hooks.ts +165 -9
  484. package/src/commands/git-paths.ts +136 -0
  485. package/src/commands/grep/grep-command.ts +38 -15
  486. package/src/commands/history-command.ts +617 -0
  487. package/src/commands/http-config.ts +139 -0
  488. package/src/commands/index-adder.ts +37 -3
  489. package/src/commands/index-host.ts +6 -1
  490. package/src/commands/index.ts +62 -0
  491. package/src/commands/init-command.ts +617 -49
  492. package/src/commands/last-modified-command.ts +804 -0
  493. package/src/commands/lfs/go-url.ts +370 -0
  494. package/src/commands/lfs/index.ts +2 -0
  495. package/src/commands/lfs/lfs-config.ts +738 -0
  496. package/src/commands/lfs/lfs-endpoint-command.ts +180 -0
  497. package/src/commands/line-log.ts +931 -0
  498. package/src/commands/local-transport.ts +252 -4
  499. package/src/commands/log-command.ts +1518 -182
  500. package/src/commands/log-graph.ts +6 -3
  501. package/src/commands/log-output.ts +228 -15
  502. package/src/commands/ls-files-command.ts +1177 -0
  503. package/src/commands/ls-remote-command.ts +6 -0
  504. package/src/commands/ls-tree-command.ts +684 -0
  505. package/src/commands/mailmap.ts +41 -5
  506. package/src/commands/maintenance-run-command.ts +949 -0
  507. package/src/commands/merge-command.ts +351 -47
  508. package/src/commands/merge-config.ts +23 -1
  509. package/src/commands/merge-drivers.ts +112 -20
  510. package/src/commands/merge-strategy-options.ts +224 -0
  511. package/src/commands/merge-support.ts +130 -26
  512. package/src/commands/merge-tree-command.ts +786 -0
  513. package/src/commands/message-cleanup.ts +1 -1
  514. package/src/commands/mktag-command.ts +149 -0
  515. package/src/commands/name-rev-command.ts +184 -0
  516. package/src/commands/name-rev.ts +700 -109
  517. package/src/commands/object-store/count-objects-command.ts +404 -0
  518. package/src/commands/object-store/index.ts +4 -0
  519. package/src/commands/object-store/objects-directory.ts +24 -0
  520. package/src/commands/object-store/prune-command.ts +129 -0
  521. package/src/commands/object-store/show-index-command.ts +151 -0
  522. package/src/commands/octopus-merge.ts +35 -11
  523. package/src/commands/ort-merge.ts +124 -23
  524. package/src/commands/ort-recursive.ts +40 -2
  525. package/src/commands/patch-id-command.ts +65 -0
  526. package/src/commands/patch-id.ts +327 -0
  527. package/src/commands/plumbing-command.ts +141 -0
  528. package/src/commands/plumbing-input.ts +87 -0
  529. package/src/commands/promisor-remote-reply.ts +276 -0
  530. package/src/commands/promisor-remote.ts +25 -2
  531. package/src/commands/pull-command.ts +720 -224
  532. package/src/commands/push-command.ts +440 -8
  533. package/src/commands/range-diff/index.ts +3 -0
  534. package/src/commands/range-diff/linear-assignment.ts +203 -0
  535. package/src/commands/range-diff/range-diff-command.ts +433 -0
  536. package/src/commands/range-diff/range-diff.ts +617 -0
  537. package/src/commands/read-tree-command.ts +74 -3
  538. package/src/commands/rebase-command.ts +647 -83
  539. package/src/commands/refs-command.ts +274 -0
  540. package/src/commands/remerge-diff.ts +241 -0
  541. package/src/commands/remote-command.ts +98 -10
  542. package/src/commands/remote-object-info-command.ts +109 -0
  543. package/src/commands/remote-show-command.ts +836 -0
  544. package/src/commands/remote-transport.ts +116 -1
  545. package/src/commands/repack-command.ts +383 -0
  546. package/src/commands/replace-command.ts +816 -0
  547. package/src/commands/replay-command.ts +674 -0
  548. package/src/commands/repo-command.ts +967 -0
  549. package/src/commands/request-pull-command.ts +356 -0
  550. package/src/commands/rerere-command.ts +179 -0
  551. package/src/commands/rerere.ts +925 -0
  552. package/src/commands/reset-command.ts +78 -3
  553. package/src/commands/restore-command.ts +15 -0
  554. package/src/commands/rev-filter/commit-grep.ts +7 -2
  555. package/src/commands/rev-list-command.ts +196 -11
  556. package/src/commands/rev-parse-command.ts +62 -4
  557. package/src/commands/revert-command.ts +62 -2
  558. package/src/commands/revision-range.ts +10 -3
  559. package/src/commands/revision-resolver.ts +44 -3
  560. package/src/commands/sequencer-pick.ts +370 -29
  561. package/src/commands/sequencer-support.ts +164 -2
  562. package/src/commands/serve-repository.ts +65 -0
  563. package/src/commands/session-id.ts +31 -0
  564. package/src/commands/shortlog-command.ts +354 -0
  565. package/src/commands/shortlog.ts +361 -0
  566. package/src/commands/show-branch-command.ts +981 -0
  567. package/src/commands/show-command.ts +3 -2
  568. package/src/commands/show-ref-command.ts +439 -0
  569. package/src/commands/signature-check.ts +37 -5
  570. package/src/commands/signing.ts +122 -16
  571. package/src/commands/stash-apply-command.ts +3 -0
  572. package/src/commands/stash-export-command.ts +397 -0
  573. package/src/commands/status-command.ts +158 -31
  574. package/src/commands/status-format.ts +1 -1
  575. package/src/commands/stripspace-command.ts +118 -0
  576. package/src/commands/submodule-add-command.ts +22 -1
  577. package/src/commands/submodule-auth.ts +61 -6
  578. package/src/commands/submodule-commands.ts +333 -5
  579. package/src/commands/submodule-fetch.ts +789 -0
  580. package/src/commands/submodule-model.ts +9 -1
  581. package/src/commands/submodule-unpack.ts +265 -0
  582. package/src/commands/submodule-update-command.ts +68 -5
  583. package/src/commands/subtree-shift.ts +215 -0
  584. package/src/commands/switch-command.ts +9 -0
  585. package/src/commands/textconv-cache.ts +143 -0
  586. package/src/commands/tree-restore.ts +20 -1
  587. package/src/commands/unpack-objects-command.ts +235 -0
  588. package/src/commands/update-index-command.ts +1016 -0
  589. package/src/commands/uri-protocols.ts +13 -0
  590. package/src/commands/url-parse-command.ts +67 -0
  591. package/src/commands/var-command.ts +219 -0
  592. package/src/commands/worktree-overwrite-checks.ts +5 -0
  593. package/src/errors/command-errors.ts +80 -0
  594. package/src/git-command.ts +218 -2
  595. package/src/git.ts +1033 -80
  596. package/src/guarded-transport-command.ts +176 -0
  597. package/src/index.ts +1 -0
  598. package/src/rename/detect-renames.ts +42 -8
  599. package/src/rename/diffcore-break.ts +166 -0
  600. package/src/rename/index.ts +1 -0
  601. package/src/results/blame-format.ts +268 -43
  602. package/src/results/cherry-pick-result.ts +6 -0
  603. package/src/results/clone-result.ts +6 -0
  604. package/src/results/diff-dirstat.ts +117 -0
  605. package/src/results/diff-entry.ts +24 -0
  606. package/src/results/diff-formatter.ts +8 -4
  607. package/src/results/diff-output.ts +239 -8
  608. package/src/results/diff-pickaxe.ts +1 -1
  609. package/src/results/fetch-result.ts +24 -1
  610. package/src/results/index.ts +2 -0
  611. package/src/results/init-result.ts +10 -1
  612. package/src/results/line-range-hunks.ts +126 -0
  613. package/src/results/merge-result.ts +14 -0
  614. package/src/results/pull-result.ts +7 -0
  615. package/src/results/push-result.ts +10 -0
  616. package/src/results/rebase-result.ts +7 -0
  617. package/src/results/revert-result.ts +6 -0
  618. package/src/results/stash-result.ts +6 -0
  619. package/src/results/status-result.ts +2 -2
  620. package/src/transport-command.ts +216 -4
  621. package/dist/fsck-DLRpbwTj.js +0 -13405
  622. package/dist/results-TB2IJ64h.js +0 -4700
@@ -0,0 +1,115 @@
1
+ import { type RepackResult } from "@statewalker/vcs-store-files";
2
+ import { GitCommand } from "../git-command.js";
3
+ /** What `git repack` did. */
4
+ export interface RepackCommandResult {
5
+ /** The store's repack (the new pack, the packs and loose objects removed), null when nothing was written. */
6
+ repack: RepackResult | null;
7
+ /** git's stdout: `Nothing new to pack.` when no pack was written (unless `--quiet`). */
8
+ output: string[];
9
+ /** git's warnings (`disabling bitmap writing, ...`), and the alternates' read errors. */
10
+ warnings: string[];
11
+ }
12
+ /**
13
+ * `git repack` (builtin/repack.c) over a files repository: the store's `repack` with git's
14
+ * options and their defaults from the configuration (`repack.useDeltaIslands`,
15
+ * `repack.updateServerInfo`, `repack.writeBitmaps`, `repack.packKeptObjects`, `pack.*`).
16
+ *
17
+ * Without `-a`/`-A`/`--cruft`/`--geometric` it packs the reachable loose objects into a new
18
+ * pack (`-d` then removes those loose copies). The objects of a path whose `delta` attribute is
19
+ * unset (`-delta` in `.gitattributes` or `info/attributes`) are never searched for a delta.
20
+ *
21
+ * @example
22
+ * ```typescript
23
+ * await git.repack().setAll(true).setDeleteRedundant(true).call(); // git repack -a -d
24
+ * await git.repack().setGeometric(2).setDeleteRedundant(true).setWriteMidx(true).call();
25
+ * ```
26
+ */
27
+ export declare class RepackCommand extends GitCommand<RepackCommandResult> {
28
+ /** git's repack reads the objects as stored, never through replace refs. */
29
+ protected readsReplacedObjects(): boolean;
30
+ private _all;
31
+ private _loosen;
32
+ private _delete;
33
+ private _cruft;
34
+ private _cruftExpiration?;
35
+ private _maxCruftSize?;
36
+ private _local;
37
+ private _keepUnreachable;
38
+ private _unpackUnreachable?;
39
+ private _reuseDeltas;
40
+ private _reuseObjects;
41
+ private _writeBitmaps?;
42
+ private _writeMidx;
43
+ private _geometric?;
44
+ private _filter?;
45
+ private _keepPacks;
46
+ private _packKeptObjects?;
47
+ private _updateServerInfo?;
48
+ private _window?;
49
+ private _depth?;
50
+ private _deltaIslands?;
51
+ private _quiet;
52
+ /** `-a`: everything reachable into one pack (with `-d`, the other packs go). */
53
+ setAll(all: boolean): this;
54
+ /**
55
+ * `-A`: as `-a`, and with `-d` the unreachable objects of the removed packs are written
56
+ * loose (all of them, or those younger than `setUnpackUnreachable`'s date).
57
+ */
58
+ setLoosenUnreachable(loosen: boolean): this;
59
+ /** `-d`: remove the packs the new one makes redundant, then the loose objects packed. */
60
+ setDeleteRedundant(deleteRedundant: boolean): this;
61
+ /** `--cruft`: unreachable objects into a cruft pack (needs `-d` here). */
62
+ setCruft(cruft: boolean): this;
63
+ /** `--cruft-expiration=<approxidate>`: cruft objects older than this are dropped. */
64
+ setCruftExpiration(expiration: string): this;
65
+ /** `--max-cruft-size=<bytes>`. */
66
+ setMaxCruftSize(bytes: number): this;
67
+ /** `-l`: leave out what alternates hold. */
68
+ setLocal(local: boolean): this;
69
+ /**
70
+ * `-k` (`--keep-unreachable`): with `-a -d`, the unreachable objects of the replaced packs
71
+ * and the loose ones go into the new pack instead of being dropped.
72
+ */
73
+ setKeepUnreachable(keep: boolean): this;
74
+ /** `--unpack-unreachable=<approxidate>`: with `-A`, only objects newer than this are loosened. */
75
+ setUnpackUnreachable(when: string): this;
76
+ /** `-f` (false): search every delta again instead of copying stored ones. */
77
+ setReuseDeltas(reuse: boolean): this;
78
+ /** `-F` (false): recompress every object (no stored entry copied). */
79
+ setReuseObjects(reuse: boolean): this;
80
+ /** `-b`/`--no-write-bitmap-index` (default `repack.writeBitmaps`, bare repositories with `-a`). */
81
+ setWriteBitmaps(write: boolean): this;
82
+ /** `-m` (`--write-midx`): a multi-pack-index over the packs that stay. */
83
+ setWriteMidx(write: boolean): this;
84
+ /** `--geometric=<factor>` (`-g`): roll small packs up into a geometric progression. */
85
+ setGeometric(factor: number): this;
86
+ /** `--filter=<spec>` (with `-a`): filtered-out objects go into a pack of their own. */
87
+ setFilter(spec: string): this;
88
+ /** `--keep-pack=<name>`: packs treated as kept (repeatable). */
89
+ addKeepPack(name: string): this;
90
+ /** `--pack-kept-objects`: with `-a`, pack the objects of `.keep` packs too. */
91
+ setPackKeptObjects(pack: boolean): this;
92
+ /** `-n` (false): do not run `update-server-info` (default `repack.updateServerInfo`, true). */
93
+ setUpdateServerInfo(update: boolean): this;
94
+ /** `--window=<n>`. */
95
+ setWindow(window: number): this;
96
+ /** `--depth=<n>`. */
97
+ setDepth(depth: number): this;
98
+ /** `-i` (`--delta-islands`, default `repack.useDeltaIslands`): `pack.island` restricts deltas. */
99
+ setDeltaIslands(islands: boolean): this;
100
+ /** `-q`: no `Nothing new to pack.` line. */
101
+ setQuiet(quiet: boolean): this;
102
+ /** The repository's files backend: its FilesApi, common git directory and history. */
103
+ private filesRepository;
104
+ /** A boolean of the configuration, `fallback` when unset. */
105
+ private configBool;
106
+ /** The `delta` attribute's check (git's `no_try_delta`), when the repository has a worktree. */
107
+ private noDeltaCheck;
108
+ /**
109
+ * Run the repack.
110
+ *
111
+ * @throws GitApiError for git's refusals (`--geometric` with `-a`, `-k` with `-A`, `--cruft`)
112
+ */
113
+ call(): Promise<RepackCommandResult>;
114
+ }
115
+ //# sourceMappingURL=repack-command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repack-command.d.ts","sourceRoot":"","sources":["../../src/commands/repack-command.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,YAAY,EAElB,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAI/C,6BAA6B;AAC7B,MAAM,WAAW,mBAAmB;IAClC,6GAA6G;IAC7G,MAAM,EAAE,YAAY,GAAG,IAAI,CAAC;IAC5B,wFAAwF;IACxF,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,yFAAyF;IACzF,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;;;;;;;;;;;;GAcG;AACH,qBAAa,aAAc,SAAQ,UAAU,CAAC,mBAAmB,CAAC;IAChE,4EAA4E;IAC5E,UAAmB,oBAAoB,IAAI,OAAO,CAEjD;IAED,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,gBAAgB,CAAC,CAAS;IAClC,O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7E,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAInC;IAED,sEAAsE;IACtE,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAIpC;IAED,mGAAmG;IACnG,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAIpC;IAED,0EAA0E;IAC1E,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAIjC;IAED,uFAAuF;IACvF,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAIjC;IAED,uFAAuF;IACvF,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAI5B;IAED,gEAAgE;IAChE,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAI9B;IAED,+EAA+E;IAC/E,kBAAkB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAItC;IAED,+FAA+F;IAC/F,mBAAmB,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAIzC;IAED,sBAAsB;IACtB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAI9B;IAED,qBAAqB;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAI5B;IAED,kGAAkG;IAClG,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAItC;IAED,4CAA4C;IAC5C,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAI7B;IAED,sFAAsF;YACxE,eAAe;IAU7B,6DAA6D;IAC7D,OAAO,CAAC,UAAU;IAKlB,gGAAgG;IAChG,OAAO,CAAC,YAAY;IAgBpB;;;;OAIG;IACG,IAAI,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAmHzC;CACF"}
@@ -0,0 +1,143 @@
1
+ /**
2
+ * `git replace` (builtin/replace.c): replace refs created (`<object> <replacement>`), listed
3
+ * (`-l [<pattern>]`, `--format=short|medium|long`), deleted (`-d`), made by editing an object
4
+ * (`--edit`, `--raw`), by changing a commit's parents (`--graft`) and from the grafts file
5
+ * (`--convert-graft-file`, which removes `info/grafts` once every graft converted).
6
+ *
7
+ * @example
8
+ * ```typescript
9
+ * // git replace --graft HEAD~2
10
+ * await git.replace().setMode("graft").addArgument("HEAD~2").call();
11
+ * // git replace --format=medium
12
+ * const { stdout } = await git.replace().setFormat("medium").callOutput();
13
+ * // git replace --convert-graft-file
14
+ * const { exitCode, stderr } = await git.replace().setMode("convert-graft-file").call();
15
+ * ```
16
+ */
17
+ import type { CommandCommits } from "../git-command.js";
18
+ import { PlumbingCommand } from "./plumbing-command.js";
19
+ /** git replace's command modes (OPT_CMDMODE); unset: list without arguments, else replace. */
20
+ export type ReplaceMode = "list" | "delete" | "edit" | "graft" | "convert-graft-file" | "replace";
21
+ /**
22
+ * The editor of `--edit`: the path git would edit (`REPLACE_EDITOBJ` in the git directory)
23
+ * and the object as exported (`cat-file -p`, or the raw content with `--raw`). It returns the
24
+ * edited content (bytes or text), or nothing to keep it as it was. A {@link GitApiError} it
25
+ * throws gives its message lines before git's `error: editing object file failed`.
26
+ */
27
+ export type ReplaceEditor = (path: string, content: Uint8Array) => Promise<Uint8Array | string | undefined | undefined>;
28
+ /**
29
+ * `git replace`. Results are git's stdout ({@link setStdout}, {@link callOutput}), stderr and
30
+ * exit status: 255 where git returns an `error()` (a refused replacement, a bogus format), 1
31
+ * when `-d` or `--convert-graft-file` failed for some names or lines; usage errors are thrown
32
+ * as {@link PlumbingError} with git's `fatal:` line and status 129 (the usage text is the
33
+ * CLI's), and a malformed edited object as git's death (128).
34
+ *
35
+ * Replace refs are not applied to the objects it reads (git's `disable_replace_refs`). The
36
+ * names are read under `GIT_REPLACE_REF_BASE` (default `refs/replace/`). `--edit` exports and
37
+ * imports in-process (cat-file and mktree), handing the content to {@link setEditor} rather
38
+ * than writing `REPLACE_EDITOBJ`; without an editor the object stays as it was (git's
39
+ * `GIT_EDITOR=:`), which git refuses as the same object. `--convert-graft-file` converts
40
+ * `info/grafts` (a `GIT_GRAFT_FILE` elsewhere is refused): each line becomes a replace ref
41
+ * (a graft changing nothing is a warning), and the file is removed only when every line
42
+ * converted, else git's warning lists the lines left (exit 1). To roll a conversion back,
43
+ * delete the replace refs (`-d`); the grafts can be written again from the replacements'
44
+ * parents (`git replace --format=medium`, then `<commit> <parent>...` per replacement).
45
+ */
46
+ export declare class ReplaceCommand extends PlumbingCommand {
47
+ private mode?;
48
+ private conflict?;
49
+ private readonly args;
50
+ private force;
51
+ private raw;
52
+ private format?;
53
+ private editor?;
54
+ private compatibility;
55
+ /** The grafts file as git loads it on the first commit parse (prepare_commit_graft) */
56
+ private graftsLoad?;
57
+ /** Whether the grafts file was loaded (a commit was parsed) */
58
+ private graftsLoaded;
59
+ /** Commit objects git holds in memory: the grafts' commits, parsed commits' grafted parents */
60
+ private readonly knownCommits;
61
+ private convertingGraftFile;
62
+ /** The command mode (`-l`, `-d`, `-e`, `-g`, `--convert-graft-file`); one per command. */
63
+ setMode(mode: ReplaceMode): this;
64
+ /** Arguments: objects, a commit and its new parents, or a listing pattern. */
65
+ addArgument(...args: string[]): this;
66
+ /** `-f`/`--force`: an existing replace ref is overwritten, types are not checked. */
67
+ setForce(force: boolean): this;
68
+ /** `--raw`: `--edit` hands the raw content, not `cat-file -p`'s. */
69
+ setRaw(raw: boolean): this;
70
+ /** `--format=<short|medium|long>` of the listing. */
71
+ setFormat(format: string): this;
72
+ /** The editor of `--edit` (see {@link ReplaceEditor}). */
73
+ setEditor(editor: ReplaceEditor): this;
74
+ /**
75
+ * The git version whose behaviour to follow (default 2.56): 2.5x reports a missing object
76
+ * the grafts file names as a commit (`Could not read <id>`), and words the advice on the
77
+ * grafts file as `git config set`.
78
+ */
79
+ setCompatibility(version: "2.43" | "2.56"): this;
80
+ /** git replace reads every object as stored (`disable_replace_refs`). */
81
+ protected readsReplacedObjects(): boolean;
82
+ /**
83
+ * The commits revisions are resolved through (`HEAD~1`, `HEAD^{tree}`): as stored, with
84
+ * the grafts file's parents, each load being git's commit parse, which loads the grafts
85
+ * file and gives its advice on the first one (prepare_commit_graft).
86
+ */
87
+ protected get walkCommits(): CommandCommits;
88
+ private get replaceRefBase();
89
+ protected run(): Promise<number>;
90
+ /** Prints `error: <message>` and fails the step. */
91
+ private fail;
92
+ /** repo_get_oid with replace refs off; undefined when it names nothing. */
93
+ private getOid;
94
+ /** odb_read_object_info: the object's type, undefined when it is missing. */
95
+ private typeOf;
96
+ /** The object's content as stored. */
97
+ private readObject;
98
+ /** Writes an object (odb_write_object). */
99
+ private writeObject;
100
+ /** A replace ref's current value (refs_read_ref), undefined when there is none. */
101
+ private readRef;
102
+ /** `git replace -l [<pattern>]` (list_replace_refs) */
103
+ private list;
104
+ /** `git replace -d <object>...` (for_each_replace_name + delete_replace_ref) */
105
+ private deleteNames;
106
+ /** check_ref_valid: the replace ref's name and its current value (null when none). */
107
+ private checkRefValid;
108
+ /** replace_object_oid */
109
+ private replaceObjectOid;
110
+ /** `git replace <object> <replacement>` (replace_object) */
111
+ private replaceObject;
112
+ /** `git replace --edit <object>` (edit_and_replace) */
113
+ private editAndReplace;
114
+ /** export_object: `cat-file -p` (or `cat-file <type>` with `--raw`) of the object. */
115
+ private exportObject;
116
+ /** import_object: mktree for a pretty-printed tree, else the content format-checked. */
117
+ private importObject;
118
+ /** builtin/mktree.c over the edited text (no `--missing`, no `-z`, no `--batch`). */
119
+ private mktree;
120
+ /**
121
+ * `git replace --graft <commit> [<parent>...]` (create_graft); with `gentle` (the grafts
122
+ * file's lines) a graft that changes nothing is a warning. Returns whether it failed.
123
+ */
124
+ private createGraft;
125
+ /**
126
+ * lookup_commit_reference: tags peeled to a commit; git's `object <id> is a <type>, not a
127
+ * commit` for another type, undefined (silently) for a missing object.
128
+ */
129
+ private lookupCommitReference;
130
+ /**
131
+ * A commit was parsed: the first parse loads the grafts file (prepare_commit_graft, with
132
+ * its deprecation advice unless converting it), which makes each graft's commit known; a
133
+ * grafted commit's parse makes its grafted parents known.
134
+ */
135
+ private commitParsed;
136
+ /** The grafts file's grafts; undefined when there is none. */
137
+ private readGraftFile;
138
+ /** advice.graftFileDeprecated, as git words it. */
139
+ private adviseGraftFile;
140
+ /** `git replace --convert-graft-file` (convert_graft_file) */
141
+ private convertGraftFile;
142
+ }
143
+ //# sourceMappingURL=replace-command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"replace-command.d.ts","sourceRoot":"","sources":["../../src/commands/replace-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AASH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAOxD,OAAO,EAAE,eAAe,EAAiB,MAAM,uBAAuB,CAAC;AAEvE,8FAA8F;AAC9F,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,oBAAoB,GAAG,SAAS,CAAC;AAElG;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG,CAC1B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,UAAU,KAChB,OAAO,CAAC,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC,CAAC;AA8B1D;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,cAAe,SAAQ,eAAe;IACjD,OAAO,CAAC,IAAI,CAAC,CAAc;IAC3B,OAAO,CAAC,QAAQ,CAAC,CAA6B;IAC9C,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAgB;IACrC,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,GAAG,CAAS;IACpB,OAAO,CAAC,MAAM,CAAC,CAAS;IACxB,OAAO,CAAC,MAAM,CAAC,CAAgB;IAC/B,OAAO,CAAC,aAAa,CAA2B;IAChD,uFAAuF;IACvF,OAAO,CAAC,UAAU,CAAC,CAAiD;IACpE,+DAA+D;IAC/D,OAAO,CAAC,YAAY,CAAS;IAC7B,+FAA+F;IAC/F,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAuB;IACpD,OAAO,CAAC,mBA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YACW,YAAY;IAc1B,8DAA8D;YAChD,aAAa;IAM3B,mDAAmD;IACnD,OAAO,CAAC,eAAe;IAsBvB,8DAA8D;YAChD,gBAAgB;CAmC/B"}
@@ -0,0 +1,117 @@
1
+ /**
2
+ * `git replay` (builtin/replay.c, replay.c): replays a range of commits onto a new base with
3
+ * merge-ort in memory, writing only objects, then updates the refs the range named (or prints
4
+ * `update-ref --stdin` lines). The worktree and the index are never touched, so it runs in
5
+ * bare repositories too.
6
+ *
7
+ * @example
8
+ * ```typescript
9
+ * // git replay --ref-action=print --onto main topic1..topic2
10
+ * const { stdout, exitCode } = await git
11
+ * .replay()
12
+ * .setOnto("main")
13
+ * .setRefAction("print")
14
+ * .addRevision("topic1..topic2")
15
+ * .callOutput();
16
+ * // stdout: "update refs/heads/topic2 <new> <old>\n"; exitCode: 0 clean, 1 conflicted
17
+ *
18
+ * // git replay --advance main topic1..topic2 (cherry-picks onto main and moves main)
19
+ * await git.replay().setAdvance("main").addRevision("topic1..topic2").call();
20
+ * ```
21
+ *
22
+ * The modes: `--onto <newbase>` replays onto a commit and moves the branches the positive
23
+ * revisions name (`--contained`: every local branch at a replayed commit, and a detached HEAD
24
+ * there); `--advance <branch>` replays onto the branch and moves it; `--revert <branch>`
25
+ * reverts the range newest first on the branch (git's `Revert "<subject>"` messages, the
26
+ * current user as author); `--ref <ref>` moves that ref instead. `--linearize` drops merge
27
+ * commits (without it a merge in the range dies). Commits that become empty are dropped.
28
+ * Each replayed commit keeps the original's author, message and extra headers (not its
29
+ * signature) with the current committer. The refs move in one transaction with reflog
30
+ * `replay --onto <id>` / `replay --advance <branch>` / `replay --revert <branch>`, unless
31
+ * `--ref-action=print` (or `replay.refAction=print`) prints `update <ref> <new> <old>` lines.
32
+ * A conflict exits 1 with no output.
33
+ *
34
+ * Version differences (`setCompatibility`): `git replay` is 2.44+. Up to 2.52 it always
35
+ * prints (no `--ref-action`), stops at a root commit, keeps commits that become empty,
36
+ * updates no detached HEAD, prints the lines of the commits replayed before a conflict, and
37
+ * words some refusals otherwise (`option --onto or --advance is mandatory`, `cannot advance
38
+ * target with multiple sources ...`); 2.53 adds `--ref-action` and ref updates. 2.54 adds
39
+ * `--revert`, `--ref`, root commits and dropped empty commits; 2.56 `--linearize`.
40
+ *
41
+ * The message is read as git's `repo_logmsg_reencode` reads it: a commit with an `encoding`
42
+ * header has its message re-encoded to UTF-8 (the header dropped, as every replayed commit's
43
+ * `encoding` is `i18n.commitEncoding`'s, written only when that is not UTF-8). Divergences: an
44
+ * `i18n.logOutputEncoding` other than UTF-8 keeps the message as stored (Web encoders write
45
+ * UTF-8 only); a detached HEAD updated with branches moves after them in
46
+ * a transaction of its own (a batch of HEAD with other refs is not atomic in our stores).
47
+ */
48
+ import { PlumbingCommand } from "./plumbing-command.js";
49
+ import { RevListCommand } from "./rev-list-command.js";
50
+ /** The git versions whose `git replay` ours follows (see the module documentation). */
51
+ export type ReplayCompatibility = "2.52" | "2.53" | "2.56";
52
+ /** `--ref-action`: update the refs (one transaction) or print `update-ref --stdin` lines. */
53
+ export type ReplayRefAction = "update" | "print";
54
+ /** `git replay`: see the module documentation. */
55
+ export declare class ReplayCommand extends PlumbingCommand {
56
+ private onto?;
57
+ private advance?;
58
+ private revert?;
59
+ private ref?;
60
+ private refAction?;
61
+ private contained;
62
+ private linearize;
63
+ private readonly revisions;
64
+ private readonly walkSteps;
65
+ private compatibility;
66
+ /** `--onto <newbase>`: replay onto this commit-ish, moving the branches of the range. */
67
+ setOnto(revision: string): this;
68
+ /** `--advance <branch>`: replay onto the branch and move it to the result. */
69
+ setAdvance(branch: string): this;
70
+ /** `--revert <branch>` (2.54+): revert the range, newest first, on the branch. */
71
+ setRevert(branch: string): this;
72
+ /** `--ref <ref>` (2.54+): the fully qualified ref to move instead. */
73
+ setRef(ref: string): this;
74
+ /** `--ref-action <mode>` (2.53+): `update` (the default) or `print`; others die. */
75
+ setRefAction(mode: ReplayRefAction | string): this;
76
+ /** `--contained`: move every branch at a replayed commit (with `--onto` only). */
77
+ setContained(contained: boolean): this;
78
+ /** `--linearize` (2.56+): drop merge commits, replaying the rest as one line. */
79
+ setLinearize(linearize: boolean): this;
80
+ /**
81
+ * A revision argument (`a..b`, `^a`, `a^!`, `--branches`, `--not`...), as
82
+ * `git rev-list` reads it.
83
+ */
84
+ addRevision(revision: string): this;
85
+ /** Other rev-list options of the walk (`--ancestry-path=<commit>`: `addAncestryPath`). */
86
+ configureWalk(step: (walk: RevListCommand) => void): this;
87
+ /** The git version to follow (default 2.56; see the module documentation). */
88
+ setCompatibility(version: ReplayCompatibility): this;
89
+ protected run(): Promise<number>;
90
+ /** get_ref_action_mode: the option, else `replay.refAction`, else `update`. */
91
+ private refActionMode;
92
+ /** peel_committish: the commit a commit-ish names, or git's death for the option. */
93
+ private peelCommittish;
94
+ /**
95
+ * get_name_decoration for each commit, the local branches and (`withHead`, a detached HEAD)
96
+ * HEAD: load_ref_decorations adds refs in name order, then HEAD, each in front of the
97
+ * commit's list.
98
+ */
99
+ private localDecorations;
100
+ /**
101
+ * pick_regular_commit: merges the commit's change onto `base` (reverted: its inverse) and
102
+ * writes the result commit; undefined on a conflict, `base` itself when the change is
103
+ * already there (2.54+).
104
+ */
105
+ private pick;
106
+ /** create_commit: the original's author, message and extra headers on the new tree. */
107
+ private createCommit;
108
+ /** The object's content as stored. */
109
+ private readObject;
110
+ /** The refs moved in one transaction (a detached HEAD in a second one: see the module). */
111
+ private applyUpdates;
112
+ /** The stores the merge reads: a missing tree is merge-ort's `Could not read`. */
113
+ private mergeStores;
114
+ /** The worktree, none in a bare repository (its attributes are read from it). */
115
+ private worktreeOrNone;
116
+ }
117
+ //# sourceMappingURL=replay-command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"replay-command.d.ts","sourceRoot":"","sources":["../../src/commands/replay-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAmBH,OAAO,EAAE,eAAe,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1F,aAAa,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,GAAG,IAAI,CAIxD;IAED,8EAA8E;IAC9E,gBAAgB,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAInD;IAED,UAAgB,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,CA8KrC;IAED,+EAA+E;IAC/E,OAAO,CAAC,aAAa;IAWrB,qFAAqF;YACvE,cAAc;IAgB5B;;;;OAIG;YACW,gBAAgB;IA0B9B;;;;OAIG;YACW,IAAI;IA2DlB,uFAAuF;YACzE,YAAY;IAqE1B,sCAAsC;YACxB,UAAU;IAoBxB,2FAA2F;YAC7E,YAAY;IA8B1B,kFAAkF;IAClF,OAAO,CAAC,WAAW;IAWnB,iFAAiF;IACjF,OAAO,CAAC,cAAc;CAOvB"}
@@ -0,0 +1,136 @@
1
+ /**
2
+ * `git repo info` and `git repo structure` (builtin/repo.c, git 2.52+).
3
+ *
4
+ * ```typescript
5
+ * const { stdout } = await git.repoInfo().addKeys("layout.bare", "object.format").callOutput();
6
+ * // "layout.bare=false\nobject.format=sha1\n"
7
+ * const table = await git.repoStructure().callOutput(); // the "Repository structure" table
8
+ * ```
9
+ *
10
+ * Both write stdout as git does and return git's exit status ({@link PlumbingCommand}). The
11
+ * keys of `repo info` depend on the git version ({@link RepoInfoCommand.setCompatibility}).
12
+ */
13
+ import { type ObjectId } from "@statewalker/vcs-core";
14
+ import { PlumbingCommand } from "./plumbing-command.js";
15
+ /**
16
+ * The `repo info` key sets: "2.54" (2.54 and 2.55: `layout.*`, `object.format`,
17
+ * `references.format`), "2.56" (2.56.x: also `path.commondir.*` and `path.gitdir.*`), "2.57"
18
+ * (git master after 2.56: `objects.storageFormat`, the other `path.*` keys, and
19
+ * `references.format` renamed `references.storageFormat`). `repo structure` is the same in all.
20
+ */
21
+ export type RepoCompatibility = "2.54" | "2.56" | "2.57";
22
+ /** path.c's relative_path (POSIX: `/` the only separator). */
23
+ export declare function gitRelativePath(input: string, prefix: string): string;
24
+ /**
25
+ * `git repo info [--format=(lines|nul) | -z] [--all | <key>...]` and `git repo info --keys`.
26
+ *
27
+ * Paths are host paths: the FilesApi's root directory joined with its paths, resolved through
28
+ * the host's `realPath`; without a root directory the path keys are empty. Not followed:
29
+ * `$GIT_DIR`/`$GIT_COMMON_DIR` given apart from the working copy (the working copy's own
30
+ * directories are reported). `path.superprojectworkingtree.*` is found where the repository's
31
+ * git directory is `<super>/.git/modules/<name>` and the superproject's worktree holds the
32
+ * repository at its place (git asks the superproject's index).
33
+ */
34
+ export declare class RepoInfoCommand extends PlumbingCommand {
35
+ private format;
36
+ private all;
37
+ private showKeys;
38
+ private keys;
39
+ private compatibility;
40
+ private currentDirectory;
41
+ /** `--format=<format>` (`lines`, `nul`; `table` is refused when printing values) */
42
+ setFormat(format: string): this;
43
+ /** `-z`: `--format=nul` */
44
+ setNul(): this;
45
+ /** `--all`: every key */
46
+ setAll(all: boolean): this;
47
+ /** `--keys`: the key names instead of values */
48
+ setShowKeys(keys: boolean): this;
49
+ /** The keys asked for, in order (repeats allowed). */
50
+ addKeys(...keys: string[]): this;
51
+ /** The git version whose keys are known (default 2.57: git master). */
52
+ setCompatibility(compatibility: RepoCompatibility): this;
53
+ /** The directory git runs from, below the worktree top (`path.prefix`, relative paths). */
54
+ setCurrentDirectory(path: string): this;
55
+ protected run(): Promise<number>;
56
+ private facts;
57
+ /** get_superproject_working_tree, for a git directory under `<super>/.git/modules/`. */
58
+ private superprojectOf;
59
+ }
60
+ /** Counts and sizes `repo structure` prints of each object type. */
61
+ interface ObjectValues {
62
+ commits: number;
63
+ trees: number;
64
+ blobs: number;
65
+ tags: number;
66
+ }
67
+ interface Largest {
68
+ id: ObjectId | undefined;
69
+ value: number;
70
+ }
71
+ /** What `git repo structure` counted. */
72
+ export interface RepoStructure {
73
+ references: {
74
+ branches: number;
75
+ tags: number;
76
+ remotes: number;
77
+ others: number;
78
+ };
79
+ counts: ObjectValues;
80
+ inflatedSizes: ObjectValues;
81
+ diskSizes: ObjectValues;
82
+ largest: {
83
+ commitSize: Largest;
84
+ treeSize: Largest;
85
+ blobSize: Largest;
86
+ tagSize: Largest;
87
+ parentCount: Largest;
88
+ treeEntries: Largest;
89
+ };
90
+ }
91
+ /** strbuf.c's humanise_count. */
92
+ export declare function humaniseCount(count: number): {
93
+ value: string;
94
+ unit?: string;
95
+ };
96
+ /** strbuf.c's humanise_bytes with HUMANISE_COMPACT. */
97
+ export declare function humaniseBytesCompact(bytes: number): {
98
+ value: string;
99
+ unit: string;
100
+ };
101
+ /**
102
+ * `git repo structure [--format=(table|lines|nul) | -z] [--[no-]progress]`: the references
103
+ * by kind and the objects reachable from them (path-walk.c's walk over every ref, as git
104
+ * walks it, so ties of the largest objects go to the object git meets first), with their
105
+ * inflated and on-disk sizes (a packed object's entry, a loose object's file; an object only
106
+ * an alternate holds counts 0 bytes on disk).
107
+ */
108
+ export declare class RepoStructureCommand extends PlumbingCommand {
109
+ private format;
110
+ private showProgress;
111
+ private counted?;
112
+ /** `--format=<format>` (`table`, `lines`, `nul`) */
113
+ setFormat(format: string): this;
114
+ /** `-z`: `--format=nul` */
115
+ setNul(): this;
116
+ /** `--progress`: the final progress lines on stderr (git's default: on a terminal only) */
117
+ setShowProgress(progress: boolean): this;
118
+ /** What the last run counted. */
119
+ getStructure(): RepoStructure | undefined;
120
+ protected run(): Promise<number>;
121
+ /** count_references: every ref under refs/ (symbolic ones resolved), in name order. */
122
+ private countReferences;
123
+ /** structure_count_objects: path-walk.c's walk_objects_by_path from the refs. */
124
+ private countObjects;
125
+ /**
126
+ * The bytes an object takes on disk, as odb_read_object_info_extended's `disk_sizep`: its
127
+ * pack entry (to the next entry by offset, or the trailer), else its loose file.
128
+ */
129
+ private diskSizer;
130
+ /** stats_table_setup_structure + stats_table_print_structure. */
131
+ private table;
132
+ /** structure_keyvalue_print. */
133
+ private keyValues;
134
+ }
135
+ export {};
136
+ //# sourceMappingURL=repo-command.d.ts.map
@@ -0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E,MAAM,GAAG,IAAI,CAM9B;IAED,2BAA2B;IAC3B,MAAM,IAAI,IAAI,CAEb;IAED,2FAA2F;IAC3F,eAAe,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAIvC;IAED,iCAAiC;IACjC,YAAY,IAAI,aAAa,GAAG,SAAS,CAExC;IAED,UAAgB,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,CA4BrC;IAED,uFAAuF;YACzE,eAAe;IAmB7B,iFAAiF;YACnE,YAAY;IAmL1B;;;OAGG;YACW,SAAS;IAqDvB,iEAAiE;IACjE,OAAO,CAAC,KAAK;IA2Eb,gCAAgC;IAChC,OAAO,CAAC,SAAS;CAkClB"}
@@ -0,0 +1,82 @@
1
+ /**
2
+ * `git request-pull` (git-request-pull.sh) as a library command: the text asking someone to
3
+ * pull a branch or tag of a published repository, with the range's shortlog and diffstat.
4
+ *
5
+ * @example
6
+ * ```typescript
7
+ * // git request-pull v1.0 https://example.com/repo.git main:for-linus
8
+ * const { stdout, stderr, exitCode } = await git
9
+ * .requestPull()
10
+ * .setStart("v1.0")
11
+ * .setUrl("https://example.com/repo.git")
12
+ * .setEnd("main:for-linus")
13
+ * .call();
14
+ * ```
15
+ */
16
+ import { TransportCommand } from "../transport-command.js";
17
+ import type { PlumbingTextOutput } from "./check-ref-format-command.js";
18
+ /**
19
+ * `git request-pull [-p] <start> <url> [<end>]`. The result is git's stdout, stderr and exit
20
+ * status: 1 with git's `warn:` lines when `<url>` has no ref of the remote name (default
21
+ * `HEAD`) at the commit asked for, or one at another object (the text is still printed), 1
22
+ * with git's `fatal:` line when a revision names nothing or the two have no common history.
23
+ *
24
+ * The remote's refs are listed through the command's transports (credentials and headers as
25
+ * {@link TransportCommand} gives them); everything else is read from the repository: the
26
+ * merge base, the shortlog (`git shortlog ^<start> <end>`, mailmap applied) and `git diff -M
27
+ * --stat --summary [-p]` of the merge base and the end.
28
+ */
29
+ export declare class RequestPullCommand extends TransportCommand<PlumbingTextOutput> {
30
+ private start;
31
+ private url;
32
+ private end;
33
+ private patch;
34
+ private compatibility;
35
+ /** `<start>`: the commit the changes are based on (the upstream's), any committish. */
36
+ setStart(start: string): this;
37
+ /** `<url>`: the repository to pull from, a URL or a remote's name. */
38
+ setUrl(url: string): this;
39
+ /**
40
+ * `<end>`: what to pull, `<local>[:<remote>]` (default `HEAD`, asked as the remote's
41
+ * `HEAD`); the remote side is the name looked for among the remote's refs.
42
+ */
43
+ setEnd(end: string): this;
44
+ /** `-p`: the patch after the diffstat. */
45
+ setPatch(patch: boolean): this;
46
+ /**
47
+ * The git version to follow (default 2.56). Before 2.50 a Perl script matched the remote's
48
+ * refs and kept the last ref matching, from 2.50 a shell loop keeps the first.
49
+ */
50
+ setCompatibility(version: "2.43" | "2.56"): this;
51
+ call(): Promise<PlumbingTextOutput>;
52
+ private run;
53
+ /** `git rev-parse --verify --quiet <name>`: undefined when it names no single object. */
54
+ private verify;
55
+ /** `git symbolic-ref -q <name>`: the ref a symbolic ref names, else undefined. */
56
+ private symbolicRef;
57
+ /**
58
+ * `git show-ref --heads --tags <name> | cut -d' ' -f2`: the branches and tags the name ends
59
+ * (several lines when it names several, which `rev-parse` then refuses).
60
+ */
61
+ private showRef;
62
+ /**
63
+ * `git ls-remote <url>`: HEAD first, then each ref and its peeled object (`<ref>^{}`). A
64
+ * listing that fails leaves its lines on stderr and lists nothing, as the pipe does.
65
+ */
66
+ private listRemote;
67
+ /**
68
+ * find_matching_ref: the remote ref named `asked` (or ending in `/<asked>`) at `headrev`,
69
+ * with the object the remote's matching unpeeled ref names. 2.50+ (a shell loop) stops at
70
+ * the first match; 2.43's Perl script meant to (`break` is no Perl statement) and keeps the
71
+ * last one, the object of the last unpeeled matching ref.
72
+ */
73
+ private matchRef;
74
+ /** `git show -s --format=<format> <id>` */
75
+ private show;
76
+ /**
77
+ * `git cat-file tag <head> | sed -n -e '1,/^$/d' -e '/^-----BEGIN \(PGP\|SSH\|SIGNED\) /q'
78
+ * -e p` when the end names a tag: its message up to the signature (undefined otherwise).
79
+ */
80
+ private tagMessage;
81
+ }
82
+ //# sourceMappingURL=request-pull-command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request-pull-command.d.ts","sourceRoot":"","sources":["../../src/commands/request-pull-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAqBxE;;;;;;;;;;GAUG;AACH,qBAAa,kBAAmB,SAAQ,gBAAgB,CAAC,kBAAkB,CAAC;IAC1E,OAAO,CAAC,KAAK,CAAM;IACnB,OAAO,CAAC,GAAG,CAAM;IACjB,OAAO,CAAC,GAAG,CAAM;IACjB,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,aAAa,CAA2B;IAEhD,uFAAuF;IACvF,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAI5B;IAED,sEAAsE;IACtE,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAIxB;IAED;;;OAGG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAIxB;IAED,0CAA0C;IAC1C,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAI7B;IAED;;;OAGG;IACH,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI/C;IAEK,IAAI,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAaxC;YAEa,GAAG;IA2FjB,yFAAyF;YAC3E,MAAM;IASpB,kFAAkF;YACpE,WAAW;IASzB;;;OAGG;YACW,OAAO;IAcrB;;;OAGG;YACW,UAAU;IAmBxB;;;;;OAKG;IACH,OAAO,CAAC,QAAQ;IAsChB,2CAA2C;YAC7B,IAAI;IAMlB;;;OAGG;YACW,UAAU;CAgCzB"}