@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
@@ -6,6 +6,7 @@
6
6
  import { type ObjectId, type PersonIdent, type RefLogOptions } from "@statewalker/vcs-core";
7
7
  import type { CommandCommits, CommandRefs } from "../git-command.js";
8
8
  import { type MergeRefusal, type MergeWriteContext, type OperationState } from "./merge-support.js";
9
+ import type { SubmoduleUnpack } from "./submodule-unpack.js";
9
10
  /** What resetting the index and worktree needs. */
10
11
  export interface SequencerContext extends MergeWriteContext {
11
12
  commits: CommandCommits;
@@ -41,6 +42,12 @@ export interface OnewayMergeOptions {
41
42
  targetTree?: ObjectId;
42
43
  /** `read-tree`'s refusal: the `error:` line alone, without `fatal: Could not reset ...` */
43
44
  plain?: boolean;
45
+ /** `--recurse-submodules`: the active submodules checked and moved with the worktree */
46
+ submodules?: SubmoduleUnpack;
47
+ /** False (`read-tree -n`): the index is not written */
48
+ writeIndex?: boolean;
49
+ /** `read-tree -n` with `-u`: every check made, then nothing written (worktree or index) */
50
+ checkOnly?: boolean;
44
51
  }
45
52
  /**
46
53
  * The first step of `am --abort`'s `clean_index`: `read_index_unmerged`, then unpack-trees'
@@ -61,7 +68,9 @@ export declare function resetUnmergedToHead(ctx: SequencerContext, headId: Objec
61
68
  * changes (`verify_uptodate`), an untracked file in the way (`verify_absent`). HEAD is not
62
69
  * moved. The caller refuses an index with unmerged entries first.
63
70
  */
64
- export declare function resetKeep(ctx: SequencerContext, headId: ObjectId, targetId: ObjectId, label: string): Promise<MergeRefusal | undefined>;
71
+ export declare function resetKeep(ctx: SequencerContext, headId: ObjectId, targetId: ObjectId, label: string,
72
+ /** `--recurse-submodules`: the active submodules checked and moved with the worktree */
73
+ submodules?: SubmoduleUnpack): Promise<MergeRefusal | undefined>;
65
74
  /**
66
75
  * git's reset `update_refs`: ORIG_HEAD set to the HEAD left (`headId`), given the ORIG_HEAD
67
76
  * it read as the old value (none when absent), then HEAD moved to `target` expecting the
@@ -77,6 +86,8 @@ origHeadMessage?: string,
77
86
  /** HEAD detached at `target` (git's RESET_HEAD_DETACH: REF_NO_DEREF) rather than written through */
78
87
  options?: {
79
88
  detach?: boolean;
89
+ /** ORIG_HEAD's new value when not `headId` (a rebase of another branch: its tip) */
90
+ origHead?: ObjectId;
80
91
  }): Promise<string[]>;
