@statewalker/vcs-commands 0.7.0 → 0.9.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 (568) hide show
  1. package/dist/commands/add-command.d.ts +70 -0
  2. package/dist/commands/add-command.d.ts.map +1 -1
  3. package/dist/commands/add-patch/add-patch.d.ts +7 -0
  4. package/dist/commands/add-patch/add-patch.d.ts.map +1 -1
  5. package/dist/commands/add-patch/patch-backend.d.ts.map +1 -1
  6. package/dist/commands/am/am-command.d.ts +102 -1
  7. package/dist/commands/am/am-command.d.ts.map +1 -1
  8. package/dist/commands/am/index.d.ts +1 -0
  9. package/dist/commands/am/index.d.ts.map +1 -1
  10. package/dist/commands/am/mailsplit.d.ts +88 -0
  11. package/dist/commands/am/mailsplit.d.ts.map +1 -0
  12. package/dist/commands/apply/apply-command.d.ts +2 -0
  13. package/dist/commands/apply/apply-command.d.ts.map +1 -1
  14. package/dist/commands/apply/apply-engine.d.ts.map +1 -1
  15. package/dist/commands/apply/apply-parse.d.ts +7 -0
  16. package/dist/commands/apply/apply-parse.d.ts.map +1 -1
  17. package/dist/commands/apply/index.d.ts +1 -1
  18. package/dist/commands/apply/index.d.ts.map +1 -1
  19. package/dist/commands/bisect/bisect-command.d.ts +2 -0
  20. package/dist/commands/bisect/bisect-command.d.ts.map +1 -1
  21. package/dist/commands/blame-command.d.ts +303 -8
  22. package/dist/commands/blame-command.d.ts.map +1 -1
  23. package/dist/commands/blame-ignore.d.ts +48 -0
  24. package/dist/commands/blame-ignore.d.ts.map +1 -0
  25. package/dist/commands/branch-command.d.ts +148 -18
  26. package/dist/commands/branch-command.d.ts.map +1 -1
  27. package/dist/commands/branch-info-command.d.ts +55 -0
  28. package/dist/commands/branch-info-command.d.ts.map +1 -0
  29. package/dist/commands/branch-tracking.d.ts +106 -17
  30. package/dist/commands/branch-tracking.d.ts.map +1 -1
  31. package/dist/commands/branch-upstream-command.d.ts +83 -0
  32. package/dist/commands/branch-upstream-command.d.ts.map +1 -0
  33. package/dist/commands/check-mailmap-command.d.ts +49 -0
  34. package/dist/commands/check-mailmap-command.d.ts.map +1 -0
  35. package/dist/commands/checkout-command.d.ts +26 -3
  36. package/dist/commands/checkout-command.d.ts.map +1 -1
  37. package/dist/commands/checkout-paths.d.ts +4 -0
  38. package/dist/commands/checkout-paths.d.ts.map +1 -1
  39. package/dist/commands/cherry-command.d.ts +61 -0
  40. package/dist/commands/cherry-command.d.ts.map +1 -0
  41. package/dist/commands/cherry-pick-command.d.ts +82 -1
  42. package/dist/commands/cherry-pick-command.d.ts.map +1 -1
  43. package/dist/commands/clean-command.d.ts +44 -0
  44. package/dist/commands/clean-command.d.ts.map +1 -1
  45. package/dist/commands/clean-interactive.d.ts +56 -0
  46. package/dist/commands/clean-interactive.d.ts.map +1 -0
  47. package/dist/commands/clone-command.d.ts +116 -2
  48. package/dist/commands/clone-command.d.ts.map +1 -1
  49. package/dist/commands/commit-command.d.ts +239 -5
  50. package/dist/commands/commit-command.d.ts.map +1 -1
  51. package/dist/commands/commit-reuse.d.ts +33 -0
  52. package/dist/commands/commit-reuse.d.ts.map +1 -0
  53. package/dist/commands/config-command.d.ts +236 -0
  54. package/dist/commands/config-command.d.ts.map +1 -0
  55. package/dist/commands/config-value-types.d.ts +91 -0
  56. package/dist/commands/config-value-types.d.ts.map +1 -0
  57. package/dist/commands/core-config.d.ts +20 -0
  58. package/dist/commands/core-config.d.ts.map +1 -1
  59. package/dist/commands/describe-command.d.ts +71 -64
  60. package/dist/commands/describe-command.d.ts.map +1 -1
  61. package/dist/commands/diff-color-config.d.ts +73 -0
  62. package/dist/commands/diff-color-config.d.ts.map +1 -0
  63. package/dist/commands/diff-command.d.ts +369 -10
  64. package/dist/commands/diff-command.d.ts.map +1 -1
  65. package/dist/commands/fetch-command.d.ts +80 -0
  66. package/dist/commands/fetch-command.d.ts.map +1 -1
  67. package/dist/commands/fetch-multiple-command.d.ts +193 -0
  68. package/dist/commands/fetch-multiple-command.d.ts.map +1 -0
  69. package/dist/commands/fmt-merge-msg-command.d.ts +124 -0
  70. package/dist/commands/fmt-merge-msg-command.d.ts.map +1 -0
  71. package/dist/commands/fork-point.d.ts +38 -0
  72. package/dist/commands/fork-point.d.ts.map +1 -0
  73. package/dist/commands/format-patch-command.d.ts +69 -3
  74. package/dist/commands/format-patch-command.d.ts.map +1 -1
  75. package/dist/commands/fsck/fetch-fsck.d.ts +51 -0
  76. package/dist/commands/fsck/fetch-fsck.d.ts.map +1 -1
  77. package/dist/commands/gc-command.d.ts +8 -0
  78. package/dist/commands/gc-command.d.ts.map +1 -1
  79. package/dist/commands/git-describe.d.ts +81 -4
  80. package/dist/commands/git-describe.d.ts.map +1 -1
  81. package/dist/commands/git-hooks.d.ts +50 -1
  82. package/dist/commands/git-hooks.d.ts.map +1 -1
  83. package/dist/commands/grep/grep-command.d.ts +210 -0
  84. package/dist/commands/grep/grep-command.d.ts.map +1 -0
  85. package/dist/commands/grep/grep-engine.d.ts +218 -0
  86. package/dist/commands/grep/grep-engine.d.ts.map +1 -0
  87. package/dist/commands/grep/index.d.ts +3 -0
  88. package/dist/commands/grep/index.d.ts.map +1 -0
  89. package/dist/commands/index-adder.d.ts +13 -2
  90. package/dist/commands/index-adder.d.ts.map +1 -1
  91. package/dist/commands/index.d.ts +38 -0
  92. package/dist/commands/index.d.ts.map +1 -1
  93. package/dist/commands/index.js +5 -3
  94. package/dist/commands/init-command.d.ts +89 -0
  95. package/dist/commands/init-command.d.ts.map +1 -1
  96. package/dist/commands/interpret-trailers-command.d.ts +90 -0
  97. package/dist/commands/interpret-trailers-command.d.ts.map +1 -0
  98. package/dist/commands/line-log.d.ts +161 -0
  99. package/dist/commands/line-log.d.ts.map +1 -0
  100. package/dist/commands/local-transport.d.ts +36 -5
  101. package/dist/commands/local-transport.d.ts.map +1 -1
  102. package/dist/commands/log-command.d.ts +527 -13
  103. package/dist/commands/log-command.d.ts.map +1 -1
  104. package/dist/commands/log-graph.d.ts +30 -3
  105. package/dist/commands/log-graph.d.ts.map +1 -1
  106. package/dist/commands/log-output.d.ts +199 -6
  107. package/dist/commands/log-output.d.ts.map +1 -1
  108. package/dist/commands/ls-remote-command.d.ts +2 -0
  109. package/dist/commands/ls-remote-command.d.ts.map +1 -1
  110. package/dist/commands/mailmap.d.ts +53 -0
  111. package/dist/commands/mailmap.d.ts.map +1 -1
  112. package/dist/commands/merge-base-command.d.ts +60 -0
  113. package/dist/commands/merge-base-command.d.ts.map +1 -0
  114. package/dist/commands/merge-bases.d.ts +23 -0
  115. package/dist/commands/merge-bases.d.ts.map +1 -1
  116. package/dist/commands/merge-command.d.ts +147 -10
  117. package/dist/commands/merge-command.d.ts.map +1 -1
  118. package/dist/commands/merge-drivers.d.ts +2 -0
  119. package/dist/commands/merge-drivers.d.ts.map +1 -1
  120. package/dist/commands/merge-strategy-options.d.ts +69 -0
  121. package/dist/commands/merge-strategy-options.d.ts.map +1 -0
  122. package/dist/commands/merge-support.d.ts +10 -0
  123. package/dist/commands/merge-support.d.ts.map +1 -1
  124. package/dist/commands/message-cleanup.d.ts +2 -0
  125. package/dist/commands/message-cleanup.d.ts.map +1 -1
  126. package/dist/commands/mv-command.d.ts +4 -0
  127. package/dist/commands/mv-command.d.ts.map +1 -1
  128. package/dist/commands/name-rev-command.d.ts +65 -0
  129. package/dist/commands/name-rev-command.d.ts.map +1 -0
  130. package/dist/commands/name-rev.d.ts +136 -0
  131. package/dist/commands/name-rev.d.ts.map +1 -0
  132. package/dist/commands/notes-command.d.ts.map +1 -1
  133. package/dist/commands/octopus-merge.d.ts +26 -1
  134. package/dist/commands/octopus-merge.d.ts.map +1 -1
  135. package/dist/commands/ort-merge.d.ts +16 -0
  136. package/dist/commands/ort-merge.d.ts.map +1 -1
  137. package/dist/commands/ort-recursive.d.ts.map +1 -1
  138. package/dist/commands/patch-id.d.ts +58 -0
  139. package/dist/commands/patch-id.d.ts.map +1 -1
  140. package/dist/commands/pathspec-file.d.ts +39 -0
  141. package/dist/commands/pathspec-file.d.ts.map +1 -0
  142. package/dist/commands/pathspec.d.ts +3 -0
  143. package/dist/commands/pathspec.d.ts.map +1 -1
  144. package/dist/commands/pretty-format.d.ts +43 -3
  145. package/dist/commands/pretty-format.d.ts.map +1 -1
  146. package/dist/commands/promisor-remote.d.ts.map +1 -1
  147. package/dist/commands/pull-command.d.ts +186 -32
  148. package/dist/commands/pull-command.d.ts.map +1 -1
  149. package/dist/commands/push-command.d.ts +225 -9
  150. package/dist/commands/push-command.d.ts.map +1 -1
  151. package/dist/commands/range-diff/index.d.ts +4 -0
  152. package/dist/commands/range-diff/index.d.ts.map +1 -0
  153. package/dist/commands/range-diff/linear-assignment.d.ts +27 -0
  154. package/dist/commands/range-diff/linear-assignment.d.ts.map +1 -0
  155. package/dist/commands/range-diff/range-diff-command.d.ts +121 -0
  156. package/dist/commands/range-diff/range-diff-command.d.ts.map +1 -0
  157. package/dist/commands/range-diff/range-diff.d.ts +106 -0
  158. package/dist/commands/range-diff/range-diff.d.ts.map +1 -0
  159. package/dist/commands/read-tree-command.d.ts +20 -0
  160. package/dist/commands/read-tree-command.d.ts.map +1 -1
  161. package/dist/commands/rebase-command.d.ts +189 -8
  162. package/dist/commands/rebase-command.d.ts.map +1 -1
  163. package/dist/commands/ref-filter/for-each-ref-command.d.ts +121 -0
  164. package/dist/commands/ref-filter/for-each-ref-command.d.ts.map +1 -0
  165. package/dist/commands/ref-filter/index.d.ts +8 -0
  166. package/dist/commands/ref-filter/index.d.ts.map +1 -0
  167. package/dist/commands/ref-filter/ref-atoms.d.ts +88 -0
  168. package/dist/commands/ref-filter/ref-atoms.d.ts.map +1 -0
  169. package/dist/commands/ref-filter/ref-filter.d.ts +178 -0
  170. package/dist/commands/ref-filter/ref-filter.d.ts.map +1 -0
  171. package/dist/commands/ref-filter/ref-format.d.ts +222 -0
  172. package/dist/commands/ref-filter/ref-format.d.ts.map +1 -0
  173. package/dist/commands/ref-filter/ref-listing-command.d.ts +56 -0
  174. package/dist/commands/ref-filter/ref-listing-command.d.ts.map +1 -0
  175. package/dist/commands/ref-filter/ref-quote.d.ts +20 -0
  176. package/dist/commands/ref-filter/ref-quote.d.ts.map +1 -0
  177. package/dist/commands/ref-filter/version-compare.d.ts +20 -0
  178. package/dist/commands/ref-filter/version-compare.d.ts.map +1 -0
  179. package/dist/commands/reflog-command.d.ts +120 -0
  180. package/dist/commands/reflog-command.d.ts.map +1 -1
  181. package/dist/commands/reflog-walk.d.ts +72 -0
  182. package/dist/commands/reflog-walk.d.ts.map +1 -0
  183. package/dist/commands/remerge-diff.d.ts +59 -0
  184. package/dist/commands/remerge-diff.d.ts.map +1 -0
  185. package/dist/commands/remote-command.d.ts +179 -29
  186. package/dist/commands/remote-command.d.ts.map +1 -1
  187. package/dist/commands/remote-show-command.d.ts +204 -0
  188. package/dist/commands/remote-show-command.d.ts.map +1 -0
  189. package/dist/commands/remote-transport.d.ts +7 -1
  190. package/dist/commands/remote-transport.d.ts.map +1 -1
  191. package/dist/commands/reset-command.d.ts +21 -4
  192. package/dist/commands/reset-command.d.ts.map +1 -1
  193. package/dist/commands/restore-command.d.ts +9 -3
  194. package/dist/commands/restore-command.d.ts.map +1 -1
  195. package/dist/commands/rev-filter/commit-filter.d.ts +95 -0
  196. package/dist/commands/rev-filter/commit-filter.d.ts.map +1 -0
  197. package/dist/commands/rev-filter/commit-grep.d.ts +91 -0
  198. package/dist/commands/rev-filter/commit-grep.d.ts.map +1 -0
  199. package/dist/commands/rev-filter/index.d.ts +3 -0
  200. package/dist/commands/rev-filter/index.d.ts.map +1 -0
  201. package/dist/commands/rev-list-command.d.ts +226 -2
  202. package/dist/commands/rev-list-command.d.ts.map +1 -1
  203. package/dist/commands/revert-command.d.ts +54 -1
  204. package/dist/commands/revert-command.d.ts.map +1 -1
  205. package/dist/commands/revision-range.d.ts +34 -1
  206. package/dist/commands/revision-range.d.ts.map +1 -1
  207. package/dist/commands/revision-resolver.d.ts +15 -0
  208. package/dist/commands/revision-resolver.d.ts.map +1 -1
  209. package/dist/commands/rm-command.d.ts +70 -2
  210. package/dist/commands/rm-command.d.ts.map +1 -1
  211. package/dist/commands/sequencer-pick.d.ts +186 -5
  212. package/dist/commands/sequencer-pick.d.ts.map +1 -1
  213. package/dist/commands/sequencer-support.d.ts +12 -1
  214. package/dist/commands/sequencer-support.d.ts.map +1 -1
  215. package/dist/commands/serve-repository.d.ts +7 -0
  216. package/dist/commands/serve-repository.d.ts.map +1 -1
  217. package/dist/commands/shortlog-command.d.ts +109 -0
  218. package/dist/commands/shortlog-command.d.ts.map +1 -0
  219. package/dist/commands/shortlog.d.ts +151 -0
  220. package/dist/commands/shortlog.d.ts.map +1 -0
  221. package/dist/commands/show-command.d.ts +130 -0
  222. package/dist/commands/show-command.d.ts.map +1 -0
  223. package/dist/commands/show-commit.d.ts +11 -0
  224. package/dist/commands/show-commit.d.ts.map +1 -0
  225. package/dist/commands/signature-check.d.ts +164 -0
  226. package/dist/commands/signature-check.d.ts.map +1 -0
  227. package/dist/commands/signing.d.ts +160 -0
  228. package/dist/commands/signing.d.ts.map +1 -0
  229. package/dist/commands/sparse-checkout-command.d.ts.map +1 -1
  230. package/dist/commands/sparse-index-view.d.ts +45 -0
  231. package/dist/commands/sparse-index-view.d.ts.map +1 -0
  232. package/dist/commands/ssh-signer.d.ts +29 -0
  233. package/dist/commands/ssh-signer.d.ts.map +1 -0
  234. package/dist/commands/ssh-verifier.d.ts +42 -0
  235. package/dist/commands/ssh-verifier.d.ts.map +1 -0
  236. package/dist/commands/stash-apply-command.d.ts +5 -0
  237. package/dist/commands/stash-apply-command.d.ts.map +1 -1
  238. package/dist/commands/stash-branch-command.d.ts +34 -0
  239. package/dist/commands/stash-branch-command.d.ts.map +1 -0
  240. package/dist/commands/stash-create-command.d.ts +17 -0
  241. package/dist/commands/stash-create-command.d.ts.map +1 -1
  242. package/dist/commands/stash-info.d.ts +93 -0
  243. package/dist/commands/stash-info.d.ts.map +1 -0
  244. package/dist/commands/stash-list-command.d.ts +16 -0
  245. package/dist/commands/stash-list-command.d.ts.map +1 -1
  246. package/dist/commands/stash-pop-command.d.ts +39 -0
  247. package/dist/commands/stash-pop-command.d.ts.map +1 -0
  248. package/dist/commands/stash-show-command.d.ts +48 -0
  249. package/dist/commands/stash-show-command.d.ts.map +1 -0
  250. package/dist/commands/stash-store-command.d.ts +29 -0
  251. package/dist/commands/stash-store-command.d.ts.map +1 -0
  252. package/dist/commands/stash-working-tree.d.ts.map +1 -1
  253. package/dist/commands/status-command.d.ts +31 -2
  254. package/dist/commands/status-command.d.ts.map +1 -1
  255. package/dist/commands/status-header.d.ts +5 -0
  256. package/dist/commands/status-header.d.ts.map +1 -1
  257. package/dist/commands/submodule-add-command.d.ts +89 -0
  258. package/dist/commands/submodule-add-command.d.ts.map +1 -0
  259. package/dist/commands/submodule-auth.d.ts +90 -0
  260. package/dist/commands/submodule-auth.d.ts.map +1 -0
  261. package/dist/commands/submodule-commands.d.ts +463 -0
  262. package/dist/commands/submodule-commands.d.ts.map +1 -0
  263. package/dist/commands/submodule-fetch.d.ts +149 -0
  264. package/dist/commands/submodule-fetch.d.ts.map +1 -0
  265. package/dist/commands/submodule-model.d.ts +296 -0
  266. package/dist/commands/submodule-model.d.ts.map +1 -0
  267. package/dist/commands/submodule-unpack.d.ts +120 -0
  268. package/dist/commands/submodule-unpack.d.ts.map +1 -0
  269. package/dist/commands/submodule-update-command.d.ts +206 -0
  270. package/dist/commands/submodule-update-command.d.ts.map +1 -0
  271. package/dist/commands/subtree-shift.d.ts +27 -0
  272. package/dist/commands/subtree-shift.d.ts.map +1 -0
  273. package/dist/commands/switch-command.d.ts +3 -0
  274. package/dist/commands/switch-command.d.ts.map +1 -1
  275. package/dist/commands/tag-command.d.ts +259 -10
  276. package/dist/commands/tag-command.d.ts.map +1 -1
  277. package/dist/commands/trailers.d.ts +218 -17
  278. package/dist/commands/trailers.d.ts.map +1 -1
  279. package/dist/commands/tree-restore.d.ts +7 -0
  280. package/dist/commands/tree-restore.d.ts.map +1 -1
  281. package/dist/commands/verify-command.d.ts +92 -0
  282. package/dist/commands/verify-command.d.ts.map +1 -0
  283. package/dist/commands/worktree-add-command.d.ts +79 -7
  284. package/dist/commands/worktree-add-command.d.ts.map +1 -1
  285. package/dist/commands/worktree-overwrite-checks.d.ts +2 -0
  286. package/dist/commands/worktree-overwrite-checks.d.ts.map +1 -1
  287. package/dist/commands/worktree-path-rules.d.ts +66 -0
  288. package/dist/commands/worktree-path-rules.d.ts.map +1 -0
  289. package/dist/commands/worktree-remove-command.d.ts +10 -3
  290. package/dist/commands/worktree-remove-command.d.ts.map +1 -1
  291. package/dist/commands/worktree-repair-command.d.ts +15 -2
  292. package/dist/commands/worktree-repair-command.d.ts.map +1 -1
  293. package/dist/commands/worktree-support.d.ts +5 -0
  294. package/dist/commands/worktree-support.d.ts.map +1 -1
  295. package/dist/{commands-DIJ91NnD.js → commands-CNvli5bl.js} +49442 -54941
  296. package/dist/errors/checkout-errors.d.ts +19 -0
  297. package/dist/errors/checkout-errors.d.ts.map +1 -1
  298. package/dist/errors/command-errors.d.ts +25 -0
  299. package/dist/errors/command-errors.d.ts.map +1 -1
  300. package/dist/errors/index.js +85 -3
  301. package/dist/errors/ref-errors.d.ts +19 -0
  302. package/dist/errors/ref-errors.d.ts.map +1 -1
  303. package/dist/errors/worktree-errors.d.ts +6 -1
  304. package/dist/errors/worktree-errors.d.ts.map +1 -1
  305. package/dist/fsck-CPeDh9fh.js +5138 -0
  306. package/dist/git-command.d.ts +58 -2
  307. package/dist/git-command.d.ts.map +1 -1
  308. package/dist/git.d.ts +363 -1
  309. package/dist/git.d.ts.map +1 -1
  310. package/dist/guarded-transport-command.d.ts +82 -0
  311. package/dist/guarded-transport-command.d.ts.map +1 -0
  312. package/dist/index.d.ts +1 -0
  313. package/dist/index.d.ts.map +1 -1
  314. package/dist/index.js +6 -5
  315. package/dist/remote-config/index.d.ts +1 -1
  316. package/dist/remote-config/index.d.ts.map +1 -1
  317. package/dist/remote-config/remote-config-store.d.ts +55 -0
  318. package/dist/remote-config/remote-config-store.d.ts.map +1 -1
  319. package/dist/remote-transport-CCmBadm-.js +1606 -0
  320. package/dist/rename/detect-renames.d.ts +20 -0
  321. package/dist/rename/detect-renames.d.ts.map +1 -1
  322. package/dist/rename/diffcore-break.d.ts +51 -0
  323. package/dist/rename/diffcore-break.d.ts.map +1 -0
  324. package/dist/rename/index.d.ts +1 -0
  325. package/dist/rename/index.d.ts.map +1 -1
  326. package/dist/results/blame-format.d.ts +62 -1
  327. package/dist/results/blame-format.d.ts.map +1 -1
  328. package/dist/results/clone-result.d.ts +9 -0
  329. package/dist/results/clone-result.d.ts.map +1 -1
  330. package/dist/results/combined-diff.d.ts +3 -0
  331. package/dist/results/combined-diff.d.ts.map +1 -1
  332. package/dist/results/diff-check.d.ts +38 -0
  333. package/dist/results/diff-check.d.ts.map +1 -0
  334. package/dist/results/diff-color.d.ts +135 -0
  335. package/dist/results/diff-color.d.ts.map +1 -0
  336. package/dist/results/diff-dirstat.d.ts +36 -0
  337. package/dist/results/diff-dirstat.d.ts.map +1 -0
  338. package/dist/results/diff-entry.d.ts +10 -0
  339. package/dist/results/diff-entry.d.ts.map +1 -1
  340. package/dist/results/diff-formatter.d.ts.map +1 -1
  341. package/dist/results/diff-output.d.ts +103 -1
  342. package/dist/results/diff-output.d.ts.map +1 -1
  343. package/dist/results/diff-pickaxe.d.ts +67 -0
  344. package/dist/results/diff-pickaxe.d.ts.map +1 -0
  345. package/dist/results/diff-words.d.ts +55 -0
  346. package/dist/results/diff-words.d.ts.map +1 -0
  347. package/dist/results/fetch-result.d.ts +12 -1
  348. package/dist/results/fetch-result.d.ts.map +1 -1
  349. package/dist/results/index.d.ts +6 -0
  350. package/dist/results/index.d.ts.map +1 -1
  351. package/dist/results/index.js +2 -2
  352. package/dist/results/init-result.d.ts +8 -1
  353. package/dist/results/init-result.d.ts.map +1 -1
  354. package/dist/results/line-range-hunks.d.ts +27 -0
  355. package/dist/results/line-range-hunks.d.ts.map +1 -0
  356. package/dist/results/merge-result.d.ts +8 -1
  357. package/dist/results/merge-result.d.ts.map +1 -1
  358. package/dist/results/pull-result.d.ts +11 -0
  359. package/dist/results/pull-result.d.ts.map +1 -1
  360. package/dist/results/push-result.d.ts +12 -0
  361. package/dist/results/push-result.d.ts.map +1 -1
  362. package/dist/results/rebase-result.d.ts +2 -0
  363. package/dist/results/rebase-result.d.ts.map +1 -1
  364. package/dist/results/stash-result.d.ts +6 -0
  365. package/dist/results/stash-result.d.ts.map +1 -1
  366. package/dist/results/status-result.d.ts +1 -1
  367. package/dist/results/status-result.d.ts.map +1 -1
  368. package/dist/results-BDuEgdLU.js +46847 -0
  369. package/dist/transport-command.d.ts +14 -0
  370. package/dist/transport-command.d.ts.map +1 -1
  371. package/dist/whitespace/index.d.ts +2 -0
  372. package/dist/whitespace/index.d.ts.map +1 -0
  373. package/dist/whitespace/whitespace-rule.d.ts +94 -0
  374. package/dist/whitespace/whitespace-rule.d.ts.map +1 -0
  375. package/package.json +12 -12
  376. package/src/commands/add-command.ts +293 -17
  377. package/src/commands/add-patch/add-patch.ts +8 -0
  378. package/src/commands/add-patch/patch-backend.ts +20 -2
  379. package/src/commands/am/am-command.ts +400 -46
  380. package/src/commands/am/index.ts +1 -0
  381. package/src/commands/am/mailsplit.ts +326 -0
  382. package/src/commands/apply/apply-command.ts +58 -15
  383. package/src/commands/apply/apply-engine.ts +1 -1
  384. package/src/commands/apply/apply-parse.ts +17 -8
  385. package/src/commands/apply/index.ts +8 -1
  386. package/src/commands/bisect/bisect-command.ts +18 -5
  387. package/src/commands/blame-command.ts +1450 -51
  388. package/src/commands/blame-ignore.ts +307 -0
  389. package/src/commands/branch-command.ts +528 -53
  390. package/src/commands/branch-info-command.ts +150 -0
  391. package/src/commands/branch-tracking.ts +335 -60
  392. package/src/commands/branch-upstream-command.ts +218 -0
  393. package/src/commands/check-mailmap-command.ts +129 -0
  394. package/src/commands/checkout-command.ts +166 -55
  395. package/src/commands/checkout-paths.ts +28 -0
  396. package/src/commands/cherry-command.ts +187 -0
  397. package/src/commands/cherry-pick-command.ts +185 -1
  398. package/src/commands/clean-command.ts +126 -15
  399. package/src/commands/clean-interactive.ts +522 -0
  400. package/src/commands/clone-command.ts +598 -45
  401. package/src/commands/commit-command.ts +925 -74
  402. package/src/commands/commit-reuse.ts +94 -0
  403. package/src/commands/config-command.ts +1256 -0
  404. package/src/commands/config-value-types.ts +358 -0
  405. package/src/commands/core-config.ts +40 -0
  406. package/src/commands/describe-command.ts +341 -254
  407. package/src/commands/diff-color-config.ts +274 -0
  408. package/src/commands/diff-command.ts +1619 -99
  409. package/src/commands/fetch-command.ts +495 -14
  410. package/src/commands/fetch-multiple-command.ts +665 -0
  411. package/src/commands/fmt-merge-msg-command.ts +715 -0
  412. package/src/commands/fork-point.ts +63 -0
  413. package/src/commands/format-patch-command.ts +496 -116
  414. package/src/commands/fsck/fetch-fsck.ts +172 -18
  415. package/src/commands/gc-command.ts +31 -1
  416. package/src/commands/git-describe.ts +460 -201
  417. package/src/commands/git-hooks.ts +123 -3
  418. package/src/commands/grep/grep-command.ts +1077 -0
  419. package/src/commands/grep/grep-engine.ts +1024 -0
  420. package/src/commands/grep/index.ts +2 -0
  421. package/src/commands/index-adder.ts +46 -7
  422. package/src/commands/index.ts +43 -0
  423. package/src/commands/init-command.ts +603 -49
  424. package/src/commands/interpret-trailers-command.ts +256 -0
  425. package/src/commands/line-log.ts +931 -0
  426. package/src/commands/local-transport.ts +109 -10
  427. package/src/commands/log-command.ts +2599 -326
  428. package/src/commands/log-graph.ts +129 -29
  429. package/src/commands/log-output.ts +449 -27
  430. package/src/commands/ls-remote-command.ts +5 -0
  431. package/src/commands/mailmap.ts +155 -0
  432. package/src/commands/merge-base-command.ts +170 -0
  433. package/src/commands/merge-bases.ts +63 -8
  434. package/src/commands/merge-command.ts +601 -95
  435. package/src/commands/merge-drivers.ts +3 -0
  436. package/src/commands/merge-strategy-options.ts +224 -0
  437. package/src/commands/merge-support.ts +115 -22
  438. package/src/commands/message-cleanup.ts +1 -1
  439. package/src/commands/mv-command.ts +6 -3
  440. package/src/commands/name-rev-command.ts +184 -0
  441. package/src/commands/name-rev.ts +762 -0
  442. package/src/commands/notes-command.ts +11 -1
  443. package/src/commands/octopus-merge.ts +35 -11
  444. package/src/commands/ort-merge.ts +41 -7
  445. package/src/commands/ort-recursive.ts +40 -2
  446. package/src/commands/patch-id.ts +109 -0
  447. package/src/commands/pathspec-file.ts +72 -0
  448. package/src/commands/pathspec.ts +14 -2
  449. package/src/commands/pretty-format.ts +103 -19
  450. package/src/commands/promisor-remote.ts +10 -1
  451. package/src/commands/pull-command.ts +734 -221
  452. package/src/commands/push-command.ts +1035 -68
  453. package/src/commands/range-diff/index.ts +3 -0
  454. package/src/commands/range-diff/linear-assignment.ts +203 -0
  455. package/src/commands/range-diff/range-diff-command.ts +433 -0
  456. package/src/commands/range-diff/range-diff.ts +617 -0
  457. package/src/commands/read-tree-command.ts +102 -4
  458. package/src/commands/rebase-command.ts +1074 -194
  459. package/src/commands/ref-filter/for-each-ref-command.ts +298 -0
  460. package/src/commands/ref-filter/index.ts +7 -0
  461. package/src/commands/ref-filter/ref-atoms.ts +581 -0
  462. package/src/commands/ref-filter/ref-filter.ts +651 -0
  463. package/src/commands/ref-filter/ref-format.ts +1070 -0
  464. package/src/commands/ref-filter/ref-listing-command.ts +421 -0
  465. package/src/commands/ref-filter/ref-quote.ts +69 -0
  466. package/src/commands/ref-filter/version-compare.ts +177 -0
  467. package/src/commands/reflog-command.ts +492 -2
  468. package/src/commands/reflog-walk.ts +234 -0
  469. package/src/commands/remerge-diff.ts +241 -0
  470. package/src/commands/remote-command.ts +537 -69
  471. package/src/commands/remote-show-command.ts +836 -0
  472. package/src/commands/remote-transport.ts +9 -1
  473. package/src/commands/reset-command.ts +114 -34
  474. package/src/commands/restore-command.ts +27 -41
  475. package/src/commands/rev-filter/commit-filter.ts +159 -0
  476. package/src/commands/rev-filter/commit-grep.ts +444 -0
  477. package/src/commands/rev-filter/index.ts +2 -0
  478. package/src/commands/rev-list-command.ts +578 -15
  479. package/src/commands/revert-command.ts +123 -1
  480. package/src/commands/revision-range.ts +207 -5
  481. package/src/commands/revision-resolver.ts +23 -8
  482. package/src/commands/rm-command.ts +282 -21
  483. package/src/commands/sequencer-pick.ts +818 -111
  484. package/src/commands/sequencer-support.ts +184 -4
  485. package/src/commands/serve-repository.ts +18 -3
  486. package/src/commands/shortlog-command.ts +354 -0
  487. package/src/commands/shortlog.ts +361 -0
  488. package/src/commands/show-command.ts +491 -0
  489. package/src/commands/show-commit.ts +24 -0
  490. package/src/commands/signature-check.ts +657 -0
  491. package/src/commands/signing.ts +385 -0
  492. package/src/commands/sparse-checkout-command.ts +2 -9
  493. package/src/commands/sparse-checkout-support.ts +2 -2
  494. package/src/commands/sparse-index-view.ts +135 -0
  495. package/src/commands/ssh-signer.ts +199 -0
  496. package/src/commands/ssh-verifier.ts +523 -0
  497. package/src/commands/stash-apply-command.ts +16 -4
  498. package/src/commands/stash-branch-command.ts +88 -0
  499. package/src/commands/stash-create-command.ts +28 -0
  500. package/src/commands/stash-info.ts +243 -0
  501. package/src/commands/stash-list-command.ts +33 -0
  502. package/src/commands/stash-pop-command.ts +83 -0
  503. package/src/commands/stash-show-command.ts +141 -0
  504. package/src/commands/stash-store-command.ts +82 -0
  505. package/src/commands/stash-working-tree.ts +2 -2
  506. package/src/commands/status-command.ts +120 -27
  507. package/src/commands/status-format.ts +1 -1
  508. package/src/commands/status-header.ts +41 -7
  509. package/src/commands/submodule-add-command.ts +509 -0
  510. package/src/commands/submodule-auth.ts +276 -0
  511. package/src/commands/submodule-commands.ts +1835 -0
  512. package/src/commands/submodule-fetch.ts +789 -0
  513. package/src/commands/submodule-model.ts +938 -0
  514. package/src/commands/submodule-unpack.ts +265 -0
  515. package/src/commands/submodule-update-command.ts +1126 -0
  516. package/src/commands/subtree-shift.ts +215 -0
  517. package/src/commands/switch-command.ts +12 -1
  518. package/src/commands/tag-command.ts +876 -64
  519. package/src/commands/trailers.ts +837 -100
  520. package/src/commands/tree-restore.ts +44 -11
  521. package/src/commands/verify-command.ts +235 -0
  522. package/src/commands/worktree-add-command.ts +268 -24
  523. package/src/commands/worktree-overwrite-checks.ts +5 -0
  524. package/src/commands/worktree-path-rules.ts +183 -0
  525. package/src/commands/worktree-remove-command.ts +39 -5
  526. package/src/commands/worktree-repair-command.ts +52 -5
  527. package/src/commands/worktree-support.ts +22 -1
  528. package/src/errors/checkout-errors.ts +29 -0
  529. package/src/errors/command-errors.ts +37 -1
  530. package/src/errors/ref-errors.ts +23 -0
  531. package/src/errors/worktree-errors.ts +8 -1
  532. package/src/git-command.ts +153 -2
  533. package/src/git.ts +550 -1
  534. package/src/guarded-transport-command.ts +171 -0
  535. package/src/index.ts +1 -0
  536. package/src/remote-config/index.ts +2 -0
  537. package/src/remote-config/remote-config-store.ts +101 -0
  538. package/src/rename/detect-renames.ts +42 -8
  539. package/src/rename/diffcore-break.ts +166 -0
  540. package/src/rename/index.ts +1 -0
  541. package/src/results/blame-format.ts +268 -43
  542. package/src/results/clone-result.ts +6 -0
  543. package/src/results/combined-diff.ts +38 -18
  544. package/src/results/diff-check.ts +185 -0
  545. package/src/results/diff-color.ts +868 -0
  546. package/src/results/diff-dirstat.ts +117 -0
  547. package/src/results/diff-entry.ts +12 -0
  548. package/src/results/diff-formatter.ts +1 -0
  549. package/src/results/diff-output.ts +322 -32
  550. package/src/results/diff-pickaxe.ts +304 -0
  551. package/src/results/diff-words.ts +395 -0
  552. package/src/results/fetch-result.ts +12 -1
  553. package/src/results/index.ts +6 -0
  554. package/src/results/init-result.ts +10 -1
  555. package/src/results/line-range-hunks.ts +126 -0
  556. package/src/results/merge-result.ts +9 -0
  557. package/src/results/pull-result.ts +7 -0
  558. package/src/results/push-result.ts +12 -0
  559. package/src/results/rebase-result.ts +3 -0
  560. package/src/results/stash-result.ts +7 -0
  561. package/src/results/status-result.ts +2 -2
  562. package/src/transport-command.ts +34 -3
  563. package/src/whitespace/index.ts +1 -0
  564. package/src/{commands/apply/whitespace.ts → whitespace/whitespace-rule.ts} +173 -23
  565. package/dist/commands/apply/whitespace.d.ts +0 -58
  566. package/dist/commands/apply/whitespace.d.ts.map +0 -1
  567. package/dist/git-command-BGiOJ8Zk.js +0 -7246
  568. package/dist/results-WVlBhVb1.js +0 -2935
