git-chopstick-core 0.1.1 → 0.1.3

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 (461) hide show
  1. package/README.md +324 -32
  2. package/dist/git/add.d.ts +9 -0
  3. package/dist/git/add.js +11 -0
  4. package/dist/git/add.js.map +1 -0
  5. package/dist/git/apply.d.ts +33 -0
  6. package/dist/git/apply.js +103 -0
  7. package/dist/git/apply.js.map +1 -0
  8. package/dist/git/authentication.d.ts +5 -0
  9. package/dist/git/authentication.js +19 -0
  10. package/dist/git/authentication.js.map +1 -0
  11. package/dist/git/branch.d.ts +43 -0
  12. package/dist/git/branch.js +150 -0
  13. package/dist/git/branch.js.map +1 -0
  14. package/dist/git/checkout-index.d.ts +19 -0
  15. package/{src/git/checkout-index.ts → dist/git/checkout-index.js} +11 -22
  16. package/dist/git/checkout-index.js.map +1 -0
  17. package/dist/git/checkout.d.ts +46 -0
  18. package/dist/git/checkout.js +126 -0
  19. package/dist/git/checkout.js.map +1 -0
  20. package/dist/git/cherry-pick.d.ts +82 -0
  21. package/dist/git/cherry-pick.js +371 -0
  22. package/dist/git/cherry-pick.js.map +1 -0
  23. package/dist/git/clean.d.ts +5 -0
  24. package/dist/git/clean.js +8 -0
  25. package/dist/git/clean.js.map +1 -0
  26. package/dist/git/clone.d.ts +22 -0
  27. package/dist/git/clone.js +58 -0
  28. package/dist/git/clone.js.map +1 -0
  29. package/dist/git/coerce-to-buffer.d.ts +1 -0
  30. package/dist/git/coerce-to-buffer.js +2 -0
  31. package/dist/git/coerce-to-buffer.js.map +1 -0
  32. package/dist/git/coerce-to-string.d.ts +1 -0
  33. package/dist/git/coerce-to-string.js +2 -0
  34. package/dist/git/coerce-to-string.js.map +1 -0
  35. package/dist/git/commit.d.ts +25 -0
  36. package/dist/git/commit.js +99 -0
  37. package/dist/git/commit.js.map +1 -0
  38. package/dist/git/config.d.ts +98 -0
  39. package/dist/git/config.js +249 -0
  40. package/dist/git/config.js.map +1 -0
  41. package/dist/git/core.d.ts +167 -0
  42. package/dist/git/core.js +368 -0
  43. package/dist/git/core.js.map +1 -0
  44. package/dist/git/create-tail-stream.d.ts +4 -0
  45. package/dist/git/create-tail-stream.js +30 -0
  46. package/dist/git/create-tail-stream.js.map +1 -0
  47. package/dist/git/credential.d.ts +5 -0
  48. package/dist/git/credential.js +64 -0
  49. package/dist/git/credential.js.map +1 -0
  50. package/dist/git/description.d.ts +5 -0
  51. package/dist/git/description.js +24 -0
  52. package/dist/git/description.js.map +1 -0
  53. package/dist/git/diff-check.d.ts +7 -0
  54. package/dist/git/diff-check.js +17 -0
  55. package/dist/git/diff-check.js.map +1 -0
  56. package/dist/git/diff-index.d.ts +31 -0
  57. package/dist/git/diff-index.js +76 -0
  58. package/dist/git/diff-index.js.map +1 -0
  59. package/dist/git/diff.d.ts +81 -0
  60. package/dist/git/diff.js +611 -0
  61. package/dist/git/diff.js.map +1 -0
  62. package/dist/git/environment.d.ts +51 -0
  63. package/dist/git/environment.js +97 -0
  64. package/dist/git/environment.js.map +1 -0
  65. package/dist/git/exec.d.ts +109 -0
  66. package/dist/git/exec.js +224 -0
  67. package/dist/git/exec.js.map +1 -0
  68. package/dist/git/fetch.d.ts +25 -0
  69. package/dist/git/fetch.js +100 -0
  70. package/dist/git/fetch.js.map +1 -0
  71. package/dist/git/for-each-ref.d.ts +13 -0
  72. package/dist/git/for-each-ref.js +114 -0
  73. package/dist/git/for-each-ref.js.map +1 -0
  74. package/dist/git/format-patch.d.ts +10 -0
  75. package/dist/git/format-patch.js +16 -0
  76. package/dist/git/format-patch.js.map +1 -0
  77. package/dist/git/git-delimiter-parser.d.ts +38 -0
  78. package/dist/git/git-delimiter-parser.js +79 -0
  79. package/dist/git/git-delimiter-parser.js.map +1 -0
  80. package/dist/git/gitignore.d.ts +26 -0
  81. package/dist/git/gitignore.js +124 -0
  82. package/dist/git/gitignore.js.map +1 -0
  83. package/dist/git/index.d.ts +46 -0
  84. package/dist/git/index.js +47 -0
  85. package/dist/git/index.js.map +1 -0
  86. package/dist/git/init.d.ts +2 -0
  87. package/dist/git/init.js +7 -0
  88. package/dist/git/init.js.map +1 -0
  89. package/{src/git/interpret-trailers.ts → dist/git/interpret-trailers.d.ts} +9 -97
  90. package/dist/git/interpret-trailers.js +130 -0
  91. package/dist/git/interpret-trailers.js.map +1 -0
  92. package/dist/git/lfs.d.ts +25 -0
  93. package/dist/git/lfs.js +73 -0
  94. package/dist/git/lfs.js.map +1 -0
  95. package/dist/git/log.d.ts +56 -0
  96. package/dist/git/log.js +258 -0
  97. package/dist/git/log.js.map +1 -0
  98. package/dist/git/merge-tree.d.ts +13 -0
  99. package/dist/git/merge-tree.js +24 -0
  100. package/dist/git/merge-tree.js.map +1 -0
  101. package/dist/git/merge.d.ts +50 -0
  102. package/dist/git/merge.js +111 -0
  103. package/dist/git/merge.js.map +1 -0
  104. package/dist/git/multi-operation-terminal-output.d.ts +20 -0
  105. package/dist/git/multi-operation-terminal-output.js +56 -0
  106. package/dist/git/multi-operation-terminal-output.js.map +1 -0
  107. package/dist/git/pull.d.ts +24 -0
  108. package/dist/git/pull.js +91 -0
  109. package/dist/git/pull.js.map +1 -0
  110. package/{src/git/push-terminal-chunk.ts → dist/git/push-terminal-chunk.d.ts} +1 -23
  111. package/dist/git/push-terminal-chunk.js +36 -0
  112. package/dist/git/push-terminal-chunk.js.map +1 -0
  113. package/dist/git/push.d.ts +42 -0
  114. package/dist/git/push.js +80 -0
  115. package/dist/git/push.js.map +1 -0
  116. package/dist/git/rebase.d.ts +119 -0
  117. package/dist/git/rebase.js +415 -0
  118. package/dist/git/rebase.js.map +1 -0
  119. package/dist/git/reflog.d.ts +14 -0
  120. package/dist/git/reflog.js +88 -0
  121. package/dist/git/reflog.js.map +1 -0
  122. package/dist/git/refs.d.ts +26 -0
  123. package/dist/git/refs.js +53 -0
  124. package/dist/git/refs.js.map +1 -0
  125. package/dist/git/remote.d.ts +31 -0
  126. package/dist/git/remote.js +81 -0
  127. package/dist/git/remote.js.map +1 -0
  128. package/dist/git/reorder.d.ts +23 -0
  129. package/dist/git/reorder.js +111 -0
  130. package/dist/git/reorder.js.map +1 -0
  131. package/dist/git/reset.d.ts +41 -0
  132. package/dist/git/reset.js +86 -0
  133. package/dist/git/reset.js.map +1 -0
  134. package/dist/git/rev-list.d.ts +67 -0
  135. package/dist/git/rev-list.js +157 -0
  136. package/dist/git/rev-list.js.map +1 -0
  137. package/dist/git/rev-parse.d.ts +24 -0
  138. package/dist/git/rev-parse.js +65 -0
  139. package/dist/git/rev-parse.js.map +1 -0
  140. package/dist/git/revert.d.ts +12 -0
  141. package/dist/git/revert.js +30 -0
  142. package/dist/git/revert.js.map +1 -0
  143. package/dist/git/rm.d.ts +12 -0
  144. package/dist/git/rm.js +22 -0
  145. package/dist/git/rm.js.map +1 -0
  146. package/dist/git/show.d.ts +42 -0
  147. package/{src/git/show.ts → dist/git/show.js} +17 -46
  148. package/dist/git/show.js.map +1 -0
  149. package/dist/git/spawn.d.ts +18 -0
  150. package/dist/git/spawn.js +16 -0
  151. package/dist/git/spawn.js.map +1 -0
  152. package/dist/git/squash.d.ts +28 -0
  153. package/dist/git/squash.js +127 -0
  154. package/dist/git/squash.js.map +1 -0
  155. package/dist/git/stage.d.ts +21 -0
  156. package/dist/git/stage.js +72 -0
  157. package/dist/git/stage.js.map +1 -0
  158. package/dist/git/stash.d.ts +53 -0
  159. package/dist/git/stash.js +204 -0
  160. package/dist/git/stash.js.map +1 -0
  161. package/dist/git/status.d.ts +39 -0
  162. package/dist/git/status.js +293 -0
  163. package/dist/git/status.js.map +1 -0
  164. package/dist/git/submodule.d.ts +20 -0
  165. package/dist/git/submodule.js +153 -0
  166. package/dist/git/submodule.js.map +1 -0
  167. package/dist/git/tag.d.ts +32 -0
  168. package/dist/git/tag.js +101 -0
  169. package/dist/git/tag.js.map +1 -0
  170. package/dist/git/update-index.d.ts +11 -0
  171. package/dist/git/update-index.js +99 -0
  172. package/dist/git/update-index.js.map +1 -0
  173. package/dist/git/update-ref.d.ts +23 -0
  174. package/{src/git/update-ref.ts → dist/git/update-ref.js} +10 -28
  175. package/dist/git/update-ref.js.map +1 -0
  176. package/dist/git/var.d.ts +18 -0
  177. package/{src/git/var.ts → dist/git/var.js} +16 -25
  178. package/dist/git/var.js.map +1 -0
  179. package/dist/git/worktree-include.d.ts +42 -0
  180. package/dist/git/worktree-include.js +109 -0
  181. package/dist/git/worktree-include.js.map +1 -0
  182. package/dist/git/worktree.d.ts +25 -0
  183. package/dist/git/worktree.js +139 -0
  184. package/dist/git/worktree.js.map +1 -0
  185. package/dist/index.d.ts +4 -0
  186. package/dist/index.js +7 -0
  187. package/dist/index.js.map +1 -0
  188. package/dist/lib/api.d.ts +2 -0
  189. package/dist/lib/api.js +7 -0
  190. package/dist/lib/api.js.map +1 -0
  191. package/dist/lib/diff-parser.d.ts +20 -0
  192. package/dist/lib/diff-parser.js +184 -0
  193. package/dist/lib/diff-parser.js.map +1 -0
  194. package/dist/lib/directory-exists.d.ts +1 -0
  195. package/dist/lib/directory-exists.js +11 -0
  196. package/dist/lib/directory-exists.js.map +1 -0
  197. package/dist/lib/errno-exception.d.ts +6 -0
  198. package/dist/lib/errno-exception.js +6 -0
  199. package/dist/lib/errno-exception.js.map +1 -0
  200. package/dist/lib/fatal-error.d.ts +4 -0
  201. package/dist/lib/fatal-error.js +18 -0
  202. package/dist/lib/fatal-error.js.map +1 -0
  203. package/dist/lib/feature-flag.d.ts +14 -0
  204. package/dist/lib/feature-flag.js +25 -0
  205. package/dist/lib/feature-flag.js.map +1 -0
  206. package/dist/lib/file-system.d.ts +1 -0
  207. package/dist/lib/file-system.js +7 -0
  208. package/dist/lib/file-system.js.map +1 -0
  209. package/dist/lib/get-old-path.d.ts +2 -0
  210. package/dist/lib/get-old-path.js +9 -0
  211. package/dist/lib/get-old-path.js.map +1 -0
  212. package/dist/lib/git/environment.d.ts +3 -0
  213. package/dist/lib/git/environment.js +7 -0
  214. package/dist/lib/git/environment.js.map +1 -0
  215. package/dist/lib/git-perf.d.ts +1 -0
  216. package/dist/lib/git-perf.js +4 -0
  217. package/dist/lib/git-perf.js.map +1 -0
  218. package/dist/lib/helpers/default-branch.d.ts +1 -0
  219. package/dist/lib/helpers/default-branch.js +4 -0
  220. package/dist/lib/helpers/default-branch.js.map +1 -0
  221. package/dist/lib/helpers/path.d.ts +1 -0
  222. package/dist/lib/helpers/path.js +5 -0
  223. package/dist/lib/helpers/path.js.map +1 -0
  224. package/dist/lib/hooks/with-hooks-env.d.ts +3 -0
  225. package/dist/lib/hooks/with-hooks-env.js +4 -0
  226. package/dist/lib/hooks/with-hooks-env.js.map +1 -0
  227. package/dist/lib/merge.d.ts +1 -0
  228. package/dist/lib/merge.js +4 -0
  229. package/dist/lib/merge.js.map +1 -0
  230. package/dist/lib/noop.d.ts +1 -0
  231. package/dist/lib/noop.js +2 -0
  232. package/dist/lib/noop.js.map +1 -0
  233. package/dist/lib/patch-formatter.d.ts +5 -0
  234. package/dist/lib/patch-formatter.js +7 -0
  235. package/dist/lib/patch-formatter.js.map +1 -0
  236. package/dist/lib/path-exists.d.ts +1 -0
  237. package/dist/lib/path-exists.js +3 -0
  238. package/dist/lib/path-exists.js.map +1 -0
  239. package/dist/lib/progress/from-process.d.ts +2 -0
  240. package/dist/lib/progress/from-process.js +4 -0
  241. package/dist/lib/progress/from-process.js.map +1 -0
  242. package/dist/lib/progress/index.d.ts +49 -0
  243. package/dist/lib/progress/index.js +32 -0
  244. package/dist/lib/progress/index.js.map +1 -0
  245. package/dist/lib/progress/revert.d.ts +8 -0
  246. package/dist/lib/progress/revert.js +15 -0
  247. package/dist/lib/progress/revert.js.map +1 -0
  248. package/dist/lib/rebase.d.ts +1 -0
  249. package/dist/lib/rebase.js +4 -0
  250. package/dist/lib/rebase.js.map +1 -0
  251. package/dist/lib/remove-remote-prefix.d.ts +1 -0
  252. package/dist/lib/remove-remote-prefix.js +5 -0
  253. package/dist/lib/remove-remote-prefix.js.map +1 -0
  254. package/dist/lib/resolve-git-proxy.d.ts +1 -0
  255. package/dist/lib/resolve-git-proxy.js +4 -0
  256. package/dist/lib/resolve-git-proxy.js.map +1 -0
  257. package/dist/lib/round.d.ts +1 -0
  258. package/dist/lib/round.js +5 -0
  259. package/dist/lib/round.js.map +1 -0
  260. package/dist/lib/split-buffer.d.ts +1 -0
  261. package/dist/lib/split-buffer.js +15 -0
  262. package/dist/lib/split-buffer.js.map +1 -0
  263. package/dist/lib/status-parser.d.ts +19 -0
  264. package/dist/lib/status-parser.js +125 -0
  265. package/dist/lib/status-parser.js.map +1 -0
  266. package/dist/lib/stores/helpers/find-default-remote.d.ts +1 -0
  267. package/dist/lib/stores/helpers/find-default-remote.js +4 -0
  268. package/dist/lib/stores/helpers/find-default-remote.js.map +1 -0
  269. package/dist/lib/trampoline/trampoline-environment.d.ts +1 -0
  270. package/dist/lib/trampoline/trampoline-environment.js +4 -0
  271. package/dist/lib/trampoline/trampoline-environment.js.map +1 -0
  272. package/dist/models/branch.d.ts +44 -0
  273. package/dist/models/branch.js +59 -0
  274. package/dist/models/branch.js.map +1 -0
  275. package/dist/models/cherry-pick.d.ts +11 -0
  276. package/dist/models/cherry-pick.js +2 -0
  277. package/dist/models/cherry-pick.js.map +1 -0
  278. package/dist/models/clone-options.d.ts +6 -0
  279. package/dist/models/clone-options.js +2 -0
  280. package/dist/models/clone-options.js.map +1 -0
  281. package/dist/models/commit-identity.d.ts +9 -0
  282. package/dist/models/commit-identity.js +34 -0
  283. package/dist/models/commit-identity.js.map +1 -0
  284. package/dist/models/commit.d.ts +30 -0
  285. package/dist/models/commit.js +32 -0
  286. package/dist/models/commit.js.map +1 -0
  287. package/dist/models/computed-action.d.ts +6 -0
  288. package/dist/models/computed-action.js +8 -0
  289. package/dist/models/computed-action.js.map +1 -0
  290. package/dist/models/diff/diff-data.d.ts +53 -0
  291. package/dist/models/diff/diff-data.js +19 -0
  292. package/dist/models/diff/diff-data.js.map +1 -0
  293. package/dist/models/diff/diff-line.d.ts +18 -0
  294. package/dist/models/diff/diff-line.js +33 -0
  295. package/dist/models/diff/diff-line.js.map +1 -0
  296. package/dist/models/diff/diff-selection.d.ts +22 -0
  297. package/dist/models/diff/diff-selection.js +127 -0
  298. package/dist/models/diff/diff-selection.js.map +1 -0
  299. package/dist/models/diff/image-diff.d.ts +6 -0
  300. package/dist/models/diff/image-diff.js +8 -0
  301. package/dist/models/diff/image-diff.js.map +1 -0
  302. package/dist/models/diff/image.d.ts +7 -0
  303. package/dist/models/diff/image.js +13 -0
  304. package/dist/models/diff/image.js.map +1 -0
  305. package/dist/models/diff/index.d.ts +6 -0
  306. package/dist/models/diff/index.js +7 -0
  307. package/dist/models/diff/index.js.map +1 -0
  308. package/dist/models/diff/raw-diff.d.ts +32 -0
  309. package/dist/models/diff/raw-diff.js +38 -0
  310. package/dist/models/diff/raw-diff.js.map +1 -0
  311. package/dist/models/git-author.d.ts +7 -0
  312. package/dist/models/git-author.js +18 -0
  313. package/dist/models/git-author.js.map +1 -0
  314. package/dist/models/index.d.ts +21 -0
  315. package/dist/models/index.js +20 -0
  316. package/dist/models/index.js.map +1 -0
  317. package/dist/models/manual-conflict-resolution.d.ts +4 -0
  318. package/dist/models/manual-conflict-resolution.js +6 -0
  319. package/dist/models/manual-conflict-resolution.js.map +1 -0
  320. package/dist/models/merge.d.ts +6 -0
  321. package/dist/models/merge.js +2 -0
  322. package/dist/models/merge.js.map +1 -0
  323. package/dist/models/multi-commit-operation.d.ts +6 -0
  324. package/dist/models/multi-commit-operation.js +8 -0
  325. package/dist/models/multi-commit-operation.js.map +1 -0
  326. package/dist/models/progress.d.ts +41 -0
  327. package/dist/models/progress.js +7 -0
  328. package/dist/models/progress.js.map +1 -0
  329. package/dist/models/rebase.d.ts +17 -0
  330. package/dist/models/rebase.js +8 -0
  331. package/dist/models/rebase.js.map +1 -0
  332. package/dist/models/remote.d.ts +5 -0
  333. package/dist/models/remote.js +8 -0
  334. package/dist/models/remote.js.map +1 -0
  335. package/dist/models/repository.d.ts +7 -0
  336. package/dist/models/repository.js +15 -0
  337. package/dist/models/repository.js.map +1 -0
  338. package/dist/models/stash-entry.d.ts +20 -0
  339. package/dist/models/stash-entry.js +7 -0
  340. package/dist/models/stash-entry.js.map +1 -0
  341. package/dist/models/status.d.ts +166 -0
  342. package/dist/models/status.js +135 -0
  343. package/dist/models/status.js.map +1 -0
  344. package/dist/models/submodule.d.ts +12 -0
  345. package/dist/models/submodule.js +2 -0
  346. package/dist/models/submodule.js.map +1 -0
  347. package/dist/models/worktree.d.ts +10 -0
  348. package/dist/models/worktree.js +2 -0
  349. package/dist/models/worktree.js.map +1 -0
  350. package/package.json +44 -5
  351. package/examples/get-status.ts +0 -84
  352. package/src/git/add.ts +0 -16
  353. package/src/git/apply.ts +0 -154
  354. package/src/git/authentication.ts +0 -19
  355. package/src/git/branch.ts +0 -206
  356. package/src/git/checkout.ts +0 -235
  357. package/src/git/cherry-pick.ts +0 -504
  358. package/src/git/clean.ts +0 -9
  359. package/src/git/clone.ts +0 -86
  360. package/src/git/coerce-to-buffer.ts +0 -4
  361. package/src/git/coerce-to-string.ts +0 -4
  362. package/src/git/commit.ts +0 -136
  363. package/src/git/config.ts +0 -392
  364. package/src/git/core.ts +0 -625
  365. package/src/git/create-tail-stream.ts +0 -36
  366. package/src/git/credential.ts +0 -83
  367. package/src/git/description.ts +0 -33
  368. package/src/git/diff-check.ts +0 -27
  369. package/src/git/diff-index.ts +0 -116
  370. package/src/git/diff.ts +0 -880
  371. package/src/git/environment.ts +0 -116
  372. package/src/git/exec.ts +0 -285
  373. package/src/git/fetch.ts +0 -141
  374. package/src/git/for-each-ref.ts +0 -160
  375. package/src/git/format-patch.ts +0 -17
  376. package/src/git/git-delimiter-parser.ts +0 -95
  377. package/src/git/gitignore.ts +0 -157
  378. package/src/git/index.ts +0 -36
  379. package/src/git/init.ts +0 -11
  380. package/src/git/lfs.ts +0 -100
  381. package/src/git/log.ts +0 -376
  382. package/src/git/merge-tree.ts +0 -42
  383. package/src/git/merge.ts +0 -154
  384. package/src/git/multi-operation-terminal-output.ts +0 -68
  385. package/src/git/pull.ts +0 -130
  386. package/src/git/push.ts +0 -119
  387. package/src/git/rebase.ts +0 -627
  388. package/src/git/reflog.ts +0 -127
  389. package/src/git/refs.ts +0 -63
  390. package/src/git/remote.ts +0 -143
  391. package/src/git/reorder.ts +0 -153
  392. package/src/git/reset.ts +0 -101
  393. package/src/git/rev-list.ts +0 -201
  394. package/src/git/rev-parse.ts +0 -92
  395. package/src/git/revert.ts +0 -55
  396. package/src/git/rm.ts +0 -31
  397. package/src/git/spawn.ts +0 -38
  398. package/src/git/squash.ts +0 -173
  399. package/src/git/stage.ts +0 -97
  400. package/src/git/stash.ts +0 -302
  401. package/src/git/status.ts +0 -502
  402. package/src/git/submodule.ts +0 -212
  403. package/src/git/tag.ts +0 -134
  404. package/src/git/update-index.ts +0 -169
  405. package/src/git/worktree-include.ts +0 -146
  406. package/src/git/worktree.ts +0 -219
  407. package/src/index.ts +0 -23
  408. package/src/lib/api.ts +0 -7
  409. package/src/lib/diff-parser.ts +0 -249
  410. package/src/lib/directory-exists.ts +0 -10
  411. package/src/lib/errno-exception.ts +0 -12
  412. package/src/lib/fatal-error.ts +0 -23
  413. package/src/lib/feature-flag.ts +0 -29
  414. package/src/lib/file-system.ts +0 -7
  415. package/src/lib/get-old-path.ts +0 -11
  416. package/src/lib/git/environment.ts +0 -14
  417. package/src/lib/git-perf.ts +0 -3
  418. package/src/lib/helpers/default-branch.ts +0 -3
  419. package/src/lib/helpers/path.ts +0 -5
  420. package/src/lib/hooks/with-hooks-env.ts +0 -7
  421. package/src/lib/merge.ts +0 -3
  422. package/src/lib/noop.ts +0 -1
  423. package/src/lib/patch-formatter.ts +0 -18
  424. package/src/lib/path-exists.ts +0 -7
  425. package/src/lib/progress/from-process.ts +0 -10
  426. package/src/lib/progress/index.ts +0 -43
  427. package/src/lib/progress/revert.ts +0 -17
  428. package/src/lib/rebase.ts +0 -3
  429. package/src/lib/remove-remote-prefix.ts +0 -4
  430. package/src/lib/resolve-git-proxy.ts +0 -3
  431. package/src/lib/round.ts +0 -4
  432. package/src/lib/split-buffer.ts +0 -14
  433. package/src/lib/status-parser.ts +0 -188
  434. package/src/lib/stores/helpers/find-default-remote.ts +0 -3
  435. package/src/lib/trampoline/trampoline-environment.ts +0 -8
  436. package/src/models/branch.ts +0 -78
  437. package/src/models/cherry-pick.ts +0 -12
  438. package/src/models/clone-options.ts +0 -6
  439. package/src/models/commit-identity.ts +0 -35
  440. package/src/models/commit.ts +0 -44
  441. package/src/models/computed-action.ts +0 -6
  442. package/src/models/diff/diff-data.ts +0 -78
  443. package/src/models/diff/diff-line.ts +0 -36
  444. package/src/models/diff/diff-selection.ts +0 -165
  445. package/src/models/diff/image-diff.ts +0 -6
  446. package/src/models/diff/image.ts +0 -8
  447. package/src/models/diff/index.ts +0 -6
  448. package/src/models/diff/raw-diff.ts +0 -41
  449. package/src/models/git-author.ts +0 -16
  450. package/src/models/manual-conflict-resolution.ts +0 -4
  451. package/src/models/merge.ts +0 -6
  452. package/src/models/multi-commit-operation.ts +0 -6
  453. package/src/models/progress.ts +0 -67
  454. package/src/models/rebase.ts +0 -20
  455. package/src/models/remote.ts +0 -10
  456. package/src/models/repository.ts +0 -16
  457. package/src/models/stash-entry.ts +0 -25
  458. package/src/models/status.ts +0 -275
  459. package/src/models/submodule.ts +0 -13
  460. package/src/models/worktree.ts +0 -11
  461. package/tsconfig.json +0 -17