81
92
  /**
82
93
  * git's remove_branch_state (a branch switch, a reset): the merge, cherry-pick or revert
@@ -1 +1 @@
1
- {"version":3,"file":"sequencer-support.d.ts","sourceRoot":"","sources":["../../src/commands/sequencer-support.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAGL,KAAK,QAAQ,EAEb,KAAK,WAAW,EAChB,KAAK,aAAa,EACnB,MAAM,uBAAuB,CAAC;AAS/B,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrE,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EAGpB,MAAM,oBAAoB,CAAC;AAoB5B,mDAAmD;AACnD,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB;IACzD,OAAO,EAAE,cAAc,CAAC;IACxB,IAAI,EAAE,WAAW,CAAC;CACnB;AAKD;;;;;;;;;;;GAWG;AACH,wBAAsB,UAAU,CAC9B,GAAG,EAAE,gBAAgB,EACrB,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAoBnC;AAED,oEAAoE;AACpE,MAAM,WAAW,kBAAkB;IACjC,wFAAwF;IACxF,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,8FAA8F;IAC9F,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,g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AS,GAAG,MAAM,CAAC,EAC/C,EAAE,EAAE,QAAQ,GACX,OAAO,CAAC,IAAI,CAAC,CAOf;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,SAAM,GAAG,MAAM,CAEzE;AAKD,yFAAyF;AACzF,wBAAgB,aAAa,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAOxD;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,cAAc,EACvB,MAAM,EAAE,QAAQ,EAChB,KAAK,EAAE,QAAQ,GAAG,QAAQ,EAAE,EAC5B,UAAU,EAAE,CAAC,EAAE,EAAE,QAAQ,KAAK,OAAO,CAAC,MAAM,CAAC,GAC5C,OAAO,CAAC,MAAM,CAAC,CA2CjB"}
@@ -6,6 +6,7 @@
6
6
  import { type ServedRepository } from "@statewalker/vcs-transport";
7
7
  import { type OpenedRepository } from "@statewalker/vcs-working-tree";
8
8
  import type { HookSession } from "./git-hooks.js";
9
+ import { type ReceivePackHost } from "./local-transport.js";
9
10
  /** Options of {@link servedRepositoryOf}. */
10
11
  export interface ServedRepositoryOptions {
11
12
  /**
@@ -15,6 +16,12 @@ export interface ServedRepositoryOptions {
15
16
  * directory, `GIT_DIR=.`), its output not sent to the client
16
17
  */
17
18
  hooks?: HookSession;
19
+ /**
20
+ * Where receive-pack runs (`ReceivePackHost`): whose fsck messages to give (default the
21
+ * hooks' runner's compatibility). A served repository's `receive.fsck.skipList` is always
22
+ * read confined to its own git directories (`confineFiles`), never from the host
23
+ */
24
+ host?: ReceivePackHost;
18
25
  }
