@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
package/README.md CHANGED
@@ -71,7 +71,7 @@ For a Git-compatible on-disk repository, build the `WorkingCopy` from the file-b
71
71
  | Inspection | `diff()`, `describe()` |
72
72
  | Remotes | `fetch()`, `push()`, `pull()`, `clone()`, `lsRemote()`, `remoteAdd()`, `remoteRemove()`, `remoteList()`, `remoteSetUrl()` |
73
73
  | Stash | `stashCreate()`, `stashApply()`, `stashDrop()`, `stashList()` |
74
- | Maintenance | `gc()`, `packRefs()`, `fsck()`, `verifyPack()` |
74
+ | Maintenance | `gc()`, `packRefs()`, `fsck()`, `verifyPack()`, `refsMigrate()` (files ⇄ reftable), `refsVerify()`, `refsExists()`, `refsList()`, `refsOptimize()` |
75
75
  | Static | `Git.fromWorkingCopy(wc)`, `Git.init()` |
76
76
  | Components | `workingCopy`, `history`, `checkoutState`, `worktree` |
77
77
 
@@ -1 +1 @@
1
- {"version":3,"file":"add-command.d.ts","sourceRoot":"","sources":["../../src/commands/add-command.ts"],"names":[],"mappings":"AAEA,OAAO,EAUL,KAAK,QAAQ,EAId,MAAM,+BAA+B,CAAC;AASvC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,aAAa,EAInB,MAAM,sBAAsB,CAAC;AAmB9B,OAAO,EAOL,KAAK,mBAAmB,EAIzB,MAAM,eAAe,CAAC;AAMvB;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,oDAAoD;IACpD,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC;IAEzB,mEAAmE;IACnE,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAE3B;;;;OAIG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAE3B,uEAAuE;IACvE,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAE3B,sCAAsC;IACtC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAEhC;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAE5B;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;IAE1B,oFAAoF;IACpF,QAAQ,CAAC,K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AAG,IAAI,CAIzC;IAED;;;;;;;;;;;;;;;OAeG;IACH,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAI3B;IAED,gFAAgF;IAChF,SAAS,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CAItC;IAED,6EAA6E;YAC/D,QAAQ;IA8DtB,gGAAgG;IAChG,gBAAgB,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI,CAI9C;IAED,uFAAuF;IACvF,eAAe,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI,CAI3C;IAED,wEAAwE;YAC1D,SAAS;IA4BvB,4FAA4F;YAC9E,eAAe;IAmC7B;;;;;;OAMG;IACG,IAAI,IAAI,OAAO,CAAC,SAAS,CAAC,CAW/B;IAED,qFAAqF;IACrF,OAAO,CAAC,QAAQ;YAiBF,QAAQ;IA2FtB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAS3B,6EAA6E;IAC7E,OAAO,CAAC,cAAc;IAYtB,mEAAmE;IACnE,OAAO,CAAC,MAAM;IAQd;;;;;;;;;;;;;OAaG;YACW,YAAY;IA8T1B;;;;;OAKG;YACW,cAAc;IAU5B,8FAA8F;IAC9F,OAAO,CAAC,cAAc;IAItB,kFAAkF;IAClF,OAAO,CAAC,cAAc;IAItB,mGAAmG;IACnG,OAAO,CAAC,aAAa;IAIrB,uFAAuF;YACzE,YAAY;IAgB1B;;;;;OAKG;YACW,YAAY;IAiH1B;;;;OAIG;IACH,OAAO,CAAC,YAAY;IAIpB;;;;;;;OAOG;YACW,YAAY;IAY1B,8EAA8E;YAChE,WAAW;IAoBzB;;;;;;;;;;;OAWG;YACW,aAAa;IA6G3B;;;;OAIG;YACW,qBAAqB;IAKnC;;;;OAIG;YACW,UAAU;IA4BxB;;;;;;;;;OASG;YACW,gBAAgB;CAoH/B"}
@@ -27,6 +27,8 @@ export interface PatchBackendOptions {
27
27
  mode: PatchMode;
28
28
  /** The revision the diff compares with (`diff-index <rev>`); the empty tree for none */
29
29
  revision?: string;
30
+ /** The `trees` diff's second tree-ish (`diff-tree -r <revision> <newRevision>`) */
31
+ newRevision?: string;
30
32
  /** The pathspec elements */
31
33
  paths?: string[];
32
34
  /** `-U<n>` / `diff.context` (add-patch passes it on) */
@@ -1 +1 @@
1
- {"version":3,"file":"patch-backend.d.ts","sourceRoot":"","sources":["../../../src/commands/add-patch/patch-backend.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D,OAAO,EAIL,KAAK,YAAY,EAGlB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAIlD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,4CAA4C;AAC5C,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,OAAO,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,CAAC,CAAC;CACtE;AAED,gFAAgF;AAChF,MAAM,MAAM,cAAc,GAAG,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;AAE9D,6CAA6C;AAC7C,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,WAAW,CAAC;IACzB,IAAI,EAAE,SAAS,CAAC;IAChB,wFAAwF;IACxF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,wDAAwD;IACxD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uDAAuD;IACvD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IA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AAG,OAAO,CAAC,CAAC;CACtE;AAED,gFAAgF;AAChF,MAAM,MAAM,cAAc,GAAG,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;AAE9D,6CAA6C;AAC7C,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,WAAW,CAAC;IACzB,IAAI,EAAE,SAAS,CAAC;IAChB,wFAAwF;IACxF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mFAAmF;IACnF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,wDAAwD;IACxD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uDAAuD;IACvD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,sEAAsE;IACtE,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B;;;OAGG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC;;;OAGG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;CAClC;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,mBAAmB,GAAG,YAAY,CAqG7E;AAED;;;;;;;GAOG;AACH,qBAAa,YAAa,SAAQ,UAAU,CAAC,MAAM,CAAC;IAClD,OAAO,CAAC,MAAM,CAAS;IAEvB;;;OAGG;IACH,SAAS,CAAC,MAAM,UAAO,GAAG,IAAI,CAG7B;IAEK,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CAE5B;IAED;;;OAGG;IACG,OAAO,IAAI,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,OAAO,CAAA;KAAE,CAAC,CAqD/D;CACF"}
@@ -22,7 +22,9 @@ export type PatchModeName =
22
22
  /** `restore -p --source=HEAD` */
23
23
  | "worktree_head"
24
24
  /** `restore -p --source=<tree-ish>` */
25
- | "worktree_nothead";
25
+ | "worktree_nothead"
26
+ /** `git history split`: a commit's changes staged into a temporary index of its parent */
27
+ | "index";
26
28
  /** The diff a mode shows (add-patch.c's `diff_cmd`). */
27
29
  export type PatchDiffKind =
28
30
  /** `diff-files`: the index against the worktree */
@@ -30,7 +32,9 @@ export type PatchDiffKind =
30
32
  /** `diff-index <rev>`: the revision against the worktree */
31
33
  | "index"
32
34
  /** `diff-index --cached <rev>`: the revision against the index */
33
- | "index-cached";
35
+ | "index-cached"
36
+ /** `diff-tree -r <tree> <commit>`: two trees (`run_add_p_index`) */
37
+ | "trees";
34
38
  /** How `git apply` is run (`--cached`, `-R`). */
35
39
  export interface PatchApplyArgs {
36
40
  cached: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"patch-modes.d.ts","sourceRoot":"","sources":["../../../src/commands/add-patch/patch-modes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,6EAA6E;AAC7E,MAAM,MAAM,aAAa;AACvB,eAAe;AACb,OAAO;AACT,sBAAsB;GACpB,OAAO;AACT,+CAA+C;GAC7C,YAAY;AACd,uEAAuE;GACrE,eAAe;AACjB,mDAAmD;GACjD,gBAAgB;AAClB,2DAA2D;GACzD,eAAe;AACjB,qEAAqE;GACnE,kBAAkB;AACpB,iCAAiC;GAC/B,eAAe;AACjB,uCAAuC;GACrC,kBAAkB,CAAC;AAEvB,wDAAwD;AACxD,MAAM,MAAM,aAAa;AACvB,mDAAmD;AACjD,OAAO;AACT,4DAA4D;GAC1D,OAAO;AACT,kEAAkE;GAChE,cAAc,CAAC;AAEnB,iDAAiD;AACjD,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,6DAA6D;AAC7D,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,6BAA6B;IAC7B,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,4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AC,aAAa,EAAE,SAAS,CAAC,CAwIlE,CAAC;AAEF;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,KAAK,GAAG,OAAO,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,EAC5D,QAAQ,CAAC,EAAE,MAAM,GAChB,SAAS,CAsBX"}
@@ -23,6 +23,10 @@ export interface PatchSelectionRequest extends PatchOptions {
23
23
  selector: PatchSelector | undefined;
24
24
  /** The revision the diff compares with (a tree-ish; the empty tree for an unborn HEAD) */
25
25
  diffRevision?: string;
26
+ /** The `trees` mode's second tree-ish */
27
+ newDiffRevision?: string;
28
+ /** add-patch's ADD_P_DISALLOW_EDIT: no `e` */
29
+ disallowEdit?: boolean;
26
30
  paths: string[];
27
31
  compatibility?: PatchCompatibility;
28
32
  temporaryIndex?: TemporaryIndex;
@@ -1 +1 @@
1
- {"version":3,"file":"patch-session.d.ts","sourceRoot":"","sources":["../../../src/commands/add-patch/patch-session.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAChB,KAAK,aAAa,EAEnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAE,KAAK,SAAS,EAAgB,MAAM,kBAAkB,CAAC;AAEhE,uDAAuD;AACvD,MAAM,WAAW,YAAY;IAC3B,yDAAyD;IACzD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mEAAmE;IACnE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,6FAA6F;IAC7F,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,gEAAgE;AAChE,MAAM,WAAW,qBAAsB,SAAQ,YAAY;IACzD,IAAI,EAAE,S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AU,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CACzD,GACA,OAAO,CAAC;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAcvD;AAED,mFAAmF;AACnF,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAI7F"}
@@ -6,10 +6,13 @@
6
6
  * (`am: <subject>`, `am --abort`), the output ("Applying: <subject>", "Patch failed at
7
7
  * ...") and the advice, and `--continue`, `--skip`, `--abort`, `--quit`.
8
8
  *
9
- * Not run: the `applypatch-msg`, `pre-applypatch` and `post-applypatch` hooks, rerere,
10
- * and the auto maintenance git starts at the end. Notes are not copied: plain `git am`
9
+ * rerere runs where git's does: on the three-way fallback's conflicts (`--[no-]rerere-autoupdate`,
10
+ * kept in `rerere-autoupdate`), before `--continue`'s commit, `rerere clear` on `--skip`,
11
+ * `--abort` and `--quit`. Not run: the `applypatch-msg`, `pre-applypatch` and
12
+ * `post-applypatch` hooks, and the auto maintenance git starts at the end. Notes are not copied: plain `git am`
11
13
  * copies none (only `rebase --apply` does, through `rewritten`).
12
14
  */
15
+ import { type PersonIdent } from "@statewalker/vcs-core";
13
16
  import { GitCommand } from "../../git-command.js";
14
17
  import { type AmPatchFormat } from "./patch-format.js";
15
18
  /** What `git am` printed and how it ended. */
@@ -55,6 +58,8 @@ export declare class AmCommand extends GitCommand<AmResult> {
55
58
  private fixedClock?;
56
59
  private resume?;
57
60
  private threeWay?;
61
+ /** `--[no-]rerere-autoupdate` (undefined: `rerere.autoUpdate`) */
62
+ private rerereAutoUpdate?;
58
63
  private signoff;
59
64
  private keepCr?;
60
65
  private keep;
@@ -74,6 +79,11 @@ export declare class AmCommand extends GitCommand<AmResult> {
74
79
  private legacyMessages;
75
80
  private interactive?;
76
81
  private editor?;
82
+ /** `--rebasing` (hidden): `git rebase --apply`'s session */
83
+ private rebasing;
84
+ /** `--resolvemsg=<msg>`: the advice given where a patch stops */
85
+ private resolveMessage?;
86
+ private committerOverride?;
77
87
  private out;
78
88
  private err;
79
89
  /**
@@ -116,6 +126,12 @@ export declare class AmCommand extends GitCommand<AmResult> {
116
126
  */
117
127
  setShowCurrentPatch(mode?: "raw" | "diff"): this;
118
128
  /** `-3` / `--3way` (default `am.threeWay`). */
129
+ /**
130
+ * `--rerere-autoupdate` (true) / `--no-rerere-autoupdate` (false): whether resolutions
131
+ * rerere replays when the three-way fallback conflicts are staged (default
132
+ * `rerere.autoUpdate`); kept in the session (`rerere-autoupdate`).
133
+ */
134
+ setRerereAutoUpdate(value: boolean): this;
119
135
  setThreeWay(value: boolean): this;
120
136
  /** `-s` / `--signoff`. */
121
137
  setSignoff(value: boolean): this;
@@ -161,6 +177,23 @@ export declare class AmCommand extends GitCommand<AmResult> {
161
177
  setEmpty(mode: "stop" | "drop" | "keep"): this;
162
178
  /** The options passed through to `git apply`. */
163
179
  setApplyOptions(options: AmApplyOptions): this;
180
+ /**
181
+ * `--rebasing` (git's hidden option, given by `git rebase --apply`): each mail names the
182
+ * commit it came from (`From <id>`), whose author, message and diff (`diff-tree --binary
183
+ * --full-index`) are taken instead of the mail's (`parse_mail_rebase`, `original-commit`,
184
+ * REBASE_HEAD); the three-way fallback is always on, ORIG_HEAD is left to the rebase, each
185
+ * commit made is listed in `rewritten` (notes copied and post-rewrite told `rebase` at the
186
+ * end) and the state directory is left for the rebase to remove.
187
+ */
188
+ setRebasing(value: boolean): this;
189
+ /**
190
+ * The committer of the commits made (a rebase's), in place of the one git resolves from
191
+ * the environment and configuration.
192
+ */
193
+ setCommitter(committer: PersonIdent): this;
194
+ protected resolveCommitter(fallback?: Pick<PersonIdent, "name" | "email">): PersonIdent;
195
+ /** `--resolvemsg=<msg>`: the advice given instead of am's where a patch stops. */
196
+ setResolveMessage(message: string | undefined): this;
164
197
  /** git before 2.46 prints the resolve advice on stdout, not as hints. */
165
198
  setLegacyMessages(value: boolean): this;
166
199
  /**
@@ -219,6 +252,12 @@ export declare class AmCommand extends GitCommand<AmResult> {
219
252
  private dieUserResolve;
220
253
  private patchIsEmpty;
221
254
  private amRun;
255
+ /**
256
+ * `parse_mail_rebase`: the commit the mail names (`From <id>`) gives the author, the date
257
+ * (`show_ident_date`, git's default format), the message and the patch
258
+ * (`write_commit_patch`); `original-commit` and REBASE_HEAD name it.
259
+ */
260
+ private parseMailRebase;
222
261
  /**
223
262
  * `setup_mailinfo`'s config (`git_mailinfo_config`, in config order): `mailinfo.scissors`
224
263
  * and `mailinfo.quotedCr`; a value git refuses dies as git's config callback does.
@@ -1 +1 @@
1
- {"version":3,"file":"am-command.d.ts","sourceRoot":"","sources":["../../../src/commands/am/am-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAWH,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAuClD,OAAO,EACL,KAAK,aAAa,EAInB,MAAM,mBAAmB,CAAC;AAI3B,8CAA8C;AAC9C,MAAM,WAAW,QAAQ;IACvB,kEAAkE;IAClE,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAYD,wEAAwE;AACxE,MAAM,WAAW,cAAc;IAC7B,cAAc;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8BAA8B;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0BAA0B;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yBAAyB;IACzB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,yBAAyB;IACzB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,iBAAiB;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,4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AQT,QAAQ;IAiItB;;;;OAIG;YACW,SAAS;YAmBT,OAAO;YAiCP,KAAK;IAmBnB;;;;;;;OAOG;YACW,UAAU;IAkBxB,OAAO,CAAC,gBAAgB;CAWzB;AAED,gFAAgF;AAChF,MAAM,WAAW,oBAAoB;IACnC,kCAAkC;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,mDAAmD;IACnD,OAAO,EAAE,MAAM,CAAC;IAChB,sDAAsD;IACtD,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wFAAwF;AACxF,MAAM,MAAM,mBAAmB,GAAG,CAChC,OAAO,EAAE,oBAAoB,KAC1B,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;AAEtD,wFAAwF;AACxF,MAAM,MAAM,eAAe,GAAG,CAC5B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,KACZ,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;AAuBtD,UAAU,KAAK;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;CAClB;AAOD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,CA8C9C"}
@@ -2,5 +2,5 @@ export * from "./apply-command.js";
2
2
  export type { ApplyIndexEntry, ApplyInput, ApplyIO } from "./apply-engine.js";
3
3
  export { ApplyEngine } from "./apply-engine.js";
4
4
  export type { FilePatch, PatchFragment, WsErrorAction } from "./apply-types.js";
5
- export { bytesToLatin1, latin1ToBytes, latin1ToPath, latin1ToText, pathToLatin1, textToLatin1, } from "./latin1.js";
5
+ export { bytesToLatin1, cUnquote, latin1ToBytes, latin1ToPath, latin1ToText, pathToLatin1, textToLatin1, } from "./latin1.js";
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/apply/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EACL,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,GACb,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/apply/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EACL,aAAa,EACb,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,GACb,MAAM,aAAa,CAAC"}
@@ -0,0 +1,169 @@
1
+ /**
2
+ * `git archive` (archive.c, builtin/archive.c): a tar or zip archive of a tree, with git's
3
+ * `--prefix`, `--add-file`/`--add-virtual-file`, pathspecs, `--mtime`, compression levels,
4
+ * the `export-ignore` and `export-subst` attributes, and tar filters (`tar.<format>.command`,
5
+ * the builtin gzip of `tgz` and `tar.gz`).
6
+ *
7
+ * @example
8
+ * ```typescript
9
+ * // git archive --format=zip --prefix=project/ HEAD -- src
10
+ * const zip = await git.archive().setFormat("zip").setPrefix("project/").setTree("HEAD")
11
+ * .addPath("src").call();
12
+ * ```
13
+ */
14
+ import type { ObjectId, TreeEntry } from "@statewalker/vcs-core";
15
+ import { type AttributesResolver, type FilterDriverRegistry, type Worktree } from "@statewalker/vcs-working-tree";
16
+ import { GitCommand } from "../../git-command.js";
17
+ /** git's builtin gzip filter (`tar.tgz.command`, `tar.tar.gz.command`). */
18
+ export declare const INTERNAL_GZIP_COMMAND = "git archive gzip";
19
+ /**
20
+ * Runs a tar filter (`tar.<format>.command`, with ` -<level>` added for a compression
21
+ * level, as git runs it through the shell): the tar archive in, the filtered bytes out.
22
+ * Throwing is git's `'<command>' filter reported error`.
23
+ */
24
+ export type ArchiveFilterRunner = (command: string, input: Uint8Array) => Promise<Uint8Array>;
25
+ /**
26
+ * `git archive <tree-ish> [<path>...]`: the archive's bytes. Messages git prints on stderr
27
+ * (`-v`'s paths, warnings) are in {@link getMessages}; where git dies, a {@link GitApiError}
28
+ * carries its message and exit status.
29
+ *
30
+ * Deflated data (zip entries, `tgz`) comes from pako's zlib port, whose bytes differ from
31
+ * the system zlib git links: the archives match git's byte for byte except for those
32
+ * compressed streams (`-0` zips and tar archives match whole).
33
+ */
34
+ export declare class ArchiveCommand extends GitCommand<Uint8Array> {
35
+ private tree?;
36
+ private format?;
37
+ private outputName?;
38
+ private base;
39
+ private readonly paths;
40
+ private readonly extraFiles;
41
+ private mtime?;
42
+ private compressionLevel;
43
+ private verbose;
44
+ private worktreeAttributes;
45
+ private currentDirectory;
46
+ private filterRunner?;
47
+ private userUmask;
48
+ private localTzOffset?;
49
+ private filterDrivers?;
50
+ private compatibility;
51
+ private readonly messages;
52
+ /** Run by upload-archive (`write_archive`'s `remote`): `allowUnreachable` its setting */
53
+ private uploadArchive?;
54
+ /** The tree-ish archived (a commit, a tag, a tree). */
55
+ setTree(name: string): this;
56
+ /** `--format=<fmt>`: `tar`, `zip`, `tgz`, `tar.gz` or a configured tar filter. */
57
+ setFormat(format: string): this;
58
+ /**
59
+ * `-o <file>`'s name: the format is inferred from its extension when none is set
60
+ * (git's `archive_format_from_filename`). Nothing is written: the bytes are returned.
61
+ */
62
+ setOutputName(name: string): this;
63
+ /** `--prefix=<prefix>`: the last one prefixes the tree's paths, each one the added files after it. */
64
+ setPrefix(prefix: string): this;
65
+ /**
66
+ * `--add-file=<file>`: a file of the worktree (relative to {@link setCurrentDirectory}),
67
+ * added under the current prefix and its base name; `content` gives its bytes instead.
68
+ */
69
+ addFile(path: string, content?: Uint8Array, options?: {
70
+ executable?: boolean;
71
+ }): this;
72
+ /** `--add-virtual-file=<path>:<content>` (a C-quoted path allowed, as git reads it). */
73
+ addVirtualFile(spec: string): this;
74
+ /** A pathspec element (`git archive <tree-ish> <path>...`). */
75
+ addPath(path: string): this;
76
+ /** `--mtime=<time>`: the entries' time (git's approxidate). */
77
+ setMtime(time: string): this;
78
+ /** `-<n>`: the compression level (zip: 0 to 9, tar filters: any). */
79
+ setCompressionLevel(level: number): this;
80
+ /** `-v`: each path archived is reported in {@link getMessages}. */
81
+ setVerbose(verbose: boolean): this;
82
+ /** `--worktree-attributes`: attributes read from the worktree (and the index), not the tree. */
83
+ setWorktreeAttributes(on: boolean): this;
84
+ /**
85
+ * The directory git runs in, relative to the worktree's top (`git -C <dir> archive`):
86
+ * only what lies below it is archived, its paths relative to it.
87
+ */
88
+ setCurrentDirectory(dir: string): this;
89
+ /** Runs the tar filters' commands (git's shell); without it only the builtin gzip works. */
90
+ setFilterRunner(runner: ArchiveFilterRunner): this;
91
+ /** The umask `tar.umask=user` stands for (default 022). */
92
+ setUserUmask(umask: number): this;
93
+ /** The local time zone (zip's DOS times): its offset east of UTC in minutes at a time. */
94
+ setLocalTimezone(offset: (time: number) => number): this;
95
+ /**
96
+ * The git version whose behaviour to follow (default 2.56): 2.43 ends a tree holding a
97
+ * path `verify_path` refuses with the `error:` line alone and exit 255, 2.5x adds
98
+ * `fatal: failed to unpack tree object <tree>` (exit 128).
99
+ */
100
+ setCompatibility(version: "2.43" | "2.56"): this;
101
+ /** What git printed on stderr (`-v`'s paths, warnings). */
102
+ getMessages(): string[];
103
+ /** `git archive --list`: the formats, as git lists them. */
104
+ listFormats(): string[];
105
+ /**
106
+ * Runs the command as git's upload-archive runs it for `git archive --remote` (its
107
+ * `upload-archive--writer`): only formats served remotely (tar, zip, the tar filters with
108
+ * `tar.<format>.remote`, by default `tgz` and `tar.gz`), and, unless `allowUnreachable`
109
+ * (`uploadarchive.allowUnreachable`), only a tree-ish a ref names (`no such ref: <name>`).
110
+ * See {@link runArchiveWriter}.
111
+ */
112
+ setUploadArchive(options: {
113
+ allowUnreachable: boolean;
114
+ }): this;
115
+ /**
116
+ * The format `name`'s extension names (archive.c's `archive_format_from_filename`: the
117
+ * archivers of this repository's configuration), or undefined.
118
+ */
119
+ formatFromFilename(name: string): string | undefined;
120
+ /**
121
+ * The archivers in git's registration order: tar, the tar filters, zip; upload-archive's
122
+ * only those served remotely.
123
+ */
124
+ private archivers;
125
+ /** The `tar.*` variables in configuration order. */
126
+ private tarConfig;
127
+ /** `tar.umask`. */
128
+ private tarUmask;
129
+ /** The archive's bytes. */
130
+ call(): Promise<Uint8Array>;
131
+ private filter;
132
+ /** `--add-file`'s files read (git stats them while parsing its options). */
133
+ private readExtraFiles;
134
+ /** `parse_treeish_arg`: the tree, the commit (if any) and the archive's time. */
135
+ private resolveTreeish;
136
+ /** @internal */
137
+ get archiveWorktree(): Worktree | undefined;
138
+ /** @internal */
139
+ archiveSettings(): {
140
+ base: string;
141
+ paths: string[];
142
+ verbose: boolean;
143
+ worktreeAttributes: boolean;
144
+ currentDirectory: string;
145
+ messages: string[];
146
+ };
147
+ /** @internal */
148
+ archiveEntries(id: ObjectId): Promise<readonly TreeEntry[]>;
149
+ /** @internal */
150
+ archiveBlob(id: ObjectId): Promise<Uint8Array | undefined>;
151
+ /**
152
+ * The host's filter drivers (`filter=<name>`) for a repository without a worktree; a
153
+ * worktree's content filter brings its own.
154
+ */
155
+ setFilterDrivers(drivers: FilterDriverRegistry): this;
156
+ /** @internal */
157
+ archiveDrivers(): FilterDriverRegistry | undefined;
158
+ /** @internal */
159
+ archiveConfigObject(): import("@statewalker/vcs-working-tree").WorkingCopyConfig;
160
+ /** @internal */
161
+ archiveConfig(key: string): string | undefined;
162
+ /** @internal The attributes git reads without a worktree (bare, or `GIT_ATTR_INDEX`). */
163
+ archiveBareAttributes(indexTree: ObjectId | undefined): AttributesResolver;
164
+ /** @internal `%h` and friends, `%(describe)`, for `export-subst`. */
165
+ archiveSubstitute(format: string, commitId: ObjectId, describe: boolean): Promise<string>;
166
+ /** @internal */
167
+ get archiveTreeLookup(): import("../../git-command.js").CommandTrees;
168
+ }
169
+ //# sourceMappingURL=archive-command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"archive-command.d.ts","sourceRoot":"","sources":["../../../src/commands/archive/archive-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAIjE,OAAO,EACL,KAAK,kBAAkB,EAQvB,KAAK,oBAAoB,EAKzB,KAAK,QAAQ,EACd,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AA2BlD,2EAA2E;AAC3E,eAAO,MAAM,qBAAqB,qBAAqB,CAAC;AAExD;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;AAqC9F;;;;;;;;GAQG;AACH,qBAAa,cAAe,SAAQ,UAAU,CAAC,UAAU,CAAC;IACxD,OAAO,CAAC,IAAI,CAAC,CAAS;IACtB,OAAO,CAAC,MAAM,CAAC,CAAS;IACxB,OAAO,CAAC,UAAU,CAAC,CAAS;IAC5B,OAAO,CAAC,IAAI,CAAM;IAClB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IACtC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmB;IAC9C,OAAO,CAAC,KAAK,CAAC,CAAS;IACvB,OAAO,CAAC,gBAAgB,CAAM;IAC9B,OAAO,CAAC,OAAO,C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Q,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAU/D;IAED;;;OAGG;IACH,gBAAgB,CAAC,OAAO,EAAE,oBAAoB,GAAG,IAAI,CAIpD;IAED,gBAAgB;IAChB,cAAc,IAAI,oBAAoB,GAAG,SAAS,CAEjD;IAED,gBAAgB;IAChB,mBAAmB,8DAElB;IAED,gBAAgB;IAChB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE7C;IAED,yFAAyF;IACzF,qBAAqB,CAAC,SAAS,EAAE,QAAQ,GAAG,SAAS,GAAG,kBAAkB,CAQzE;IAED,qEAAqE;IAC/D,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAwB9F;IAED,gBAAgB;IAChB,IAAI,iBAAiB,gDAEpB;CACF"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * What the archive writers (archive-tar.c, archive-zip.c) are given: one call per entry, in
3
+ * the order `write_archive_entries` makes them, then the end of the archive.
4
+ */
5
+ /** An entry of an archive, as archive.c hands it to `write_entry`. */
6
+ export interface ArchiveEntry {
7
+ /** The path in the archive as bytes (prefix included; a directory ends in `/`) */
8
+ path: Uint8Array;
9
+ /** git's mode: `0o40000`/`0o40777` (a directory), `0o160000`, `0o120000`, `0o100644`… */
10
+ mode: number;
11
+ /** The object id in hex (an extra file: git's fake id, its number in the first 8 bytes) */
12
+ id: string;
13
+ /** The content (a symbolic link: its target); empty for directories */
14
+ content: Uint8Array;
15
+ /**
16
+ * The blob is streamed (git's `size > core.bigFileThreshold` with no export-subst): it is
17
+ * written unconverted, and zip writes it with a data descriptor
18
+ */
19
+ streamed?: boolean;
20
+ /**
21
+ * zip's `entry_is_binary`: the userdiff driver's `binary` setting for the path (`true`,
22
+ * `false`), undefined to look at the content (a NUL in its first 8000 bytes)
23
+ */
24
+ binary?: boolean;
25
+ }
26
+ /** What every archive writer is told besides its entries. */
27
+ export interface ArchiveSettings {
28
+ /** The entries' modification time in seconds (a commit's committer date, `--mtime`) */
29
+ time: number;
30
+ /** The commit archived (pax `comment`, zip comment), undefined for a tree */
31
+ commitId?: string;
32
+ /** zlib's level (`-0` … `-9`); -1 for zlib's default */
33
+ compressionLevel: number;
34
+ }
35
+ /** Writes an archive one entry at a time (`write_archive_entries`' callback). */
36
+ export interface ArchiveWriter {
37
+ /** Writes an entry; a string is git's `error:` message for an entry it refuses */
38
+ entry(entry: ArchiveEntry): string | undefined;
39
+ /** The archive's bytes (the trailer written) */
40
+ finish(): Uint8Array;
41
+ }
42
+ /** A growing byte buffer. */
43
+ export declare class ByteBuffer {
44
+ private buf;
45
+ length: number;
46
+ constructor(capacity?: number);
47
+ private reserve;
48
+ push(bytes: Uint8Array): void;
49
+ zeros(n: number): void;
50
+ /** The bytes written (a view: copy before writing more). */
51
+ bytes(): Uint8Array;
52
+ }
53
+ /** ASCII text as bytes. */
54
+ export declare function asciiBytes(text: string): Uint8Array;
55
+ /** git's `S_ISDIR`, `S_ISGITLINK`, `S_ISLNK`, `S_ISREG` on a mode. */
56
+ export declare const isDirMode: (mode: number) => boolean;
57
+ export declare const isGitlinkMode: (mode: number) => boolean;
58
+ export declare const isLinkMode: (mode: number) => boolean;
59
+ export declare const isRegMode: (mode: number) => boolean;
60
+ //# sourceMappingURL=archive-entry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"archive-entry.d.ts","sourceRoot":"","sources":["../../../src/commands/archive/archive-entry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,sEAAsE;AACtE,MAAM,WAAW,YAAY;IAC3B,kFAAkF;IAClF,IAAI,EAAE,UAAU,CAAC;IACjB,yFAAyF;IACzF,IAAI,EAAE,MAAM,CAAC;IACb,2FAA2F;IAC3F,EAAE,EAAE,MAAM,CAAC;IACX,uEAAuE;IACvE,OAAO,EAAE,UAAU,CAAC;IACpB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,6DAA6D;AAC7D,MAAM,WAAW,eAAe;IAC9B,uFAAuF;IACvF,IAAI,EAAE,MAAM,CAAC;IACb,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wDAAwD;IACxD,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,iFAAiF;AACjF,MAAM,WAAW,aAAa;IAC5B,kFAAkF;IAClF,KAAK,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,GAAG,SAAS,CAAC;IAC/C,gDAAgD;IAChD,MAAM,IAAI,UAAU,CAAC;CACtB;AAED,6BAA6B;AAC7B,qBAAa,UAAU;IACrB,OAAO,CAAC,GAAG,CAAa;IACxB,MAAM,SAAK;IAEX,YAAY,QAAQ,SAAQ,EAE3B;IAED,OAAO,CAAC,OAAO;IASf,IAAI,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAI5B;IAED,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAIrB;IAED,4DAA4D;IAC5D,KAAK,IAAI,UAAU,CAElB;CACF;AAID,2BAA2B;AAC3B,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAEnD;AAED,sEAAsE;AACtE,eAAO,MAAM,SAAS,SAAU,MAAM,YAAmC,CAAC;AAC1E,eAAO,MAAM,aAAa,SAAU,MAAM,YAAmC,CAAC;AAC9E,eAAO,MAAM,UAAU,SAAU,MAAM,YAAmC,CAAC;AAC3E,eAAO,MAAM,SAAS,SAAU,MAAM,YAAmC,CAAC"}
@@ -0,0 +1,8 @@
1
+ export * from "./archive-command.js";
2
+ export type { ArchiveEntry, ArchiveSettings, ArchiveWriter } from "./archive-entry.js";
3
+ export * from "./remote-archive-command.js";
4
+ export * from "./tar-archive.js";
5
+ export * from "./tar-commit-id.js";
6
+ export * from "./upload-archive-writer.js";
7
+ export * from "./zip-archive.js";
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/archive/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACvF,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * `git archive --remote=<repo> [--exec=<cmd>] [<options>] <tree-ish> [<path>...]`
3
+ * (builtin/archive.c's `run_remote_archiver`): the archive made by the remote's
4
+ * upload-archive.
5
+ */
6
+ import { TransportCommand } from "../../transport-command.js";
7
+ /** What `git archive --remote` gave. */
8
+ export interface RemoteArchiveResult {
9
+ /** 0; 1 when the remote reported an error; 128 when the client died */
10
+ exitCode: number;
11
+ /** The archive (git's stdout, or `-o`'s file), the `--list` lines for `--list` */
12
+ archive: Uint8Array;
13
+ /**
14
+ * git's stderr: the remote's messages as `remote: <line> ` lines (`-v`'s paths, its
15
+ * `fatal:` line), `remote: git upload-archive: archiver died with error` when it failed;
16
+ * for a local repository also the server process's own
17
+ * `fatal: sent error to the client: ...`, which native git prints in no fixed order
18
+ */
19
+ stderr: string;
20
+ }
21
+ /**
22
+ * `git archive --remote`: `git archive`'s arguments (without `--remote`, `--exec` and
23
+ * `--output`) sent to the remote's upload-archive, the archive it makes returned. A local
24
+ * repository is served in process (git runs `git-upload-archive` there); git:// and ssh
25
+ * through the command's transports; smart HTTP has no upload-archive (git's `operation not
26
+ * supported by protocol`).
27
+ *
28
+ * @example
29
+ * ```typescript
30
+ * // git archive --remote=origin --format=zip --prefix=p/ v1.0
31
+ * const { archive, exitCode } = await git
32
+ * .archiveRemote()
33
+ * .setRemote("origin")
34
+ * .addArguments("--format=zip", "--prefix=p/", "v1.0")
35
+ * .call();
36
+ * ```
37
+ */
38
+ export declare class RemoteArchiveCommand extends TransportCommand<RemoteArchiveResult> {
39
+ private remote?;
40
+ private exec?;
41
+ private outputName?;
42
+ private readonly args;
43
+ /** `--remote=<repo>`: a remote's name or a URL (a path for a local repository). */
44
+ setRemote(remote: string): this;
45
+ /** `--exec=<cmd>`: the program the remote runs (default `git-upload-archive`). */
46
+ setExec(exec: string): this;
47
+ /**
48
+ * `-o <file>`: its name's extension, read with this repository's archivers, is sent first
49
+ * as `--format=<format>` (an explicit `--format` wins). Nothing is written.
50
+ */
51
+ setOutputName(name: string): this;
52
+ /** `git archive`'s other arguments, as given (`--format=tar`, `-v`, `HEAD`, `--`, paths). */
53
+ addArguments(...args: string[]): this;
54
+ call(): Promise<RemoteArchiveResult>;
55
+ }
56
+ //# sourceMappingURL=remote-archive-command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote-archive-command.d.ts","sourceRoot":"","sources":["../../../src/commands/archive/remote-archive-command.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAM9D,wCAAwC;AACxC,MAAM,WAAW,mBAAmB;IAClC,uEAAuE;IACvE,QAAQ,EAAE,MAAM,CAAC;IACjB,kFAAkF;IAClF,OAAO,EAAE,UAAU,CAAC;IACpB;;;;;OAKG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,oBAAqB,SAAQ,gBAAgB,CAAC,mBAAmB,CAAC;IAC7E,OAAO,CAAC,MAAM,CAAC,CAAS;IACxB,OAAO,CAAC,IAAI,CAAC,CAAS;IACtB,OAAO,CAAC,UAAU,CAAC,CAAS;IAC5B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAgB;IAErC,mFAAmF;IACnF,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAI9B;IAED,kFAAkF;IAClF,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAI1B;IAED;;;OAGG;IACH,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAIhC;IAED,6FAA6F;IAC7F,YAAY,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAIpC;IAEK,IAAI,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAgDzC;CACF"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * git's tar writer (archive-tar.c): ustar headers with a pax global header carrying the
3
+ * commit id (`comment`), pax extended headers for paths and link targets that do not fit,
4
+ * records of 512 bytes written in blocks of 20 records, and the trailer that ends the
5
+ * archive with at least two zero records and fills its last block.
6
+ */
7
+ import { type ArchiveEntry, type ArchiveSettings, type ArchiveWriter } from "./archive-entry.js";
8
+ /** Options of {@link TarArchiveWriter}. */
9
+ export interface TarArchiveOptions extends ArchiveSettings {
10
+ /** `tar.umask` (default 002) */
11
+ umask?: number;
12
+ }
13
+ /** Writes git's tar archive (`git archive --format=tar`). */
14
+ export declare class TarArchiveWriter implements ArchiveWriter {
15
+ private readonly settings;
16
+ private readonly out;
17
+ private readonly umask;
18
+ private time;
19
+ constructor(settings: TarArchiveOptions);
20
+ /** `write_blocked`: data padded to a whole record. */
21
+ private writeBlocked;
22
+ /** `prepare_header`: the numeric fields, owner, magic and checksum. */
23
+ private prepareHeader;
24
+ private writeGlobalExtendedHeader;
25
+ private writeExtendedHeader;
26
+ /** `write_tar_entry`. */
27
+ entry(entry: ArchiveEntry): string | undefined;
28
+ /** `write_trailer`: the last block filled, another one when fewer than two records remain. */
29
+ finish(): Uint8Array;
30
+ }
31
+ //# sourceMappingURL=tar-archive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tar-archive.d.ts","sourceRoot":"","sources":["../../../src/commands/archive/tar-archive.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,aAAa,EAOnB,MAAM,oBAAoB,CAAC;AAkC5B,2CAA2C;AAC3C,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IACxD,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA8BD,6DAA6D;AAC7D,qBAAa,gBAAiB,YAAW,aAAa;IAKxC,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAJrC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAA6B;IACjD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,IAAI,CAAS;IAErB,YAA6B,QAAQ,EAAE,iBAAiB,EAIvD;IAED,sDAAsD;IACtD,OAAO,CAAC,YAAY;IAMpB,uEAAuE;IACvE,OAAO,CAAC,aAAa;IAoBrB,OAAO,CAAC,yBAAyB;IAgBjC,OAAO,CAAC,mBAAmB;IAS3B,yBAAyB;IACzB,KAAK,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,GAAG,SAAS,CA8C7C;IAED,8FAA8F;IAC9F,MAAM,IAAI,UAAU,CAMnB;CACF"}
@@ -0,0 +1,13 @@
1
+ /** What `git get-tar-commit-id` writes and its exit status. */
2
+ export interface TarCommitIdResult {
3
+ /** 0 with the id (and its newline) on stdout, 1 when the archive carries none */
4
+ exitCode: number;
5
+ output: string;
6
+ }
7
+ /**
8
+ * The commit id of a tar archive's first bytes (git reads exactly 1024 of its stdin).
9
+ *
10
+ * @throws GitApiError (exit 128) when fewer than 1024 bytes are given, as git dies
11
+ */
12
+ export declare function getTarCommitId(archive: Uint8Array): TarCommitIdResult;
13
+ //# sourceMappingURL=tar-commit-id.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tar-commit-id.d.ts","sourceRoot":"","sources":["../../../src/commands/archive/tar-commit-id.ts"],"names":[],"mappings":"AAgBA,+DAA+D;AAC/D,MAAM,WAAW,iBAAiB;IAChC,iFAAiF;IACjF,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAKD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,UAAU,GAAG,iBAAiB,CAwCrE"}