@@ -1,25 +1,18 @@
1
- import { git } from './core'
2
- import { Repository } from '../models/repository'
3
- import { getConfigValue } from './config'
4
-
1
+ import { Repository } from '../models/repository.js';
5
2
  /**
6
3
  * A representation of a Git commit message trailer.
7
4
  *
8
5
  * See git-interpret-trailers for more information.
9
6
  */
10
7
  export interface ITrailer {
11
- readonly token: string
12
- readonly value: string
8
+ readonly token: string;
9
+ readonly value: string;
13
10
  }
14
-
15
11
  /**
16
12
  * Gets a value indicating whether the trailer token is
17
13
  * Co-Authored-By. Does not validate the token value.
18
14
  */
19
- export function isCoAuthoredByTrailer(trailer: ITrailer) {
20
- return trailer.token.toLowerCase() === 'co-authored-by'
21
- }
22
-
15
+ export declare function isCoAuthoredByTrailer(trailer: ITrailer): boolean;
23
16
  /**
24
17
  * Parse a string containing only unfolded trailers produced by
25
18
  * git-interpret-trailers --only-input --only-trailers --unfold or
@@ -35,49 +28,14 @@ export function isCoAuthoredByTrailer(trailer: ITrailer) {
35
28
  *
36
29
  * Also see getTrailerSeparatorCharacters.
37
30
  */