19
26
  /**
20
27
  * An opened repository (`Worktree.openRepository`) as a git server serves it: its objects and
@@ -1 +1 @@
1
- {"version":3,"file":"serve-repository.d.ts","sourceRoot":"","sources":["../../src/commands/serve-repository.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAIL,KAAK,gBAAgB,EAItB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,KAAK,gBAAgB,EAAuB,MAAM,+BAA+B,CAAC;AAC3F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AASlD,6CAA6C;AAC7C,MAAM,WAAW,uBAAuB;IACtC;;;;;OAKG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB;AAkBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,gBAAgB,EACxB,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,gBAAgB,CAAC,CAoC3B"}
1
+ {"version":3,"file":"serve-repository.d.ts","sourceRoot":"","sources":["../../src/commands/serve-repository.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAIL,KAAK,gBAAgB,EAItB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,KAAK,gBAAgB,EAAuB,MAAM,+BAA+B,CAAC;AAC3F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAEL,KAAK,eAAe,EAMrB,MAAM,sBAAsB,CAAC;AAE9B,6CAA6C;AAC7C,MAAM,WAAW,uBAAuB;IACtC;;;;;OAKG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;;;OAIG;IACH,IAAI,CAAC,EAAE,eAAe,CAAC;CACxB;AAmBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,gBAAgB,EACxB,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,gBAAgB,CAAC,CA0C3B"}
@@ -0,0 +1,109 @@
1
+ /**
2
+ * `git shortlog` (builtin/shortlog.c) as a library command: the commits of a revision range
3
+ * (or of `git log` output, as git reads it on its stdin) grouped by author, committer,
4
+ * trailer values or formatted fields.
5
+ *
6
+ * @example
7
+ * ```typescript
8
+ * // git shortlog -ns HEAD
9
+ * await git.shortlog().addRevision("HEAD").setNumbered(true).setSummary(true).callText();
10
+ * // " 5\tA U Thor\n 1\tSomeone else\n"
11
+ *
12
+ * // git log | git shortlog -e
13
+ * await git.shortlog().setInput(logText).setEmail(true).callText();
14
+ * ```
15
+ */
16
+ import { GitCommand } from "../git-command.js";
17
+ import { RevListCommand } from "./rev-list-command.js";
18
+ import { type ShortlogEntry, type ShortlogWrap } from "./shortlog.js";
19
+ /**
20
+ * The shortlog of a repository's history or of `git log` output.
21
+ *
22
+ * Revisions ({@link addRevision}, {@link addArgument}, {@link addPath},
23
+ * {@link configureRevisions}) are walked as `git log` walks them; without any, the input given
24
+ * with {@link setInput} is read (`git log | git shortlog`), else HEAD's history (git's
25
+ * behaviour on a terminal). Each commit counts once per group it falls in (`--group` options,
26
+ * duplicates within one commit counted once), mapped through the repository's mailmap
27
+ * (`.mailmap`, `mailmap.blob`, `mailmap.file`).
28
+ *
29
+ * git's stderr (a `mailmap.blob` that is no blob) is in {@link getErrors}.
30
+ */
31
+ export declare class ShortlogCommand extends GitCommand<ShortlogEntry[]> {
32
+ private summary;
33
+ private numbered;
34
+ private email;
35
+ private wrap?;
36
+ private groups;
37
+ private format?;
38
+ private date?;
39
+ private abbrev?;
40
+ private input?;
41
+ private revisionsNamed;
42
+ private readonly revisionSteps;
43
+ private readonly errors;
44
+ private shortlog?;
45
+ /** `-s` / `--summary`: only each group's count. */
46
+ setSummary(summary: boolean): this;
47
+ /** `-n` / `--numbered`: groups sorted by their count, largest first. */
48
+ setNumbered(numbered: boolean): this;
49
+ /** `-e` / `--email`: author and committer groups named `Name <email>`. */
50
+ setEmail(email: boolean): this;
51
+ /** `-c` / `--committer`: group by committer (as `--group=committer`). */
52
+ setCommitter(committer: boolean): this;
53
+ /**
54
+ * `--group=<type>`: `author`, `committer`, `trailer:<key>`, `format:<format>` (or a
55
+ * format with a `%`); repeatable. Throws git's `unknown group type` error (exit 129).
56
+ */
57
+ addGroup(group: string): this;
58
+ /** `--no-group`: the groups given so far dropped (author again unless others follow). */
59
+ clearGroups(): this;
60
+ /**
61
+ * `-w[<width>[,<indent1>[,<indent2>]]]`: the argument as git reads it (undefined for a bare
62
+ * `-w`: 76, 6, 9), a {@link ShortlogWrap}, or false for `--no-w`... (no wrapping).
63
+ */
64
+ setWrap(wrap?: string | ShortlogWrap | false): this;
65
+ /**
66
+ * `--format=<format>` / `--pretty=<format>`: each commit's line as this user format (`%h`,
67
+ * `format:%h`, `tformat:%h`) instead of its subject; a named format (`oneline`...) keeps
68
+ * the subject, as in git.
69
+ */
70
+ setFormat(format: string): this;
71
+ /** `--date=<mode>`: the date mode of `%ad`/`%cd` in formats and groups. */
72
+ setDate(mode: string): this;
73
+ /** `--abbrev=<n>`: the length of `%h` and friends. */
74
+ setAbbrev(abbrev: number): this;
75
+ /** `git log` output to read when no revision is given (git's stdin). */
76
+ setInput(input: string): this;
77
+ /** A revision argument of the walk (see `RevListCommand.addRevision`: `a..b`, `--all`...). */
78
+ addRevision(revision: string): this;
79
+ /** An argument of `git shortlog <args>`, revisions and paths mixed (`RevListCommand.addArgument`). */
80
+ addArgument(arg: string): this;
81
+ /** Only commits that change `path`. */
82
+ addPath(path: string): this;
83
+ /** At most this many commits (`-n`). */
84
+ setMaxCount(maxCount: number): this;
85
+ /**
86
+ * Any other walk setting (`--author`, `--first-parent`, `--since`...): `configure` is run
87
+ * on each {@link RevListCommand} this command walks with; `names` says it names revisions
88
+ * (so the input is not read).
89
+ */
90
+ configureRevisions(configure: (revisions: RevListCommand) => void, names?: boolean): this;
91
+ /** What git printed on stderr (`error:` lines of the mailmap's reading). */
92
+ getErrors(): string[];
93
+ /** The groups, in output order. */
94
+ call(): Promise<ShortlogEntry[]>;
95
+ /** git shortlog's output. */
96
+ callText(): Promise<string>;
97
+ /** git shortlog's output as bytes (the log output encoding's bytes kept as they were). */
98
+ callBytes(): Promise<Uint8Array>;
99
+ private run;
100
+ /** get_from_rev: every commit of the walk added (shortlog_add_commit). */
101
+ private walk;
102
+ /**
103
+ * Each commit of the walk formatted with each of `parts` (git's format_commit_message),
104
+ * in walk order: one walk for parts that cannot affect each other, another after a part
105
+ * whose state would reach the next.
106
+ */
107
+ private formatParts;
108
+ }
109
+ //# sourceMappingURL=shortlog-command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shortlog-command.d.ts","sourceRoot":"","sources":["../../src/commands/shortlog-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG/C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAML,KAAK,aAAa,EAElB,KAAK,YAAY,EAElB,MAAM,eAAe,CAAC;AAUvB;;;;;;;;;;;GAWG;AACH,qBAAa,eAAgB,SAAQ,UAAU,CAAC,aAAa,EAAE,CAAC;IAC9D,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,IAAI,CAAC,CAAe;IAC5B,OAAO,CAAC,MAAM,CAAuB;IACrC,OAAO,CAAC,MAAM,CAAC,CAAS;IACxB,OAAO,CAAC,IAAI,CAAC,CAAS;IACtB,OAAO,CAAC,MAAM,CAAC,CAAS;IACxB,OAAO,CAAC,KAAK,CAAC,CAAS;IACvB,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAuC;IACrE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgB;IACvC,OAAO,CAAC,QAAQ,CAAC,CAAW;IAE5B,mDAAmD;IACnD,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAIjC;IAED,wEAAwE;IACxE,WAAW,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAInC;IAED,0EAA0E;IAC1E,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAI7B;IAED,yEAAyE;IACzE,YAAY,CAAC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,WAAW;CAqC1B"}
@@ -0,0 +1,151 @@
1
+ /**
2
+ * git's shortlog (builtin/shortlog.c): commits grouped by author (or committer, trailer
3
+ * values, formatted fields), each group's subjects oldest first, sorted by name or by count.
4
+ * {@link ShortlogCommand} walks a repository's history into it, `format-patch`'s cover letter
5
+ * uses it for its summary, and {@link readShortlogInput} reads `git log` output into it as
6
+ * `git log | git shortlog` does.
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * const log = new Shortlog({ wrap: { width: 76, indent1: 6, indent2: 9 } });
11
+ * log.insert("A U Thor", "Second commit");
12
+ * log.insert("A U Thor", "First commit");
13
+ * log.text(); // "A U Thor (2):\n First commit\n Second commit\n\n"
14
+ * ```
15
+ *
16
+ * @module
17
+ */
18
+ import type { Mailmap } from "./mailmap.js";
19
+ /** `-w[<width>[,<indent1>[,<indent2>]]]`: how each subject is wrapped. */
20
+ export interface ShortlogWrap {
21
+ /** The width (0: indented, not wrapped) */
22
+ width: number;
23
+ /** The first line's indent */
24
+ indent1: number;
25
+ /** The other lines' indent */
26
+ indent2: number;
27
+ }
28
+ /** How a {@link Shortlog} prints. */
29
+ export interface ShortlogOptions {
30
+ /** `-s`: only each group's count */
31
+ summary?: boolean;
32
+ /** `-n`: groups sorted by count, largest first (else by name, in byte order) */
33
+ numbered?: boolean;
34
+ /** `-w`: subjects wrapped (else indented by six spaces) */
35
+ wrap?: ShortlogWrap;
36
+ }
37
+ /** One group of a shortlog: its name and its subjects (oldest first) or count. */
38
+ export interface ShortlogEntry {
39
+ /** The group's name (an author's name, with `-e` its email too; a trailer's value...) */
40
+ ident: string;
41
+ /** How many commits the group has */
42
+ count: number;
43
+ /** The subjects, oldest first (empty with `-s`) */
44
+ subjects: string[];
45
+ }
46
+ /**
47
+ * How a commit's records are written in the log output encoding (logmsg_reencode): in
48
+ * `output` when its text (`text`, as UTF-8) converts, else in the commit's own encoding
49
+ * (`stored`), else as stored (UTF-8, bytes that are no UTF-8 kept as they were). Only UTF-8
50
+ * and ISO-8859-1 are converted.
51
+ */
52
+ export declare function outputEncoderFor(output: string, text: string, stored: string): (s: string) => Uint8Array;
53
+ /** git's `-w` without a value. */
54
+ export declare const SHORTLOG_DEFAULT_WRAP: ShortlogWrap;
55
+ /**
56
+ * pretty.c's format_subject: the lines of the first paragraph, each without its trailing
57
+ * blanks, joined by `separator`.
58
+ */
59
+ export declare function formatSubject(text: string, separator?: string): string;
60
+ /**
61
+ * A commit message's `%s`: its first paragraph after any blank lines, the lines joined by
62
+ * spaces (pretty.c's subject).
63
+ */
64
+ export declare function commitSubject(message: string): string;
65
+ /**
66
+ * The groups of a shortlog, as builtin/shortlog.c keeps them: a sorted list of names, each
67
+ * with its subjects (insert_one_record) or its count (`-s`). A tag passed with a record
68
+ * comes back with its output (format-patch encodes each line as its commit asks).
69
+ */
70
+ export declare class Shortlog<T = undefined> {
71
+ private readonly options;
72
+ private readonly groups;
73
+ constructor(options?: ShortlogOptions);
74
+ /** insert_one_record: a commit's `oneline` (its subject, or the format's output) under `ident`. */
75
+ insert(ident: string, oneline: string, tag?: T): void;
76
+ /** The groups in output order (by name in byte order, or by count with `-n`). */
77
+ entries(): ShortlogEntry[];
78
+ private sorted;
79
+ /**
80
+ * shortlog_output: the text, in pieces, each with the tag of the record it shows (a
81
+ * group's header has its first record's tag; separators have none).
82
+ */
83
+ pieces(): {
84
+ text: string;
85
+ tag?: T;
86
+ }[];
87
+ /** shortlog_output's text. */
88
+ text(): string;
89
+ }
90
+ /**
91
+ * parse_wrap_args: `-w` (undefined: 76, 6, 9) or `-w<width>[,<indent1>[,<indent2>]]`, each
92
+ * omitted number its default; throws git's `error: -w[...]` (exit 129) for a bad one.
93
+ *
94
+ * @example
95
+ * ```typescript
96
+ * parseShortlogWrap("60,2"); // { width: 60, indent1: 2, indent2: 9 }
97
+ * ```
98
+ */
99
+ export declare function parseShortlogWrap(arg?: string): ShortlogWrap;
100
+ /** One `--group` of a shortlog. */
101
+ export type ShortlogGroup = {
102
+ kind: "author";
103
+ } | {
104
+ kind: "committer";
105
+ } | {
106
+ kind: "trailer";
107
+ key: string;
108
+ } | {
109
+ kind: "format";
110
+ format: string;
111
+ };
112
+ /**
113
+ * parse_group_option: `author`, `committer` (without case), `trailer:<key>`,
114
+ * `format:<format>`, or a format with a `%` in it; throws git's `error: unknown group
115
+ * type: <arg>` (exit 129) for anything else.
116
+ */
117
+ export declare function parseShortlogGroup(arg: string): ShortlogGroup;
118
+ /**
119
+ * ident.c's split_ident_line, for the name and the email: the name before the first `<`
120
+ * (without trailing blanks), the email up to the first `>` after it; undefined without both.
121
+ */
122
+ export declare function splitIdent(text: string): {
123
+ name: string;
124
+ email: string;
125
+ } | undefined;
126
+ /**
127
+ * shortlog.c's parse_ident: an identity (`Name <email> ...`) through the mailmap, as a
128
+ * group's name (`Name`, with `email` `Name <email>`); undefined when it does not parse.
129
+ */
130
+ export declare function shortlogIdent(text: string, mailmap: Mailmap | undefined, email: boolean): string | undefined;
131
+ /** The lines of a text as strbuf_getline_lf reads them (the LF dropped, a CR kept). */
132
+ export declare function inputLines(text: string): string[];
133
+ /**
134
+ * read_from_stdin: the commits of `git log` output (any format with `Author:`/`author `
135
+ * or, for committers, `Commit:`/`committer ` lines: medium, full, raw...) added to `log`, each
136
+ * under its identity through `mailmap` (with `email`, `Name <email>`) and the first
137
+ * non-blank line after its headers. Only one group, author or committer, can be read: git's
138
+ * errors (exit 128) for the others.
139
+ *
140
+ * @example
141
+ * ```typescript
142
+ * const log = new Shortlog();
143
+ * readShortlogInput(logText, log, { group: "author" });
144
+ * ```
145
+ */
146
+ export declare function readShortlogInput<T>(text: string, log: Shortlog<T>, options?: {
147
+ groups?: ShortlogGroup[];
148
+ mailmap?: Mailmap;
149
+ email?: boolean;
150
+ }): void;
151
+ //# sourceMappingURL=shortlog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shortlog.d.ts","sourceRoot":"","sources":["../../src/commands/shortlog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;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AAE,MAAM,EACZ,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,EAChB,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,aAAa,EAAE,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,GAC7E,IAAI,CAyBN"}
@@ -0,0 +1,130 @@
1
+ /**
2
+ * ShowCommand - `git show` (builtin/log.c's cmd_show): each object named, as its kind is
3
+ * shown. A commit as `git log -1 -p` shows it, merges with their dense combined diff (`--cc`,
4
+ * show's default); an annotated tag as `tag <name>`, its tagger and message, then the object
5
+ * it tags; a tree as `tree <name>`, an empty line and its entries (a directory with a `/`, not
6
+ * recursive); a blob as its bytes (`--textconv` runs the path's textconv for `<rev>:<path>`).
7
+ * A range (`A..B`, `^A`) or `-<n>` walks the history instead, as `git log` with show's
8
+ * defaults.
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * // git show HEAD
13
+ * const text = await git.show().callText();
14
+ *
15
+ * // git show --stat v1.0 main:README
16
+ * const both = await git.show().addRevision("v1.0").addRevision("main:README").callText({ stat: true });
17
+ *
18
+ * // git show -s --format=%s main topic: the subjects only
19
+ * const { stdout, exitCode } = await git.show().addArgument("main").addArgument("topic")
20
+ * .setOptions({ noPatch: true, pretty: "%s" }).call();
21
+ * ```
22
+ *
23
+ * Objects are shown in the order named, with git's separators: a newline before a tag or
24
+ * tree once something was shown, a commit's own separator as `git log` prints it (none for a
25
+ * `tformat:`), nothing around a blob. A commit named twice is shown once (git's SHOWN flag);
26
+ * with paths, a commit that changes none of them is not shown. A tag whose object is missing
27
+ * prints its header, then git's `error: could not read object <id>` and exit status 255.
28
+ *
29
+ * @module
30
+ */
31
+ import { GitCommand } from "../git-command.js";
32
+ import { type DiffTextOptions } from "./diff-command.js";
33
+ import type { LogOutputOptions } from "./log-output.js";
34
+ /** `git show`'s options: `git log`'s output options and its own. */
35
+ export interface ShowOptions extends LogOutputOptions {
36
+ /**
37
+ * `--textconv` / `--no-textconv`: a blob named `<rev>:<path>` (or `:<path>`) is shown
38
+ * through the path's textconv only with an explicit `true`; `false` also turns textconv
39
+ * off in the diffs (default: on there, off for blobs)
40
+ */
41
+ textconv?: boolean;
42
+ /** `--first-parent`: merges' diffs against their first parent (and a range walks so) */
43
+ firstParent?: boolean;
44
+ }
45
+ /** What `git show` printed and its exit status. */
46
+ export interface ShowResult {
47
+ /** git's stdout */
48
+ readonly stdout: Uint8Array;
49
+ /** git's stderr lines (`error: could not read object <id>`, revision warnings) */
50
+ readonly errors: string[];
51
+ /** 0, 2 when `--check` found errors, or 255 when an object could not be read (cmd_show's `error()` return) */
52
+ readonly exitCode: number;
53
+ }
54
+ /** `git show`. */
55
+ export declare class ShowCommand extends GitCommand<ShowResult> {
56
+ private readonly args;
57
+ private readonly paths;
58
+ private options;
59
+ private diffOptions;
60
+ private maxCount?;
61
+ private skip?;
62
+ /** A revision to show (as given before `--`; it must not also name a file without one). */
63
+ addRevision(revision: string): this;
64
+ /**
65
+ * An argument as git's command line gives it: revisions, then paths (after `--`, or from
66
+ * the first argument that names no revision on, which must then exist as git checks them).
67
+ */
68
+ addArgument(arg: string): this;
69
+ /** A path the diffs (and the commits shown) are limited to, as after `--`. */
70
+ addPath(path: string): this;
71
+ /** The output options (see {@link ShowOptions}); merged into those set before. */
72
+ setOptions(options: ShowOptions): this;
73
+ /** Options of the diffs (context, algorithm, `--stat` widths...). */
74
+ setDiffOptions(options: DiffTextOptions): this;
75
+ /** `-<n>` / `-n <n>`: walk the history, at most n commits (git's no-walk off). */
76
+ setMaxCount(maxCount: number): this;
77
+ /** `--skip=<n>`: walk the history, leaving out the first n commits. */
78
+ setSkip(skip: number): this;
79
+ /** {@link call}'s stdout as text; throws git's error when the exit status is not 0. */
80
+ callText(options?: ShowOptions): Promise<string>;
81
+ /** {@link call}'s stdout; throws git's error when the exit status is not 0. */
82
+ callBytes(options?: ShowOptions): Promise<Uint8Array>;
83
+ /**
84
+ * Shows the objects.
85
+ *
86
+ * @throws RevisionError where git dies reading the arguments (`fatal: ambiguous argument`,
87
+ * `fatal: bad revision`, `fatal: path 'x' does not exist in 'HEAD'`), GitApiError where
88
+ * it dies otherwise (an unborn HEAD, `--graph` without a walk), exit status 128
89
+ */
90
+ call(options?: ShowOptions): Promise<ShowResult>;
91
+ /** cmd_show's loop over the pending objects: its exit status (255 after an `error()`) */
92
+ private showObjects;
93
+ /**
94
+ * An object's kind: from its header where the store has it, else by reading it, which
95
+ * fetches a missing object of a partial clone from its promisor remote (git's
96
+ * parse_object); undefined when it cannot be found
97
+ */
98
+ private objectKind;
99
+ /**
100
+ * show_tag_object: `tag <name>`, a `Tagger:` line (and date) for each `tagger` header, the
101
+ * rest of the object from its empty line on; the id it tags, undefined when unreadable
102
+ */
103
+ private showTag;
104
+ /** show_blob_object: the blob's bytes, through textconv for a named path under `--textconv` */
105
+ private blobContent;
106
+ /**
107
+ * get_oid_with_context's recorded path and mode of `<rev>:<path>`, `:<path>` and
108
+ * `:<n>:<path>` (undefined for any other name)
109
+ */
110
+ private blobPath;
111
+ /** An object's content as stored, undefined when it is missing */
112
+ private rawObject;
113
+ /**
114
+ * An object as stored (a partial clone's missing object fetched first), undefined when it is
115
+ * missing. A failed lazy fetch propagates (`PromisorFetchError`); a corrupt copy dies with
116
+ * git's lines (exit 128).
117
+ */
118
+ private readObject;
119
+ /**
120
+ * git's death on a corrupt object (unpack_entry, read_object_file's die): zlib's `error:`
121
+ * line, then `fatal: packed object <id> (stored in <pack>) is corrupt` or the loose
122
+ * object's
123
+ */
124
+ private corruptDeath;
125
+ /** setup_revisions' default `HEAD`, dying as diagnose_missing_default does */
126
+ private defaultHead;
127
+ /** The refs under `refs/` in name order (refs_for_each_ref), symbolic ones resolved. */
128
+ private refTips;
129
+ }
130
+ //# sourceMappingURL=show-command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"show-command.d.ts","sourceRoot":"","sources":["../../src/commands/show-command.ts"],"names":[],"mappings":"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,IAAI,CAI7C;IAED,kFAAkF;IAClF,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAIlC;IAED,uEAAuE;IACvE,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAI1B;IAED,uFAAuF;IACjF,QAAQ,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAErD;IAED,+EAA+E;IACzE,SAAS,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CAM1D;IAED;;;;;;OAMG;IACG,IAAI,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CAyDrD;IAED,yFAAyF;YAC3E,WAAW;IA4CzB;;;;OAIG;YACW,UAAU;IAMxB;;;OAGG;YACW,OAAO;IA8BrB,+FAA+F;YACjF,WAAW;IAkBzB;;;OAGG;YACW,QAAQ;IAwCtB,kEAAkE;YACpD,SAAS;IAIvB;;;;OAIG;YACW,UAAU;IAexB;;;;OAIG;YACW,YAAY;IAoB1B,8EAA8E;YAChE,WAAW;IAWzB,wFAAwF;YAC1E,OAAO;CAWtB"}
@@ -0,0 +1,11 @@
1
+ import type { ObjectId } from "@statewalker/vcs-core";
2
+ import { LogCommand } from "./log-command.js";
3
+ /**
4
+ * `git show <id> --` of one commit, as the child git runs for `rebase --show-current-patch`
5
+ * and `am --show-current-patch` prints it without a terminal: the configuration's format,
6
+ * dates, notes and mailmap, then its patch (`--cc` for a merge, git show's default).
7
+ */
8
+ export declare function showCommitBytes(workingCopy: ConstructorParameters<typeof LogCommand>[0], id: ObjectId): Promise<Uint8Array>;
9
+ /** {@link showCommitBytes} as text. */
10
+ export declare function showCommit(workingCopy: ConstructorParameters<typeof LogCommand>[0], id: ObjectId): Promise<string>;
11
+ //# sourceMappingURL=show-commit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"show-commit.d.ts","sourceRoot":"","sources":["../../src/commands/show-commit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGtD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C;;;;GAIG;AACH,wBAAsB,eAAe,CACnC,WAAW,EAAE,qBAAqB,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,EACxD,EAAE,EAAE,QAAQ,GACX,OAAO,CAAC,UAAU,CAAC,CAErB;AAED,uCAAuC;AACvC,wBAAsB,UAAU,CAC9B,WAAW,EAAE,qBAAqB,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,EACxD,EAAE,EAAE,QAAQ,GACX,OAAO,CAAC,MAAM,CAAC,CAEjB"}