@@ -2,6 +2,7 @@ import { type FilesApi } from "@statewalker/vcs-core";
2
2
  import { type FetchRefUpdate, type TagMode } from "@statewalker/vcs-transport";
3
3
  import { type FetchResult, type TrackingRefUpdate } from "../results/fetch-result.js";
4
4
  import { TransportCommand } from "../transport-command.js";
5
+ import { type FetchRecurseSubmodules } from "./submodule-fetch.js";
5
6
  /**
6
7
  * Tag fetching option.
7
8
  *
@@ -65,6 +66,8 @@ export declare class FetchCommand extends TransportCommand<FetchResult> {
65
66
  private porcelain;
66
67
  private thin;
67
68
  private depth?;
69
+ /** `--deepen=<n>`: `deepen <n>` with `deepen-relative` */
70
+ private deepen?;
68
71
  private uploadPack?;
69
72
  private dryRun;
70
73
  private writeCommitGraphOption?;
@@ -81,6 +84,16 @@ export declare class FetchCommand extends TransportCommand<FetchResult> {
81
84
  /** `--filter=<spec>` (a string), `--no-filter` (false), or neither */
82
85
  private filterSpec?;
83
86
  private refetch;
87
+ private setUpstream;
88
+ /** `--[no-]recurse-submodules[=<mode>]`; unset: the configuration's */
89
+ private recurseSubmodules?;
90
+ /** `--recurse-submodules-default` (a submodule's fetch run by its superproject's) */
91
+ private recurseSubmodulesDefault;
92
+ /** `--submodule-prefix` */
93
+ private submodulePrefix;
94
+ private quiet;
95
+ /** The arguments git's reflog action names, when this fetch is a superproject's child */
96
+ private childArguments?;
84
97
  /**
85
98
  * Set the remote to fetch from.
86
99
  *
@@ -183,6 +196,32 @@ export declare class FetchCommand extends TransportCommand<FetchResult> {
183
196
  * `From <url>` line; `fetch.output` does not apply.
184
197
  */
185
198
  setPorcelain(porcelain: boolean): this;
199
+ /**
200
+ * `--recurse-submodules[=yes|on-demand|no]` / `--no-recurse-submodules` (true is `yes`,
201
+ * false `no`). Unset, git's configuration decides (`submodule.recurse`,
202
+ * `fetch.recurseSubmodules`, in config order; else `.gitmodules`' `fetch.recurseSubmodules`),
203
+ * and without any the fetch recurses on demand: after the superproject's refs are stored,
204
+ * each submodule whose recorded commit the fetched history changed is fetched, as
205
+ * `submodule.<name>.fetchRecurseSubmodules` allows (`yes`: every populated submodule).
206
+ * The submodules' fetches print into {@link FetchResult.submoduleOutput} and their results
207
+ * are {@link FetchResult.submodules}; a failed one fails the fetch (git's exit status 1,
208
+ * {@link FetchResult.submodulesFailed}). Submodules are fetched one at a time (git's
209
+ * `submodule.fetchJobs`/`-j` only run several at once; one job is this order).
210
+ *
211
+ * A submodule's URL comes from repository content: the transports given here reach it, but
212
+ * this fetch's credentials and headers go to it only when its origin is the origin of the
213
+ * remote this fetch is for (`guardSubmoduleTransports`).
214
+ */
215
+ setRecurseSubmodules(mode: boolean | FetchRecurseSubmodules): this;
216
+ /**
217
+ * `-q`: the submodules' fetches are quiet and no `Fetching submodule` line is printed
218
+ * ({@link FetchResult.display} is still returned: the caller prints it or not).
219
+ */
220
+ setQuiet(quiet: boolean): this;
221
+ /** @internal `--recurse-submodules-default` and `--submodule-prefix` of a submodule's fetch. */
222
+ setSubmoduleContext(defaultMode: "yes" | "on-demand", prefix: string, childArguments: string[]): this;
223
+ /** @internal The remote `git fetch` without one fetches (not named on its command line). */
224
+ setDefaultRemote(remote: string): this;
186
225
  /** Whether the ref lines are porcelain ones (`--porcelain`). */
187
226
  isPorcelain(): boolean;
188
227
  /**
@@ -200,6 +239,18 @@ export declare class FetchCommand extends TransportCommand<FetchResult> {
200
239
  * use: how a partial clone changes its filter.
201
240
  */
202
241
  setRefetch(refetch: boolean): this;
242
+ /**
243
+ * `git fetch --set-upstream`: once the refs are written, the one ref fetched only into
244
+ * `FETCH_HEAD` (a branch, or `HEAD`) becomes the current branch's upstream,
245
+ * `branch.<name>.remote` the remote as named (a URL for a URL) and `branch.<name>.merge`
246
+ * the ref, written as `git branch -u` writes them (`branch.autoSetupRebase` included).
247
+ * Nothing is set, with git's warning in {@link FetchResult.messages}, when several refs or
248
+ * none are fetched that way, HEAD is detached, or the ref is a tag or a remote-tracking
249
+ * ref; nor when an update was refused. A dry run sets it too, as git's does.
250
+ */
251
+ setSetUpstream(setUpstream: boolean): this;
252
+ /** Whether the fetch sets the current branch's upstream (`--set-upstream`). */
253
+ isSetUpstream(): boolean;
203
254
  /**
204
255
  * Set thin-pack preference.
205
256
  *
@@ -216,6 +267,12 @@ export declare class FetchCommand extends TransportCommand<FetchResult> {
216
267
  * @param depth Number of commits to fetch
217
268
  */
218
269
  setDepth(depth: number): this;
270
+ /**
271
+ * `--deepen=<n>`: deepen a shallow repository by `n` commits from its current shallow
272
+ * boundary (git's `deepen <n>` with `deepen-relative`), instead of `n` from the tips as
273
+ * {@link setDepth}.
274
+ */
275
+ setDeepen(deepen: number): this;
219
276
  /**
220
277
  * Set the program the remote runs for upload-pack (git's `--upload-pack`, over
221
278
  * `remote.<name>.uploadpack`): what an ssh connector runs, and what git:// names in its
@@ -386,6 +443,22 @@ export declare class FetchCommand extends TransportCommand<FetchResult> {
386
443
  * @throws InvalidRemoteError if remote cannot be resolved
387
444
  */
388
445
  call(): Promise<FetchResult>;
446
+ /**
447
+ * cmd_fetch's `config.recurse_submodules`: the command line, else `submodule.recurse` and
448
+ * `fetch.recurseSubmodules` in config order, else `.gitmodules`' `fetch.recurseSubmodules`;
449
+ * undefined when the fetch does not recurse (`no`, `--porcelain`, no worktree). git checks
450
+ * `submodule.fetchJobs` there too (a negative one dies).
451
+ */
452
+ private submoduleRecursion;
453
+ /** fetch_submodules over this fetch's options (add_options_to_argv). */
454
+ private fetchSubmodulesAfter;
455
+ /**
456
+ * git's `--set-upstream` (do_fetch): the ref map's one ref without a local ref (fetched
457
+ * only into FETCH_HEAD; a ref add_merge_config marked among those the refspecs took has
458
+ * one) becomes the current branch's upstream through {@link installTracking}, or git's
459
+ * warning is added to `messages`.
460
+ */
461
+ private setUpstreamOf;
389
462
  /**
390
463
  * git's check_not_current_branch: the first branch of the ref map (the refs the refspecs
391
464
  * took, then their opportunistic updates) that a worktree has checked out makes the fetch
@@ -469,4 +542,11 @@ export declare class FetchCommand extends TransportCommand<FetchResult> {
469
542
  export declare function toTagMode(option: TagOption): TagMode;
470
543
  /** A transport ref update as a {@link TrackingRefUpdate}. */
471
544
  export declare function toTrackingRefUpdate(update: FetchRefUpdate): TrackingRefUpdate;
545
+ /**
546
+ * What a fetch prints on stderr, as git's child `git fetch` does: its ref lines (not with
547
+ * `-q`), its messages, its errors, then its submodules' lines.
548
+ */
549
+ export declare function fetchOutputText(result: FetchResult, quiet?: boolean): string;
550
+ /** Whether git's fetch exits 0: no error, no refused ref, its submodules fetched. */
551
+ export declare function fetchSucceeded(result: FetchResult): boolean;
472
552
  //# sourceMappingURL=fetch-command.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-command.d.ts","sourceRoot":"","sources":["../../src/commands/fetch-command.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,QAAQ,EAId,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EASL,KAAK,cAAc,EAWnB,KAAK,OAAO,EAGb,MAAM,4BAA4B,CAAC;AAWpC,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,iBAAiB,EACvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAY3D;;;;GAIG;AACH,oBAAY,SAAS;IACnB,8DAA8D;IAC9D,WAAW,gBAAgB;IAC3B,qBAAqB;IACrB,UAAU,eAAe;IACzB,2BAA2B;IAC3B,OAAO,YAAY;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,qBAAa,YAAa,SAAQ,gBAAgB,CAAC,WAAW,CAAC;IAC7D,OAAO,CAAC,MAAM,CAAY;IAC1B,gGAAgG;IAChG,OAAO,CAAC,WAA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;;OAEG;IACH,WAAW,IAAI,OAAO,CAErB;IAED;;;;;OAKG;IACH,OAAO,CAAC,kBAAkB;IAyB1B;;;;;;;;;;;OAWG;IACG,IAAI,IAAI,OAAO,CAAC,WAAW,CAAC,CAqVjC;IAED;;;;;OAKG;YACW,kBAAkB;IAuEhC,wEAAwE;YAC1D,oBAAoB;IA+GlC;;;;;OAKG;YACW,aAAa;IAsD3B;;;;OAIG;YACW,sBAAsB;IAoBpC;;;;;;;;;OASG;YACW,YAAY;IAuG1B;;;;;;OAMG;YACW,0BAA0B;IAuBxC;;;;OAIG;IACH,OAAO,CAAC,gBAAgB;IAWxB;;;;;;;OAOG;YACW,aAAa;IAsE3B,wFAAwF;IACxF,OAAO,CAAC,kBAAkB;IAQ1B;;;;OAIG;YACW,cAAc;IAU5B;;;;;;;OAOG;YACW,gBAAgB;IA2E9B,gGAAgG;YAClF,aAAa;IAa3B;;;;OAIG;YACW,gBAAgB;IAI9B;;;;;;;;;OASG;YACW,gBAAgB;IA4D9B,4FAA4F;YAC9E,eAAe;CAc9B;AASD,wDAAwD;AACxD,wBAAgB,SAAS,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CASpD;AAED,6DAA6D;AAC7D,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,cAAc,GAAG,iBAAiB,CAsB7E;AA+DD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,UAAQ,GAAG,MAAM,CAO1E;AAED,qFAAqF;AACrF,wBAAgB,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAQ3D"}
@@ -0,0 +1,193 @@
1
+ import { GuardedTransportCommand } from "../guarded-transport-command.js";
2
+ import { RemoteConfigStore } from "../remote-config/index.js";
3
+ import { type FetchResult } from "../results/index.js";
4
+ import { TagOption } from "./fetch-command.js";
5
+ import type { FetchRecurseSubmodules } from "./submodule-fetch.js";
6
+ /** One fetch of a {@link FetchMultipleCommand}: git's child `git fetch <remote>`. */
7
+ export interface FetchMultipleEntry {
8
+ remote: string;
9
+ /** The fetch's result, when it did not fail */
10
+ result?: FetchResult;
11
+ /** Why it failed (git's child died) */
12
+ error?: Error;
13
+ /** A remote group nested in a group: the child's own fetch of its remotes */
14
+ nested?: FetchMultipleResult;
15
+ /** The child's exit status: 0, 1 for a refused ref or an error it reported, else its death's */
16
+ exitCode: number;
17
+ }
18
+ /** What {@link FetchMultipleCommand} did. */
19
+ export interface FetchMultipleResult {
20
+ /** The remotes fetched, in order */
21
+ remotes: string[];
22
+ fetches: FetchMultipleEntry[];
23
+ /** git's stdout: `Fetching <remote>` per remote (and `--porcelain`'s lines) */
24
+ stdout: string;
25
+ /**
26
+ * git's stderr: each fetch's lines ({@link FetchResult.display}, its messages and errors,
27
+ * or the error it died of), then git's `error: could not fetch <remote>` (one after
28
+ * another) or `could not fetch '<remote>' (exit code: <n>)` (in parallel) for each failure
29
+ */
30
+ stderr: string;
31
+ /** git's exit status: 0, or 1 when a fetch failed */
32
+ exitCode: number;
33
+ }
34
+ /**
35
+ * Fetch several remotes: `git fetch --all`, `git fetch --multiple <remote|group>...` and
36
+ * `git fetch <group>`.
37
+ *
38
+ * As builtin/fetch.c: the remotes are every configured one without
39
+ * `remote.<name>.skipDefaultUpdate` (or `skipFetchAll`) for {@link setAll}, else each name
40
+ * given expanded as a remote group (`remotes.<group>`, names separated by white space) or a
41
+ * configured remote (`no such remote or remote group` otherwise); repeats in a row are
42
+ * dropped. `FETCH_HEAD` is truncated once, then each remote is fetched as git's child
43
+ * `git fetch --append --no-auto-gc --no-write-commit-graph <options> <remote>` (its reflog
44
+ * lines say so), `Fetching <remote>` printed before each. git runs the children in parallel
45
+ * under `-j`/`fetch.parallel`; ours runs them one after another and prints what git prints
46
+ * then (the children's output in start order, `could not fetch '<remote>' (exit code: <n>)`
47
+ * for a failure). `--all` with one remote, and a single name that is no group, fetch that
48
+ * remote directly, as `git fetch <remote>`.
49
+ *
50
+ * A failed fetch does not stop the others: it is reported in the result (`exitCode` 1), as
51
+ * git exits 1.
52
+ *
53
+ * @example
54
+ * ```typescript
55
+ * const { stdout, stderr, exitCode } = await git.fetchMultiple().setAll(true).call();
56
+ * await git.fetchMultiple().setRemotes("upstream", "mirrors").setPrune(true).call();
57
+ * ```
58
+ */
59
+ export declare class FetchMultipleCommand extends GuardedTransportCommand<FetchMultipleResult> {
60
+ private groupDepth;
61
+ private all?;
62
+ private multiple;
63
+ private names;
64
+ private jobs?;
65
+ private prune?;
66
+ private pruneTags?;
67
+ private tagOption?;
68
+ private recurseSubmodules?;
69
+ private dryRun;
70
+ private force;
71
+ private updateHeadOk;
72
+ private verbose;
73
+ private porcelain;
74
+ private writeFetchHead;
75
+ private append;
76
+ /** GIT_REFLOG_ACTION in the environment (a pull's): every fetch's reflog action */
77
+ private envReflogAction?;
78
+ /**
79
+ * Fetch every configured remote (`--all`; false is `--no-all`); left unset, `fetch.all`
80
+ * (git 2.44+) decides when no remote is named.
81
+ */
82
+ setAll(all: boolean): this;
83
+ /** The remotes and remote groups to fetch. */
84
+ setRemotes(...names: string[]): this;
85
+ /**
86
+ * Whether every name is a remote or group (`--multiple`, the default); false reads one
87
+ * name as `git fetch <name>` does: a group of several remotes is fetched as with
88
+ * `--multiple`, anything else as one remote.
89
+ */
90
+ setMultiple(multiple: boolean): this;
91
+ /** `-j <n>`: how many fetches git runs at once (0: one per CPU). */
92
+ setJobs(jobs: number): this;
93
+ /** `--prune` (true) or `--no-prune` (false), passed to each fetch. */
94
+ setPrune(prune: boolean | undefined): this;
95
+ /** `--prune-tags` (true) or `--no-prune-tags` (false), passed to each fetch. */
96
+ setPruneTags(pruneTags: boolean | undefined): this;
97
+ /** `--tags` or `--no-tags`, passed to each fetch. */
98
+ setTagOpt(option: TagOption): this;
99
+ /** `--dry-run`: nothing written, FETCH_HEAD included. */
100
+ setDryRun(dryRun: boolean): this;
101
+ /**
102
+ * `--[no-]recurse-submodules[=<mode>]`, passed to each fetch (`FetchCommand.setRecurseSubmodules`);
103
+ * unset, each fetch reads the configuration and recurses on demand.
104
+ */
105
+ setRecurseSubmodules(mode: boolean | FetchRecurseSubmodules): this;
106
+ /** `--force`, passed to each fetch. */
107
+ setForceUpdate(force: boolean): this;
108
+ /** `--update-head-ok`, passed to each fetch. */
109
+ setUpdateHeadOk(ok: boolean): this;
110
+ /** `-v`, passed to each fetch. */
111
+ setVerbose(verbose: boolean): this;
112
+ /** `--porcelain`: no `Fetching` lines, each fetch's porcelain lines on stdout. */
113
+ setPorcelain(porcelain: boolean): this;
114
+ /** `--no-write-fetch-head` (false). */
115
+ setWriteFetchHead(write: boolean): this;
116
+ /** `--append`: FETCH_HEAD is not truncated first. */
117
+ setAppend(append: boolean): this;
118
+ /**
119
+ * `GIT_REFLOG_ACTION` as the environment sets it for git's children (a `git pull --all`
120
+ * exports `pull --all`): every fetch, each child included, names it in its reflog lines
121
+ * instead of its own command line.
122
+ */
123
+ setEnvReflogAction(action: string): this;
124
+ /**
125
+ * @throws GitApiError (exit 128) as git dies: `fetch --all does not take a repository
126
+ * argument`, `no such remote or remote group: <name>`, `fetch.parallel cannot be negative`
127
+ */
128
+ call(): Promise<FetchMultipleResult>;
129
+ /**
130
+ * The remotes to fetch (fetch.c's list: `--all`, each name as a group or remote, repeats in
131
+ * a row dropped), or the one remote fetched as `git fetch <remote>`.
132
+ */
133
+ private targets;
134
+ /**
135
+ * @internal The URLs this fetch would reach, nested groups expanded (none when it would
136
+ * die): what a command running it decides credentials from.
137
+ */
138
+ plannedUrls(): Promise<string[]>;
139
+ /** @internal How deep in nested remote groups this fetch runs (a child's child: 1, ...). */
140
+ setGroupDepth(depth: number): this;
141
+ /**
142
+ * A child `git fetch ... <name>` whose name is a group of several remotes: that child runs
143
+ * fetch_multiple itself (`Fetching <remote>` for each, FETCH_HEAD appended to); git
144
+ * recurses without bound on a group naming itself, ours stops at {@link MAX_GROUP_DEPTH}.
145
+ */
146
+ private fetchNestedGroup;
147
+ /** One `git fetch <remote>`: as a child of fetch_multiple (`append`), or fetch_one. */
148
+ private fetchOne;
149
+ /** git's add_options_to_argv, in its order. */
150
+ private optionArgs;
151
+ /** The `git fetch` command line this command stands for (fetch_one's reflog action). */
152
+ private commandLine;
153
+ /** remote_get(NULL): the current branch's remote, the one configured remote, `origin`. */
154
+ private defaultRemote;
155
+ }
156
+ /** How deep remote groups may nest in a fetch (git has no bound: a group naming itself loops). */
157
+ export declare const MAX_GROUP_DEPTH = 16;
158
+ /**
159
+ * remote.c's add_remote_or_group: the remotes of `remotes.<name>` (each value split at white
160
+ * space, in config order), else the remote itself when configured; false when neither.
161
+ */
162
+ export declare function addRemoteOrGroup(store: RemoteConfigStore, name: string, list: string[]): boolean;
163
+ /**
164
+ * Fetch a remote group, or every remote: `git remote update [-p] [<group>|<remote>...]`.
165
+ *
166
+ * As builtin/remote.c `update`: git runs `git fetch [--prune|--no-prune] [-v] --multiple
167
+ * <names>` ({@link FetchMultipleCommand}); without names the group `default` when
168
+ * `remotes.default` is configured, else every remote without
169
+ * `remote.<name>.skipDefaultUpdate` (`--all`). git exits 1 for any failure of the fetch,
170
+ * `no such remote or remote group` included, which is reported in the result here too.
171
+ *
172
+ * @example
173
+ * ```typescript
174
+ * const { stdout, stderr, exitCode } = await git.remoteUpdate().setPrune(true).call();
175
+ * await git.remoteUpdate().setGroups("mirrors").call();
176
+ * ```
177
+ */
178
+ export declare class RemoteUpdateCommand extends GuardedTransportCommand<FetchMultipleResult> {
179
+ /** git's command reads no core settings: an unparsable `core.whitespace` does not stop it */
180
+ protected readsCoreConfig(): boolean;
181
+ private groups;
182
+ private prune?;
183
+ private verbose;
184
+ /** The remote groups and remotes to fetch; none: `default`, else every remote. */
185
+ setGroups(...groups: string[]): this;
186
+ /** `-p`/`--prune` (true) or `--no-prune` (false), passed to the fetch. */
187
+ setPrune(prune: boolean | undefined): this;
188
+ private currentBranch;
189
+ /** `git remote -v update`: `-v` passed to the fetch. */
190
+ setVerbose(verbose: boolean): this;
191
+ call(): Promise<FetchMultipleResult>;
192
+ }
193
+ //# sourceMappingURL=fetch-multiple-command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch-multiple-command.d.ts","sourceRoot":"","sources":["../../src/commands/fetch-multiple-command.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,KAAK,WAAW,EAAmB,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAgB,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAEnE,qFAAqF;AACrF,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,uCAAuC;IACvC,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,6EAA6E;IAC7E,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,gGAAgG;IAChG,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,6CAA6C;AAC7C,MAAM,WAAW,mBAAmB;IAClC,oCAAoC;IACpC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAC9B,+EAA+E;IAC/E,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IACf,qDAAqD;IACrD,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qBAAa,oBAAqB,SAAQ,uBAAuB,CAAC,mBAAmB,CAAC;IACpF,OAAO,CAAC,UAAU,CAAK;IACvB,OAAO,CAAC,GAAG,CAAC,CAAU;IACtB,OAAO,CAAC,QAAQ,CAAQ;IACxB,OAAO,CAAC,KAAK,CAAgB;IAC7B,OAAO,CAAC,IAAI,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E,MAAM,EAAE,GAAG,IAAI,CAInC;IAED,0EAA0E;IAC1E,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAIzC;YAEa,aAAa;IAO3B,wDAAwD;IACxD,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAIjC;IAEK,IAAI,IAAI,OAAO,CAAC,mBAAmB,CAAC,CA6CzC;CACF"}
@@ -0,0 +1,124 @@
1
+ /**
2
+ * `git fmt-merge-msg` (fmt-merge-msg.c) as a library command: the message git's merge and
3
+ * pull write for a merge, from FETCH_HEAD-style lines or from the names of merged heads.
4
+ *
5
+ * ```typescript
6
+ * // the lines `git fetch` wrote, as `git fmt-merge-msg <.git/FETCH_HEAD`
7
+ * const message = await git.fmtMergeMsg().setInput(fetchHeadText).setLog(true).call();
8
+ * // "Merge branch 'left'\n\n# By A U Thor\n* left:\n Left #2\n Left #1\n"
9
+ *
10
+ * // the heads a `git merge left v1` names
11
+ * await git.fmtMergeMsg().addHead("left").addHead("v1").call();
12
+ * // "Merge branch 'left', tag 'v1'\n"
13
+ * ```
14
+ */
15
+ import type { ObjectId } from "@statewalker/vcs-core";
16
+ import { GitCommand } from "../git-command.js";
17
+ import { RemoteConfigStore } from "../remote-config/index.js";
18
+ /** git's `DEFAULT_MERGE_LOG_LEN`: `--log` and `merge.log=true` list at most this many commits. */
19
+ export declare const DEFAULT_MERGE_LOG_LENGTH = 20;
20
+ /**
21
+ * The message for a merge, as `git fmt-merge-msg [-m <message>] [--log[=<n>] | --no-log]
22
+ * [--into-name <name>]` writes it on its stdout.
23
+ *
24
+ * The input is FETCH_HEAD's format ({@link setInput}: `<id>\t\t<description>` per merged
25
+ * head, `<id>\tnot-for-merge\t...` lines skipped) or the heads `git merge` is given
26
+ * ({@link addHead}), each described as builtin/merge.c's `merge_name` describes it (`branch
27
+ * 'x' of .`, `tag 'v1' of .`, `remote-tracking branch 'o/x' of .`, `branch 'x' (early part)
28
+ * of .`, `tag '<id>'`, `commit '<name>'`). Heads HEAD or another head already contains are
29
+ * left out (reduce_heads). The title (`Merge branches 'a' and 'b' into topic`) leaves out
30
+ * the target branch when `merge.suppressDest` matches it (default `main` and `master`); an
31
+ * annotated tag's message follows it; with a log length (`--log`, `merge.log`, or its old
32
+ * name `merge.summary`), each head's shortlog follows: `* <name>:` and the subjects of the
33
+ * commits HEAD lacks, newest first, at most that many (`* <name>: (<n> commits)` and `...`
34
+ * when there are more), the branch's description first under `merge.branchdesc`, and
35
+ * (unless {@link setCreditPeople} turns it off, as `git merge` without an editor does)
36
+ * `# By` / `# Via` lines naming the authors and committers who are not you.
37
+ *
38
+ * Not done: a signed tag's signature is not verified, so its `# gpg: ...` lines are missing.
39
+ */
40
+ export declare class FmtMergeMsgCommand extends GitCommand<string> {
41
+ private input;
42
+ private heads;
43
+ private message?;
44
+ private log?;
45
+ private intoName?;
46
+ private creditPeople;
47
+ private headId?;
48
+ /** FETCH_HEAD-style input (git's stdin or `-F <file>`). */
49
+ setInput(input: string): this;
50
+ /**
51
+ * A head as `git merge` names it (a branch, tag, remote-tracking branch, `x~2`, an object
52
+ * id): described as git's merge describes it, after the input's lines.
53
+ */
54
+ addHead(name: string): this;
55
+ /** `-m <message>`: the start of the message, given instead of the title. */
56
+ setMessage(message: string | undefined): this;
57
+ /**
58
+ * `--log[=<n>]` (true: {@link DEFAULT_MERGE_LOG_LENGTH}), `--no-log` (false or 0); undefined
59
+ * (the default) takes `merge.log` / `merge.summary`.
60
+ */
61
+ setLog(log: boolean | number | undefined): this;
62
+ /** `--into-name <name>`: the title names this branch instead of HEAD's. */
63
+ setIntoName(name: string | undefined): this;
64
+ /**
65
+ * Whether the shortlog credits people (`# By`, `# Via`): `git fmt-merge-msg` does (the
66
+ * default), `git merge` only when it runs an editor.
67
+ */
68
+ setCreditPeople(credit: boolean): this;
69
+ /**
70
+ * The commit the merge goes into (default: HEAD's).
71
+ *
72
+ * @internal
73
+ */
74
+ setHead(id: ObjectId): this;
75
+ /**
76
+ * The message, ended by a newline (empty when nothing is left to merge).
77
+ *
78
+ * @throws GitApiError git's `fatal: error in line <n>: <line>` for a line that is not
79
+ * FETCH_HEAD's format, `fatal: No current branch` without a HEAD commit, and the
80
+ * configuration's deaths (a negative `merge.log`, a valueless `merge.suppressDest`)
81
+ */
82
+ call(): Promise<string>;
83
+ private format;
84
+ /** find_merge_parents: each line's (given, commit) pair, kept when reduce_heads keeps the commit. */
85
+ private findMergeParents;
86
+ /** fmt_merge_msg_sigs: the messages of the annotated tags merged. */
87
+ private tagMessages;
88
+ /** fmt-merge-msg.c's shortlog: `* <name>:` and the subjects of `<head> ^HEAD`. */
89
+ private shortlog;
90
+ /** add_people_info: `# By <authors>` and `# Via <committers>`, unless only you. */
91
+ private creditLines;
92
+ /**
93
+ * `rev-list <tip> ^<head>` in git's default order (limit_list): a queue by committer date,
94
+ * newest first, ties in the order queued; a commit HEAD reaches is left out, also when
95
+ * that is found only after it was queued.
96
+ */
97
+ private walk;
98
+ /** builtin/merge.c's merge_name: the FETCH_HEAD-style line describing a merged head. */
99
+ private mergeName;
100
+ }
101
+ /** The `merge.*` settings fmt-merge-msg reads (fmt_merge_msg_config). */
102
+ export interface FmtMergeMsgConfig {
103
+ /** `merge.log` / `merge.summary`, whichever comes last: a length, 0 for none */
104
+ log: number;
105
+ /** `merge.branchdesc` */
106
+ branchDesc: boolean;
107
+ /** `merge.suppressDest` patterns (an empty value clears them; default main, master) */
108
+ suppressDest: string[];
109
+ }
110
+ /**
111
+ * fmt_merge_msg_config over a repository's configuration, in its order: what `git merge` and
112
+ * `git fmt-merge-msg` read as they load their configuration (git_merge_config), before they
113
+ * do anything.
114
+ *
115
+ * @throws InvalidConfigError with git's lines (exit 128) for the first value git refuses: a
116
+ * negative `merge.log`/`merge.summary` (`error: merge.log: negative length -1`, then `fatal:
117
+ * bad config variable 'merge.log' in file '.git/config' at line 4`), one that is no boolean
118
+ * or number (`fatal: bad numeric config value 'abc' for 'merge.log' in file .git/config:
119
+ * invalid unit`), a `merge.suppressDest` without a value (`error: missing value for
120
+ * 'merge.suppressdest'` and the `bad config variable` line), a `merge.branchdesc` that is no
121
+ * boolean (`fatal: bad boolean config value 'abc' for 'merge.branchdesc'`)
122
+ */
123
+ export declare function fmtMergeMsgConfigOf(config: RemoteConfigStore): FmtMergeMsgConfig;
124
+ //# sourceMappingURL=fmt-merge-msg-command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fmt-merge-msg-command.d.ts","sourceRoot":"","sources":["../../src/commands/fmt-merge-msg-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAU,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAK9D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAK9D,kGAAkG;AAClG,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,kBAAmB,SAAQ,UAAU,CAAC,MAAM,CAAC;IACxD,OAAO,CAAC,KAAK,CAAM;IACnB,OAAO,CAAC,KAAK,CAAgB;IAC7B,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,OAAO,CAAC,GAAG,CAAC,CAAS;IACrB,OAAO,CAAC,QAAQ,CAAC,CAAS;IAC1B,OAAO,CAAC,YAAY,CAAQ;IAC5B,OAAO,CAAC,MAAM,CAAC,CAAW;IAE1B,2DAA2D;IAC3D,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAI5B;IAED;;;OAGG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAI1B;IAED,4EAA4E;IAC5E,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAI5C;IAED;;;OAGG;IACH,MAAM,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,CAI9C;IAED,2EAA2E;IAC3E,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAI1C;IAED;;;OAGG;IACH,eAAe,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAIrC;IAED;;;;OAIG;IACH,OAAO,CAAC,EAAE,EAAE,QAAQ,GAAG,IAAI,CAI1B;IAED;;;;;;OAMG;IACG,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CAS5B;YAEa,MAAM;IAmCpB,qGAAqG;YACvF,gBAAgB;IAkC9B,qEAAqE;YACvD,WAAW;IAyBzB,kFAAkF;YACpE,QAAQ;IAqDtB,mFAAmF;IACnF,OAAO,CAAC,WAAW;IAsCnB;;;;OAIG;YACW,IAAI;IA+DlB,wFAAwF;YAC1E,SAAS;CAyDxB;AAED,yEAAyE;AACzE,MAAM,WAAW,iBAAiB;IAChC,gFAAgF;IAChF,GAAG,EAAE,MAAM,CAAC;IACZ,yBAAyB;IACzB,UAAU,EAAE,OAAO,CAAC;IACpB,uFAAuF;IACvF,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAYD;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,iBAAiB,GAAG,iBAAiB,CAsDhF"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * git's get_fork_point (commit.c), shared by `git merge-base --fork-point` and
3
+ * `git rebase --fork-point`: the commit a branch forked from, found in the reflog of the
4
+ * ref it was built on.
5
+ *
6
+ * @example
7
+ * ```typescript
8
+ * // main was rewound after `side` forked from its old tip C: the fork point is C
9
+ * const fork = await findForkPoint(source, "main", sideTip); // C's id
10
+ * ```
11
+ */
12
+ import type { ObjectId } from "@statewalker/vcs-core";
13
+ import { type MergeBaseGraph } from "./merge-bases.js";
14
+ /** What the search reads of the repository. */
15
+ export interface ForkPointSource {
16
+ /** git's repo_dwim_ref: every ref the name may stand for, with its value */
17
+ dwimRef(name: string): Promise<{
18
+ id: ObjectId;
19
+ ref: string;
20
+ }[]>;
21
+ /** The ref's reflog, oldest entry first (empty or undefined when it has none) */
22
+ reflog(ref: string): Promise<{
23
+ oldId: ObjectId;
24
+ newId: ObjectId;
25
+ }[] | undefined>;
26
+ /** Whether `id` names a commit that can be read (git's lookup_commit + parse_commit) */
27
+ isCommit(id: ObjectId): Promise<boolean>;
28
+ /** The merge-base walk */
29
+ graph: MergeBaseGraph;
30
+ }
31
+ /**
32
+ * The fork point of `commit` from `refname`'s reflog, or undefined when there is none
33
+ * (no single merge base among the logged values).
34
+ *
35
+ * @throws GitApiError `fatal: No such ref: '<name>'` / `fatal: Ambiguous refname: '<name>'`
36
+ */
37
+ export declare function findForkPoint(source: ForkPointSource, refname: string, commit: ObjectId): Promise<ObjectId | undefined>;
38
+ //# sourceMappingURL=fork-point.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fork-point.d.ts","sourceRoot":"","sources":["../../src/commands/fork-point.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGtD,OAAO,EAAe,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEpE,+CAA+C;AAC/C,MAAM,WAAW,eAAe;IAC9B,4EAA4E;IAC5E,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,EAAE,EAAE,QAAQ,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC,CAAC;IAChE,iFAAiF;IACjF,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,QAAQ,CAAC;QAAC,KAAK,EAAE,QAAQ,CAAA;KAAE,EAAE,GAAG,SAAS,CAAC,CAAC;IACjF,wFAAwF;IACxF,QAAQ,CAAC,EAAE,EAAE,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACzC,0BAA0B;IAC1B,KAAK,EAAE,cAAc,CAAC;CACvB;AAID;;;;;GAKG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,QAAQ,GACf,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC,CAqB/B"}
@@ -3,9 +3,11 @@
3
3
  * 2001`, `From:`, `Date:`, `Subject: [PATCH n/m] ...`, the message, `---`, the diffstat,
4
4
  * the summary, the patch with binary hunks, the `-- ` signature), as git writes them byte
5
5
  * for byte: numbered subjects, cover letters with the shortlog and diffstat, threading
6
- * headers, `--base` prerequisite patch ids, signoffs and the `format.*` settings.
6
+ * headers, `--base` prerequisite patch ids, signoffs through the trailers engine, MIME
7
+ * attachments (`--attach`/`--inline`), notes after the `---` line, cover letters from the
8
+ * branch description, `--ignore-if-in-upstream` and the `format.*` settings.
7
9
  */
8
- import { GitCommand } from "../git-command.js";
10
+ import { RangeDiffBase } from "./range-diff/index.js";
9
11
  /** One file `git format-patch` writes (or one mail of `--stdout`). */
10
12
  export interface FormatPatchFile {
11
13
  /** The file name (with the output directory), as git prints it */
@@ -19,10 +21,14 @@ export interface FormatPatchResult {
19
21
  patches: FormatPatchFile[];
20
22
  /** Standard output: the file names, or the mails with `--stdout` */
21
23
  output: Uint8Array;
24
+ /** git's `warning:` lines (`using '<prev>' as range-diff origin of current series`) */
25
+ warnings?: string[];
22
26
  }
23
27
  /** Thrown where git dies (`fatal: ...`). */
24
28
  export declare class FormatPatchError extends Error {
25
29
  }
30
+ /** `--cover-from-description` modes (`default` is `message`). */
31
+ export type CoverFromDescription = "default" | "none" | "message" | "subject" | "auto";
26
32
  /**
27
33
  * `git format-patch`.
28
34
  *
@@ -32,7 +38,7 @@ export declare class FormatPatchError extends Error {
32
38
  * const { output } = await git.formatPatch().setMaxCount(1).setStdout(true).call();
33
39
  * ```
34
40
  */
35
- export declare class FormatPatchCommand extends GitCommand<FormatPatchResult> {
41
+ export declare class FormatPatchCommand extends RangeDiffBase<FormatPatchResult> {
36
42
  private revisions;
37
43
  private maxCount?;
38
44
  private root;
@@ -68,6 +74,16 @@ export declare class FormatPatchCommand extends GitCommand<FormatPatchResult> {
68
74
  private versionString;
69
75
  private messageIdTime?;
70
76
  private writeFiles;
77
+ /** `--attach`/`--inline`/`--no-attach`: the boundary (true: the version string, null: none) */
78
+ private attach?;
79
+ private notesOptions;
80
+ private coverFromDescription?;
81
+ private ignoreIfInUpstream;
82
+ private interdiff?;
83
+ private rangeDiff?;
84
+ private creationFactor?;
85
+ /** What git prints on stderr without dying */
86
+ private readonly warnings;
71
87
  /** A revision argument: `<since>` (to HEAD), `<a>..<b>`, `^<a>`, `<b>`. */
72
88
  addRevision(revision: string): this;
73
89
  /** `-<n>`: the last n commits. */
@@ -94,6 +110,43 @@ export declare class FormatPatchCommand extends GitCommand<FormatPatchResult> {
94
110
  setKeepSubject(value: boolean): this;
95
111
  /** `-s` / `--signoff`. */
96
112
  setSignoff(value: boolean): this;
113
+ /**
114
+ * `--attach[=<boundary>]` (true: git's version string as the boundary) / `--no-attach`
115
+ * (false): each patch a MIME attachment (`Content-Disposition: attachment`) after the
116
+ * message and the diffstat. Default `format.attach`.
117
+ */
118
+ setAttach(value: string | boolean): this;
119
+ /**
120
+ * `--inline[=<boundary>]` (true: git's version string): as {@link setAttach}, the part
121
+ * marked `Content-Disposition: inline` (`--no-attach` turns either off).
122
+ */
123
+ setInline(value: string | true): this;
124
+ /**
125
+ * `--notes` (true), `--notes=<ref>` (a ref, `x` is `refs/notes/x`), `--no-notes` (false):
126
+ * each call is one option, applied in order after `format.notes`. The notes go after the
127
+ * `---` line.
128
+ */
129
+ setNotes(value: boolean | string): this;
130
+ /**
131
+ * `--cover-from-description=<mode>`: how the cover letter uses `branch.<name>.description`
132
+ * (default `format.coverFromDescription`, else `message`).
133
+ */
134
+ setCoverFromDescription(mode: CoverFromDescription | (string & {})): this;
135
+ /** `--ignore-if-in-upstream`: leave out the patches the upstream side has (patch ids). */
136
+ setIgnoreIfInUpstream(value: boolean): this;
137
+ /**
138
+ * `--interdiff=<rev>`: the diff from `<rev>` (the previous version's tip) to this series'
139
+ * tip, in the cover letter or after the single patch (the last one given counts).
140
+ */
141
+ setInterdiff(rev: string): this;
142
+ /**
143
+ * `--range-diff=<prev>`: the range-diff of the previous version (a range, or its tip, the
144
+ * range then reaching back to this series' base) against this series, in the cover letter
145
+ * or after the single patch.
146
+ */
147
+ setRangeDiff(prev: string): this;
148
+ /** `--creation-factor=<n>` of `--range-diff` (default 999 from git 2.46 on, 60 before). */
149
+ setCreationFactor(factor: number): this;
97
150
  /** `--cover-letter` / `--no-cover-letter` (default `format.coverLetter`). */
98
151
  setCoverLetter(value: boolean): this;
99
152
  /** `--numbered-files`. */
@@ -141,12 +194,25 @@ export declare class FormatPatchCommand extends GitCommand<FormatPatchResult> {
141
194
  /** The clock of the generated Message-IDs, in seconds (default: now). */
142
195
  setMessageIdTime(now: () => number): this;
143
196
  private config;
197
+ /** Every value of a variable in order, `text` undefined for one without `=`. */
198
+ private configWhere;
144
199
  private configAll;
145
200
  call(): Promise<FormatPatchResult>;
201
+ /**
202
+ * The `Interdiff:` and `Range-diff:` blocks (title line and output) where git puts them:
203
+ * in the cover letter; else after the patch from 2.46 on (each after an empty line), as
204
+ * commentary after the message before.
205
+ */
206
+ private diffOfDiffBlocks;
146
207
  /** The subject for the file name (`%f`). */
147
208
  private fileSubject;
148
209
  /** The commits to format (newest first), the single boundary commit, the branch name. */
149
210
  private walk;
211
+ /**
212
+ * commit_patch_id: the patch id of a commit's diff against its parent (the empty tree for
213
+ * a root), rename detection as asked; the null id for an empty diff.
214
+ */
215
+ private commitPatchId;
150
216
  /** `get_base_commit` + `prepare_bases`: the text `print_bases` writes once. */
151
217
  private prepareBases;
152
218
  /** `make_cover_letter`. */