38
- export function parseRawUnfoldedTrailers(trailers: string, separators: string) {
39
- const lines = trailers.split('\n')
40
- const parsedTrailers = new Array<ITrailer>()
41
-
42
- for (const line of lines) {
43
- const trailer = parseSingleUnfoldedTrailer(line, separators)
44
-
45
- if (trailer) {
46
- parsedTrailers.push(trailer)
47
- }
48
- }
49
-
50
- return parsedTrailers
51
- }
52
-
53
- export function parseSingleUnfoldedTrailer(
54
- line: string,
55
- separators: string
56
- ): ITrailer | null {
57
- for (const separator of separators) {
58
- const ix = line.indexOf(separator)
59
- if (ix > 0) {
60
- return {
61
- token: line.substring(0, ix).trim(),
62
- value: line.substring(ix + 1).trim(),
63
- }
64
- }
65
- }
66
-
67
- return null
68
- }
69
-
31
+ export declare function parseRawUnfoldedTrailers(trailers: string, separators: string): ITrailer[];
32
+ export declare function parseSingleUnfoldedTrailer(line: string, separators: string): ITrailer | null;
70
33
  /**
71
34
  * Get a string containing the characters that may be used in this repository
72
35
  * separate tokens from values in commit message trailers. If no specific
73
36
  * trailer separator is configured the default separator (:) will be returned.
74
37
  */
75
- export async function getTrailerSeparatorCharacters(
76
- repository: Repository
77
- ): Promise<string> {
78
- return (await getConfigValue(repository, 'trailer.separators')) || ':'
79
- }
80
-
38
+ export declare function getTrailerSeparatorCharacters(repository: Repository): Promise<string>;
81
39
  /**
82
40
  * Extract commit message trailers from a commit message.
83
41
  *
@@ -97,29 +55,7 @@ export async function getTrailerSeparatorCharacters(
97
55
  *
98
56
  * @returns An array of zero or more parsed trailers
99
57
  */
100
- export async function parseTrailers(
101
- repository: Repository,
102
- commitMessage: string
103
- ): Promise<ReadonlyArray<ITrailer>> {
104
- const result = await git(
105
- ['interpret-trailers', '--parse'],
106
- repository.path,
107
- 'parseTrailers',
108
- {
109
- stdin: commitMessage,
110
- }
111
- )
112
-
113
- const trailers = result.stdout
114
-
115
- if (trailers.length === 0) {
116
- return []
117
- }
118
-
119
- const separators = await getTrailerSeparatorCharacters(repository)
120
- return parseRawUnfoldedTrailers(result.stdout, separators)
121
- }
122
-
58
+ export declare function parseTrailers(repository: Repository, commitMessage: string): Promise<ReadonlyArray<ITrailer>>;
123
59
  /**
124
60
  * Merge one or more commit message trailers into a commit message.
125
61
  *
@@ -149,28 +85,4 @@ export async function parseTrailers(
149
85
  * configuration settings for trailers in the provided
150
86
  * repository.
151
87
  */
152
- export async function mergeTrailers(
153
- repository: Repository,
154
- commitMessage: string,
155
- trailers: ReadonlyArray<ITrailer>,
156
- unfold: boolean = false
157
- ) {
158
- const args = ['interpret-trailers']
159
-
160
- // See https://github.com/git/git/blob/ebf3c04b262aa/Documentation/git-interpret-trailers.txt#L129-L132
161
- args.push('--no-divider')
162
-
163
- if (unfold) {
164
- args.push('--unfold')
165
- }
166
-
167
- for (const trailer of trailers) {
168
- args.push('--trailer', `${trailer.token}=${trailer.value}`)
169
- }
170
-
171
- const result = await git(args, repository.path, 'mergeTrailers', {
172
- stdin: commitMessage,
173
- })
174
-
175
- return result.stdout
176
- }
88
+ export declare function mergeTrailers(repository: Repository, commitMessage: string, trailers: ReadonlyArray<ITrailer>, unfold?: boolean): Promise<string>;
@@ -0,0 +1,130 @@
1
+ import { git } from './core.js';
2
+ import { getConfigValue } from './config.js';
3
+ /**
4
+ * Gets a value indicating whether the trailer token is
5
+ * Co-Authored-By. Does not validate the token value.
6
+ */
7
+ export function isCoAuthoredByTrailer(trailer) {
8
+ return trailer.token.toLowerCase() === 'co-authored-by';
9
+ }
10
+ /**
11
+ * Parse a string containing only unfolded trailers produced by
12
+ * git-interpret-trailers --only-input --only-trailers --unfold or
13
+ * a derivative such as git log --format="%(trailers:only,unfold)"
14
+ *
15
+ * @param trailers A string containing one well formed trailer per
16
+ * line
17
+ *
18
+ * @param separators A string containing all characters to use when
19
+ * attempting to find the separator between token
20
+ * and value in a trailer. See the configuration
21
+ * option trailer.separators for more information
22
+ *
23
+ * Also see getTrailerSeparatorCharacters.
24
+ */
25
+ export function parseRawUnfoldedTrailers(trailers, separators) {
26
+ const lines = trailers.split('\n');
27
+ const parsedTrailers = new Array();
28
+ for (const line of lines) {
29
+ const trailer = parseSingleUnfoldedTrailer(line, separators);
30
+ if (trailer) {
31
+ parsedTrailers.push(trailer);
32
+ }
33
+ }
34
+ return parsedTrailers;
35
+ }
36
+ export function parseSingleUnfoldedTrailer(line, separators) {
37
+ for (const separator of separators) {
38
+ const ix = line.indexOf(separator);
39
+ if (ix > 0) {
40
+ return {
41
+ token: line.substring(0, ix).trim(),
42
+ value: line.substring(ix + 1).trim(),
43
+ };
44
+ }
45
+ }
46
+ return null;
47
+ }
48
+ /**
49
+ * Get a string containing the characters that may be used in this repository
50
+ * separate tokens from values in commit message trailers. If no specific
51
+ * trailer separator is configured the default separator (:) will be returned.
52
+ */
53
+ export async function getTrailerSeparatorCharacters(repository) {
54
+ return (await getConfigValue(repository, 'trailer.separators')) || ':';
55
+ }
56
+ /**
57
+ * Extract commit message trailers from a commit message.
58
+ *
59
+ * The trailers returned here are unfolded, i.e. they've had their
60
+ * whitespace continuation removed and are all on one line. See the
61
+ * documentation for --unfold in the help for `git interpret-trailers`
62
+ *
63
+ * @param repository The repository in which to run the interpret-
64
+ * trailers command. Although not intuitive this
65
+ * does matter as there are configuration options
66
+ * available for the format, position, etc of commit
67
+ * message trailers. See the manpage for
68
+ * git-interpret-trailers for more information.
69
+ *
70
+ * @param commitMessage A commit message from where to attempt to extract
71
+ * commit message trailers.
72
+ *
73
+ * @returns An array of zero or more parsed trailers
74
+ */
75
+ export async function parseTrailers(repository, commitMessage) {
76
+ const result = await git(['interpret-trailers', '--parse'], repository.path, 'parseTrailers', {
77
+ stdin: commitMessage,
78
+ });
79
+ const trailers = result.stdout;
80
+ if (trailers.length === 0) {
81
+ return [];
82
+ }
83
+ const separators = await getTrailerSeparatorCharacters(repository);
84
+ return parseRawUnfoldedTrailers(result.stdout, separators);
85
+ }
86
+ /**
87
+ * Merge one or more commit message trailers into a commit message.
88
+ *
89
+ * If no trailers are given this method will simply try to ensure that
90
+ * any trailers that happen to be part of the raw message are formatted
91
+ * in accordance with the configuration options set for trailers in
92
+ * the given repository.
93
+ *
94
+ * Note that configuration may be set so that duplicate trailers are
95
+ * kept or discarded.
96
+ *
97
+ * @param repository The repository in which to run the interpret-
98
+ * trailers command. Although not intuitive this
99
+ * does matter as there are configuration options
100
+ * available for the format, position, etc of commit
101
+ * message trailers. See the manpage for
102
+ * git-interpret-trailers for more information.
103
+ *
104
+ * @param commitMessage A commit message with or without existing commit
105
+ * message trailers into which to merge the trailers
106
+ * given in the trailers parameter
107
+ *
108
+ * @param trailers Zero or more trailers to merge into the commit message
109
+ *
110
+ * @returns A commit message string where the provided trailers (if)
111
+ * any have been merged into the commit message using the
112
+ * configuration settings for trailers in the provided
113
+ * repository.
114
+ */
115
+ export async function mergeTrailers(repository, commitMessage, trailers, unfold = false) {
116
+ const args = ['interpret-trailers'];
117
+ // See https://github.com/git/git/blob/ebf3c04b262aa/Documentation/git-interpret-trailers.txt#L129-L132
118
+ args.push('--no-divider');
119
+ if (unfold) {
120
+ args.push('--unfold');
121
+ }
122
+ for (const trailer of trailers) {
123
+ args.push('--trailer', `${trailer.token}=${trailer.value}`);
124
+ }
125
+ const result = await git(args, repository.path, 'mergeTrailers', {
126
+ stdin: commitMessage,
127
+ });
128
+ return result.stdout;
129
+ }
130
+ //# sourceMappingURL=interpret-trailers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interpret-trailers.js","sourceRoot":"","sources":["../../src/git/interpret-trailers.ts"],"names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AAE,aAAa;KACrB,CAAC,CAAA;IAEF,OAAO,MAAM,CAAC,MAAM,CAAA;AACtB,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { Repository } from '../models/repository.js';
2
+ /** Install the global LFS filters. */
3
+ export declare function installGlobalLFSFilters(force: boolean): Promise<void>;
4
+ /** Install LFS hooks in the repository. */
5
+ export declare function installLFSHooks(repository: Repository, force: boolean): Promise<void>;
6
+ /** Is the repository configured to track any paths with LFS? */
7
+ export declare function isUsingLFS(repository: Repository): Promise<boolean>;
8
+ /**
9
+ * Check if a provided file path is being tracked by Git LFS
10
+ *
11
+ * This uses the Git plumbing to read the .gitattributes file
12
+ * for any LFS-related rules that are set for the file
13
+ *
14
+ * @param repository repository with
15
+ * @param path relative file path in the repository
16
+ */
17
+ export declare function isTrackedByLFS(repository: Repository, path: string): Promise<boolean>;
18
+ /**
19
+ * Query a Git repository and filter the set of provided relative paths to see
20
+ * which are not covered by the current Git LFS configuration.
21
+ *
22
+ * @param repository
23
+ * @param filePaths List of relative paths in the repository
24
+ */
25
+ export declare function filesNotTrackedByLFS(repository: Repository, filePaths: ReadonlyArray<string>): Promise<ReadonlyArray<string>>;
@@ -0,0 +1,73 @@
1
+ import { git } from './core.js';
2
+ /** Install the global LFS filters. */
3
+ export async function installGlobalLFSFilters(force) {
4
+ const args = ['lfs', 'install', '--skip-repo'];
5
+ if (force) {
6
+ args.push('--force');
7
+ }
8
+ await git(args, __dirname, 'installGlobalLFSFilter');
9
+ }
10
+ /** Install LFS hooks in the repository. */
11
+ export async function installLFSHooks(repository, force) {
12
+ const args = ['lfs', 'install'];
13
+ if (force) {
14
+ args.push('--force');
15
+ }
16
+ await git(args, repository.path, 'installLFSHooks');
17
+ }
18
+ /** Is the repository configured to track any paths with LFS? */
19
+ export async function isUsingLFS(repository) {
20
+ const env = {
21
+ GIT_LFS_TRACK_NO_INSTALL_HOOKS: '1',
22
+ };
23
+ const result = await git(['lfs', 'track'], repository.path, 'isUsingLFS', {
24
+ env,
25
+ });
26
+ return result.stdout.length > 0;
27
+ }
28
+ /**
29
+ * Check if a provided file path is being tracked by Git LFS
30
+ *
31
+ * This uses the Git plumbing to read the .gitattributes file
32
+ * for any LFS-related rules that are set for the file
33
+ *
34
+ * @param repository repository with
35
+ * @param path relative file path in the repository
36
+ */
37
+ export async function isTrackedByLFS(repository, path) {
38
+ const { stdout } = await git(['check-attr', 'filter', path], repository.path, 'checkAttrForLFS');
39
+ // "git check-attr -a" will output every filter it can find in .gitattributes
40
+ // and it looks like this:
41
+ //
42
+ // README.md: diff: lfs
43
+ // README.md: merge: lfs
44
+ // README.md: text: unset
45
+ // README.md: filter: lfs
46
+ //
47
+ // To verify git-lfs this test will just focus on that last row, "filter",
48
+ // and the value associated with it. If nothing is found in .gitattributes
49
+ // the output will look like this
50
+ //
51
+ // README.md: filter: unspecified
52
+ const lfsFilterRegex = /: filter: lfs/;
53
+ const match = lfsFilterRegex.exec(stdout);
54
+ return match !== null;
55
+ }
56
+ /**
57
+ * Query a Git repository and filter the set of provided relative paths to see
58
+ * which are not covered by the current Git LFS configuration.
59
+ *
60
+ * @param repository
61
+ * @param filePaths List of relative paths in the repository
62
+ */
63
+ export async function filesNotTrackedByLFS(repository, filePaths) {
64
+ const filesNotTrackedByGitLFS = new Array();
65
+ for (const file of filePaths) {
66
+ const isTracked = await isTrackedByLFS(repository, file);
67
+ if (!isTracked) {
68
+ filesNotTrackedByGitLFS.push(file);
69
+ }
70
+ }
71
+ return filesNotTrackedByGitLFS;
72
+ }
73
+ //# sourceMappingURL=lfs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lfs.js","sourceRoot":"","sources":["../../src/git/lfs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAA;AAG/B,sCAAsC;AACtC,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,KAAc;IAC1D,MAAM,IAAI,GAAG,CAAC,KAAK,EAAE,SAAS,EAAE,aAAa,CAAC,C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iCAAiC;IAEjC,MAAM,cAAc,GAAG,eAAe,CAAA;IAEtC,MAAM,KAAK,GAAG,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAEzC,OAAO,KAAK,KAAK,IAAI,CAAA;AACvB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,UAAsB,EACtB,SAAgC;IAEhC,MAAM,uBAAuB,GAAG,IAAI,KAAK,EAAU,CAAA;IAEnD,KAAK,MAAM,IAAI,IAAI,SAAS,EAAE,CAAC;QAC7B,MAAM,SAAS,GAAG,MAAM,cAAc,CAAC,UAAU,EAAE,IAAI,CAAC,CAAA;QAExD,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,uBAAuB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACpC,CAAC;IACH,CAAC;IAED,OAAO,uBAAuB,CAAA;AAChC,CAAC"}
@@ -0,0 +1,56 @@
1
+ import { CommittedFileChange } from '../models/status.js';
2
+ import { Repository } from '../models/repository.js';
3
+ import { Commit } from '../models/commit.js';
4
+ import { CommitIdentity } from '../models/commit-identity.js';
5
+ /**
6
+ * Get the repository's commits using `revisionRange` and limited to `limit`
7
+ */
8
+ export declare function getCommits(repository: Repository, revisionRange?: string, limit?: number, skip?: number, additionalArgs?: ReadonlyArray<string>): Promise<ReadonlyArray<Commit>>;
9
+ /** This interface contains information of a changeset. */
10
+ export interface IChangesetData {
11
+ /** Files changed in the changeset. */
12
+ readonly files: ReadonlyArray<CommittedFileChange>;
13
+ /** Number of lines added in the changeset. */
14
+ readonly linesAdded: number;
15
+ /** Number of lines deleted in the changeset. */
16
+ readonly linesDeleted: number;
17
+ }
18
+ /** Get the files that were changed in the given commit. */
19
+ export declare function getChangedFiles(repository: Repository, sha: string): Promise<IChangesetData>;
20
+ /**
21
+ * Parses output of diff flags -z --raw --numstat.
22
+ *
23
+ * Given the -z flag the new lines are separated by \0 character (left them as
24
+ * new lines below for ease of reading)
25
+ *
26
+ * For modified, added, deleted, untracked:
27
+ * 100644 100644 5716ca5 db3c77d M
28
+ * file_one_path
29
+ * :100644 100644 0835e4f 28096ea M
30
+ * file_two_path
31
+ * 1 0 file_one_path
32
+ * 1 0 file_two_path
33
+ *
34
+ * For copied or renamed:
35
+ * 100644 100644 5716ca5 db3c77d M
36
+ * file_one_original_path
37
+ * file_one_new_path
38
+ * :100644 100644 0835e4f 28096ea M
39
+ * file_two_original_path
40
+ * file_two_new_path
41
+ * 1 0
42
+ * file_one_original_path
43
+ * file_one_new_path
44
+ * 1 0
45
+ * file_two_original_path
46
+ * file_two_new_path
47
+ */
48
+ export declare function parseRawLogWithNumstat(stdout: string, sha: string, parentCommitish: string): {
49
+ files: CommittedFileChange[];
50
+ linesAdded: number;
51
+ linesDeleted: number;
52
+ };
53
+ /** Get the commit for the given ref. */
54
+ export declare function getCommit(repository: Repository, ref: string): Promise<Commit | null>;
55
+ /** Get the author identity for the given shas */
56
+ export declare function getAuthors(repository: Repository, shas: string[]): Promise<CommitIdentity[]>;