@moberg_hr/work-tree 2.9.2 → 2.9.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 (219) hide show
  1. package/dist/{account-3A7RQSUC.js → account-NG75VLRU.js} +14 -14
  2. package/dist/{add-repo-YGDJZ6HG.js → add-repo-EDU3QEYI.js} +9 -9
  3. package/dist/{answer-GHVFFKNF.js → answer-MHOJ2J6S.js} +7 -7
  4. package/dist/{attach-LWOZKLTF.js → attach-37JOJ4C3.js} +12 -12
  5. package/dist/bin.js +3 -3
  6. package/dist/{block-WVUT63QY.js → block-D5CAR53T.js} +8 -8
  7. package/dist/{broadcast-WM423JGR.js → broadcast-LLYHUWXA.js} +5 -5
  8. package/dist/{catchup-KJZTLHN7.js → catchup-2SL3JGA7.js} +10 -10
  9. package/dist/{chunk-SWKTDMLL.js → chunk-26OVU2AE.js} +4 -4
  10. package/dist/{chunk-PDWEPIL6.js → chunk-2JNW2AQ2.js} +2 -1
  11. package/dist/chunk-2JNW2AQ2.js.map +1 -0
  12. package/dist/{chunk-SBLK524A.js → chunk-37XQIG7F.js} +63 -97
  13. package/dist/chunk-37XQIG7F.js.map +1 -0
  14. package/dist/{chunk-Z2XY3PLX.js → chunk-3C3BKZ3H.js} +3 -3
  15. package/dist/{chunk-UB3DOOPB.js → chunk-63VY4YJM.js} +4 -4
  16. package/dist/{chunk-5NKXGQX4.js → chunk-6E2I2FBJ.js} +10 -10
  17. package/dist/{chunk-F4EWBHTA.js → chunk-6FVYSW3E.js} +2 -2
  18. package/dist/{chunk-BNGX2JGD.js → chunk-72IBYKIY.js} +2 -2
  19. package/dist/{chunk-4SZ7YW7N.js → chunk-7OUIZ2YQ.js} +53 -53
  20. package/dist/{chunk-3NXRBRRJ.js → chunk-AAYWHIIT.js} +11 -4
  21. package/dist/chunk-AAYWHIIT.js.map +1 -0
  22. package/dist/{chunk-4BZGUMP7.js → chunk-ATED7SAH.js} +3 -3
  23. package/dist/{chunk-JWWG624P.js → chunk-BSP2Z7B7.js} +2 -2
  24. package/dist/{chunk-VUNJVF6C.js → chunk-CCTALU3C.js} +2 -2
  25. package/dist/{chunk-5WEBLABB.js → chunk-CLBQ7ZC4.js} +2 -2
  26. package/dist/{chunk-6IUFNTBQ.js → chunk-CMO5YUZR.js} +2 -2
  27. package/dist/{chunk-GJ5V357G.js → chunk-CYWI3ZW7.js} +4 -4
  28. package/dist/{chunk-VGRZKBUK.js → chunk-DQCUYCMX.js} +2 -2
  29. package/dist/{chunk-TR7CTHJA.js → chunk-GRLKPVTP.js} +11 -8
  30. package/dist/chunk-GRLKPVTP.js.map +1 -0
  31. package/dist/{chunk-LIE5GVDG.js → chunk-HCVONKJI.js} +6 -6
  32. package/dist/{chunk-V4IHZJD4.js → chunk-HEPBANFJ.js} +5 -5
  33. package/dist/{chunk-AGTVDF4O.js → chunk-INQQGV2G.js} +3 -3
  34. package/dist/{chunk-AQJSY4CI.js → chunk-IPGH7TXJ.js} +2 -2
  35. package/dist/{chunk-JB6LU6JV.js → chunk-IWJXFNM4.js} +6 -6
  36. package/dist/{chunk-JFN67PRA.js → chunk-KSUOVFO3.js} +2 -2
  37. package/dist/{chunk-7NSQVIIK.js → chunk-MG5TTLYZ.js} +2 -2
  38. package/dist/chunk-NWIVXGSL.js +9 -0
  39. package/dist/{chunk-K2MOQVTJ.js → chunk-OTAZOIXK.js} +2 -2
  40. package/dist/{chunk-TQOHPNDW.js → chunk-P6BHOAQG.js} +2 -2
  41. package/dist/{chunk-BWD24JIP.js → chunk-PRDRRU2B.js} +4 -4
  42. package/dist/{chunk-H7GHJ3CR.js → chunk-PTWVOT7A.js} +5 -5
  43. package/dist/{chunk-XMWVBLMJ.js → chunk-QEVYCCKD.js} +2 -2
  44. package/dist/{chunk-2YXY6S7G.js → chunk-QHTXLCG7.js} +7 -7
  45. package/dist/{chunk-BV2PPIKP.js → chunk-QL36KN7X.js} +3 -3
  46. package/dist/{chunk-HP2QVRSQ.js → chunk-QSOEMCWQ.js} +6 -6
  47. package/dist/{chunk-YHSB7IVZ.js → chunk-RFINYWID.js} +3 -3
  48. package/dist/{chunk-XEAFWIN6.js → chunk-S3FMTEFR.js} +4 -4
  49. package/dist/{chunk-KVQNJCXH.js → chunk-T7AFYEQ7.js} +4 -4
  50. package/dist/{chunk-JT5AR7PO.js → chunk-TPSFJSO7.js} +72 -3
  51. package/dist/chunk-TPSFJSO7.js.map +1 -0
  52. package/dist/{chunk-MPY2ZQBL.js → chunk-VUAVPBFR.js} +4 -4
  53. package/dist/{chunk-GBMY7IMP.js → chunk-WC534PXU.js} +4 -4
  54. package/dist/{chunk-XTDTM6JI.js → chunk-WTQ2QCAG.js} +3 -3
  55. package/dist/{chunk-ZGT4ZDGG.js → chunk-WXE7D44E.js} +3 -3
  56. package/dist/{chunk-PKXHK5CJ.js → chunk-WXMWZRBH.js} +2 -2
  57. package/dist/{chunk-RG7NJEN7.js → chunk-XVNRP7XE.js} +6 -6
  58. package/dist/{chunk-2Z2O5LEA.js → chunk-ZI2KXTKM.js} +2 -2
  59. package/dist/{cleanup-7E3YWQUC.js → cleanup-5PSLKZLF.js} +20 -20
  60. package/dist/{cli-BHIBPUQG.js → cli-AF7636FA.js} +4 -4
  61. package/dist/{config-TUJNIUIO.js → config-6MSITKGB.js} +7 -7
  62. package/dist/{diff-PZKOXAU3.js → diff-Q7MV6YGJ.js} +8 -8
  63. package/dist/{digest-XHDDBXA6.js → digest-KUMVYXKZ.js} +7 -7
  64. package/dist/{fork-HYWZW72R.js → fork-OFENISEM.js} +18 -18
  65. package/dist/{history-MRRY2VTS.js → history-5WKRWARZ.js} +5 -5
  66. package/dist/{hook-OWP4H2MT.js → hook-ARS32DG2.js} +9 -9
  67. package/dist/{hydrate-ZTGARW3U.js → hydrate-LCT6DVB3.js} +5 -5
  68. package/dist/{init-7VISW3JJ.js → init-FJKPEY5N.js} +6 -6
  69. package/dist/{install-skills-IIMTRQ4K.js → install-skills-UYAFVJBA.js} +5 -5
  70. package/dist/install-skills-bin.js +4 -4
  71. package/dist/{list-5XWYT37A.js → list-GTKP5FAW.js} +5 -5
  72. package/dist/{move-PSAODKRK.js → move-GOCLEFGZ.js} +8 -8
  73. package/dist/{note-7WQ2YC2F.js → note-B7TQBXQF.js} +7 -7
  74. package/dist/{overlaps-R27DEX36.js → overlaps-UKQHIJMU.js} +7 -7
  75. package/dist/{pin-LS4WPLOE.js → pin-UZZCDK7M.js} +7 -7
  76. package/dist/{pr-SMEC5O7O.js → pr-NU2ME2XW.js} +8 -8
  77. package/dist/{prune-VA3V5B2I.js → prune-IZGEYTSB.js} +18 -18
  78. package/dist/{pty-host-PN4A3X2Y.js → pty-host-AWDIKPQN.js} +46 -42
  79. package/dist/pty-host-AWDIKPQN.js.map +1 -0
  80. package/dist/{read-75DP75TI.js → read-U6GBGA5E.js} +7 -7
  81. package/dist/{recent-YDSLMD6Y.js → recent-2DUMLUDG.js} +6 -6
  82. package/dist/{remove-XPSU2VTR.js → remove-OXUP4O33.js} +17 -17
  83. package/dist/{restart-7EPW5VDV.js → restart-QEW4DJC3.js} +7 -7
  84. package/dist/{resume-26Y6G4UT.js → resume-K45IT4QO.js} +6 -6
  85. package/dist/{run-IIURYUD2.js → run-42LORGPS.js} +5 -5
  86. package/dist/{screen-AORRCOZQ.js → screen-2TLIUH3G.js} +7 -7
  87. package/dist/{search-Z3XD7ZNQ.js → search-7E4B2KX6.js} +5 -5
  88. package/dist/{section-6N7J4Y6J.js → section-OVA5VD7L.js} +7 -7
  89. package/dist/{send-SHHXHICL.js → send-BJY5CYLO.js} +8 -8
  90. package/dist/{sessions-AD5HPY2L.js → sessions-4A24ZORW.js} +15 -15
  91. package/dist/{snooze-JZMIVMNS.js → snooze-WIVKB3GH.js} +7 -7
  92. package/dist/{start-6VNWRLPK.js → start-G6GR533S.js} +7 -7
  93. package/dist/{state-OZF4S7PG.js → state-S3DGLT4J.js} +2 -2
  94. package/dist/{status-YRBJR4YB.js → status-BTAWY6JQ.js} +5 -5
  95. package/dist/{statusline-RSQMMCRN.js → statusline-WLXEU5DM.js} +3 -3
  96. package/dist/{stop-A2Q4CO6Z.js → stop-FN6EPFJ4.js} +7 -7
  97. package/dist/{sync-GXXBOQ4W.js → sync-T3BSHX6Q.js} +18 -18
  98. package/dist/{time-XKEMSDMN.js → time-5CH5O5MZ.js} +8 -8
  99. package/dist/{time-actions-DB7OQ2IS.js → time-actions-XEUQ3UF7.js} +3 -3
  100. package/dist/{timesheet-ZAZXN6LK.js → timesheet-FMQKPS5S.js} +10 -10
  101. package/dist/{todo-ODF7RI27.js → todo-23COLGR2.js} +2 -2
  102. package/dist/{tree-HJGFWO6G.js → tree-T33VU473.js} +14 -14
  103. package/dist/{update-6427PE7F.js → update-PJRSKQZ2.js} +9 -9
  104. package/dist/{usage-HIXH42ZH.js → usage-TL66LWO4.js} +7 -7
  105. package/dist/{wait-VHPP2B7P.js → wait-YIEJO6YM.js} +8 -8
  106. package/dist/wd-bin.js +3 -3
  107. package/dist/web/assets/PtyView-DnDd6jLI.js +96 -0
  108. package/dist/web/assets/PtyView-DnDd6jLI.js.map +1 -0
  109. package/dist/web/assets/index-DxozAoUO.css +1 -0
  110. package/dist/web/assets/{index-C4cR3Hwy.js → index-InmdAx6g.js} +51 -51
  111. package/dist/web/assets/index-InmdAx6g.js.map +1 -0
  112. package/dist/web/index.html +2 -2
  113. package/dist/{web-QTXU66K5.js → web-IYUNJMQD.js} +204 -90
  114. package/dist/web-IYUNJMQD.js.map +1 -0
  115. package/npm-shrinkwrap.json +2 -2
  116. package/package.json +1 -1
  117. package/dist/chunk-3NXRBRRJ.js.map +0 -1
  118. package/dist/chunk-4MVT7QPZ.js +0 -9
  119. package/dist/chunk-JT5AR7PO.js.map +0 -1
  120. package/dist/chunk-PDWEPIL6.js.map +0 -1
  121. package/dist/chunk-SBLK524A.js.map +0 -1
  122. package/dist/chunk-TR7CTHJA.js.map +0 -1
  123. package/dist/pty-host-PN4A3X2Y.js.map +0 -1
  124. package/dist/web/assets/PtyView-B7zFUh_M.js +0 -96
  125. package/dist/web/assets/PtyView-B7zFUh_M.js.map +0 -1
  126. package/dist/web/assets/index-BAxeogV4.css +0 -1
  127. package/dist/web/assets/index-C4cR3Hwy.js.map +0 -1
  128. package/dist/web-QTXU66K5.js.map +0 -1
  129. /package/dist/{account-3A7RQSUC.js.map → account-NG75VLRU.js.map} +0 -0
  130. /package/dist/{add-repo-YGDJZ6HG.js.map → add-repo-EDU3QEYI.js.map} +0 -0
  131. /package/dist/{answer-GHVFFKNF.js.map → answer-MHOJ2J6S.js.map} +0 -0
  132. /package/dist/{attach-LWOZKLTF.js.map → attach-37JOJ4C3.js.map} +0 -0
  133. /package/dist/{block-WVUT63QY.js.map → block-D5CAR53T.js.map} +0 -0
  134. /package/dist/{broadcast-WM423JGR.js.map → broadcast-LLYHUWXA.js.map} +0 -0
  135. /package/dist/{catchup-KJZTLHN7.js.map → catchup-2SL3JGA7.js.map} +0 -0
  136. /package/dist/{chunk-SWKTDMLL.js.map → chunk-26OVU2AE.js.map} +0 -0
  137. /package/dist/{chunk-Z2XY3PLX.js.map → chunk-3C3BKZ3H.js.map} +0 -0
  138. /package/dist/{chunk-UB3DOOPB.js.map → chunk-63VY4YJM.js.map} +0 -0
  139. /package/dist/{chunk-5NKXGQX4.js.map → chunk-6E2I2FBJ.js.map} +0 -0
  140. /package/dist/{chunk-F4EWBHTA.js.map → chunk-6FVYSW3E.js.map} +0 -0
  141. /package/dist/{chunk-BNGX2JGD.js.map → chunk-72IBYKIY.js.map} +0 -0
  142. /package/dist/{chunk-4SZ7YW7N.js.map → chunk-7OUIZ2YQ.js.map} +0 -0
  143. /package/dist/{chunk-4BZGUMP7.js.map → chunk-ATED7SAH.js.map} +0 -0
  144. /package/dist/{chunk-JWWG624P.js.map → chunk-BSP2Z7B7.js.map} +0 -0
  145. /package/dist/{chunk-VUNJVF6C.js.map → chunk-CCTALU3C.js.map} +0 -0
  146. /package/dist/{chunk-5WEBLABB.js.map → chunk-CLBQ7ZC4.js.map} +0 -0
  147. /package/dist/{chunk-6IUFNTBQ.js.map → chunk-CMO5YUZR.js.map} +0 -0
  148. /package/dist/{chunk-GJ5V357G.js.map → chunk-CYWI3ZW7.js.map} +0 -0
  149. /package/dist/{chunk-VGRZKBUK.js.map → chunk-DQCUYCMX.js.map} +0 -0
  150. /package/dist/{chunk-LIE5GVDG.js.map → chunk-HCVONKJI.js.map} +0 -0
  151. /package/dist/{chunk-V4IHZJD4.js.map → chunk-HEPBANFJ.js.map} +0 -0
  152. /package/dist/{chunk-AGTVDF4O.js.map → chunk-INQQGV2G.js.map} +0 -0
  153. /package/dist/{chunk-AQJSY4CI.js.map → chunk-IPGH7TXJ.js.map} +0 -0
  154. /package/dist/{chunk-JB6LU6JV.js.map → chunk-IWJXFNM4.js.map} +0 -0
  155. /package/dist/{chunk-JFN67PRA.js.map → chunk-KSUOVFO3.js.map} +0 -0
  156. /package/dist/{chunk-7NSQVIIK.js.map → chunk-MG5TTLYZ.js.map} +0 -0
  157. /package/dist/{chunk-4MVT7QPZ.js.map → chunk-NWIVXGSL.js.map} +0 -0
  158. /package/dist/{chunk-K2MOQVTJ.js.map → chunk-OTAZOIXK.js.map} +0 -0
  159. /package/dist/{chunk-TQOHPNDW.js.map → chunk-P6BHOAQG.js.map} +0 -0
  160. /package/dist/{chunk-BWD24JIP.js.map → chunk-PRDRRU2B.js.map} +0 -0
  161. /package/dist/{chunk-H7GHJ3CR.js.map → chunk-PTWVOT7A.js.map} +0 -0
  162. /package/dist/{chunk-XMWVBLMJ.js.map → chunk-QEVYCCKD.js.map} +0 -0
  163. /package/dist/{chunk-2YXY6S7G.js.map → chunk-QHTXLCG7.js.map} +0 -0
  164. /package/dist/{chunk-BV2PPIKP.js.map → chunk-QL36KN7X.js.map} +0 -0
  165. /package/dist/{chunk-HP2QVRSQ.js.map → chunk-QSOEMCWQ.js.map} +0 -0
  166. /package/dist/{chunk-YHSB7IVZ.js.map → chunk-RFINYWID.js.map} +0 -0
  167. /package/dist/{chunk-XEAFWIN6.js.map → chunk-S3FMTEFR.js.map} +0 -0
  168. /package/dist/{chunk-KVQNJCXH.js.map → chunk-T7AFYEQ7.js.map} +0 -0
  169. /package/dist/{chunk-MPY2ZQBL.js.map → chunk-VUAVPBFR.js.map} +0 -0
  170. /package/dist/{chunk-GBMY7IMP.js.map → chunk-WC534PXU.js.map} +0 -0
  171. /package/dist/{chunk-XTDTM6JI.js.map → chunk-WTQ2QCAG.js.map} +0 -0
  172. /package/dist/{chunk-ZGT4ZDGG.js.map → chunk-WXE7D44E.js.map} +0 -0
  173. /package/dist/{chunk-PKXHK5CJ.js.map → chunk-WXMWZRBH.js.map} +0 -0
  174. /package/dist/{chunk-RG7NJEN7.js.map → chunk-XVNRP7XE.js.map} +0 -0
  175. /package/dist/{chunk-2Z2O5LEA.js.map → chunk-ZI2KXTKM.js.map} +0 -0
  176. /package/dist/{cleanup-7E3YWQUC.js.map → cleanup-5PSLKZLF.js.map} +0 -0
  177. /package/dist/{cli-BHIBPUQG.js.map → cli-AF7636FA.js.map} +0 -0
  178. /package/dist/{config-TUJNIUIO.js.map → config-6MSITKGB.js.map} +0 -0
  179. /package/dist/{diff-PZKOXAU3.js.map → diff-Q7MV6YGJ.js.map} +0 -0
  180. /package/dist/{digest-XHDDBXA6.js.map → digest-KUMVYXKZ.js.map} +0 -0
  181. /package/dist/{fork-HYWZW72R.js.map → fork-OFENISEM.js.map} +0 -0
  182. /package/dist/{history-MRRY2VTS.js.map → history-5WKRWARZ.js.map} +0 -0
  183. /package/dist/{hook-OWP4H2MT.js.map → hook-ARS32DG2.js.map} +0 -0
  184. /package/dist/{hydrate-ZTGARW3U.js.map → hydrate-LCT6DVB3.js.map} +0 -0
  185. /package/dist/{init-7VISW3JJ.js.map → init-FJKPEY5N.js.map} +0 -0
  186. /package/dist/{install-skills-IIMTRQ4K.js.map → install-skills-UYAFVJBA.js.map} +0 -0
  187. /package/dist/{list-5XWYT37A.js.map → list-GTKP5FAW.js.map} +0 -0
  188. /package/dist/{move-PSAODKRK.js.map → move-GOCLEFGZ.js.map} +0 -0
  189. /package/dist/{note-7WQ2YC2F.js.map → note-B7TQBXQF.js.map} +0 -0
  190. /package/dist/{overlaps-R27DEX36.js.map → overlaps-UKQHIJMU.js.map} +0 -0
  191. /package/dist/{pin-LS4WPLOE.js.map → pin-UZZCDK7M.js.map} +0 -0
  192. /package/dist/{pr-SMEC5O7O.js.map → pr-NU2ME2XW.js.map} +0 -0
  193. /package/dist/{prune-VA3V5B2I.js.map → prune-IZGEYTSB.js.map} +0 -0
  194. /package/dist/{read-75DP75TI.js.map → read-U6GBGA5E.js.map} +0 -0
  195. /package/dist/{recent-YDSLMD6Y.js.map → recent-2DUMLUDG.js.map} +0 -0
  196. /package/dist/{remove-XPSU2VTR.js.map → remove-OXUP4O33.js.map} +0 -0
  197. /package/dist/{restart-7EPW5VDV.js.map → restart-QEW4DJC3.js.map} +0 -0
  198. /package/dist/{resume-26Y6G4UT.js.map → resume-K45IT4QO.js.map} +0 -0
  199. /package/dist/{run-IIURYUD2.js.map → run-42LORGPS.js.map} +0 -0
  200. /package/dist/{screen-AORRCOZQ.js.map → screen-2TLIUH3G.js.map} +0 -0
  201. /package/dist/{search-Z3XD7ZNQ.js.map → search-7E4B2KX6.js.map} +0 -0
  202. /package/dist/{section-6N7J4Y6J.js.map → section-OVA5VD7L.js.map} +0 -0
  203. /package/dist/{send-SHHXHICL.js.map → send-BJY5CYLO.js.map} +0 -0
  204. /package/dist/{sessions-AD5HPY2L.js.map → sessions-4A24ZORW.js.map} +0 -0
  205. /package/dist/{snooze-JZMIVMNS.js.map → snooze-WIVKB3GH.js.map} +0 -0
  206. /package/dist/{start-6VNWRLPK.js.map → start-G6GR533S.js.map} +0 -0
  207. /package/dist/{state-OZF4S7PG.js.map → state-S3DGLT4J.js.map} +0 -0
  208. /package/dist/{status-YRBJR4YB.js.map → status-BTAWY6JQ.js.map} +0 -0
  209. /package/dist/{statusline-RSQMMCRN.js.map → statusline-WLXEU5DM.js.map} +0 -0
  210. /package/dist/{stop-A2Q4CO6Z.js.map → stop-FN6EPFJ4.js.map} +0 -0
  211. /package/dist/{sync-GXXBOQ4W.js.map → sync-T3BSHX6Q.js.map} +0 -0
  212. /package/dist/{time-XKEMSDMN.js.map → time-5CH5O5MZ.js.map} +0 -0
  213. /package/dist/{time-actions-DB7OQ2IS.js.map → time-actions-XEUQ3UF7.js.map} +0 -0
  214. /package/dist/{timesheet-ZAZXN6LK.js.map → timesheet-FMQKPS5S.js.map} +0 -0
  215. /package/dist/{todo-ODF7RI27.js.map → todo-23COLGR2.js.map} +0 -0
  216. /package/dist/{tree-HJGFWO6G.js.map → tree-T33VU473.js.map} +0 -0
  217. /package/dist/{update-6427PE7F.js.map → update-PJRSKQZ2.js.map} +0 -0
  218. /package/dist/{usage-HIXH42ZH.js.map → usage-TL66LWO4.js.map} +0 -0
  219. /package/dist/{wait-VHPP2B7P.js.map → wait-YIEJO6YM.js.map} +0 -0
@@ -14,10 +14,10 @@ import {
14
14
  agentOf,
15
15
  agentToRecord,
16
16
  readJsonlTail
17
- } from "./chunk-MPY2ZQBL.js";
17
+ } from "./chunk-VUAVPBFR.js";
18
18
  import {
19
19
  loadConfig
20
- } from "./chunk-PDWEPIL6.js";
20
+ } from "./chunk-2JNW2AQ2.js";
21
21
  import {
22
22
  bootTime,
23
23
  isPidAlive,
@@ -1677,6 +1677,18 @@ function loadManifest(scopeHash) {
1677
1677
  return emptyManifest(scopeHash);
1678
1678
  }
1679
1679
  }
1680
+ async function treeOfAsync(root, rev) {
1681
+ if (!rev) return null;
1682
+ const r = await runGitAsync(root, { args: ["rev-parse", `${rev}^{tree}`] });
1683
+ return r.status === 0 ? r.stdout.trim() || null : null;
1684
+ }
1685
+ async function sameTrees(repos, a, b) {
1686
+ for (const repo of repos) {
1687
+ const cur = await treeOfAsync(repo.root, a(repo));
1688
+ if (cur === null || cur !== await treeOfAsync(repo.root, b(repo))) return false;
1689
+ }
1690
+ return true;
1691
+ }
1680
1692
  async function snapshotRepo(repoRoot, scopeHash, id, includeWorkingTree = true) {
1681
1693
  const tree = await writeTempTreeAsync(repoRoot, { includeWorkingTree });
1682
1694
  if (!tree) return null;
@@ -1711,35 +1723,23 @@ async function takeCheckpoint(scopeHash, repos, opts = {}) {
1711
1723
  for (const repo of repos) {
1712
1724
  captured[repo.name] = await snapshotRepo(repo.root, scopeHash, nextId, !isFirst);
1713
1725
  }
1714
- const rollbackRefs = () => {
1726
+ const rollbackRefs = async () => {
1715
1727
  const refName = `refs/wd/${scopeHash}/${nextId}`;
1716
- for (const repo of repos) {
1717
- spawn_default.sync("git", ["update-ref", "-d", refName], {
1718
- cwd: repo.root,
1719
- encoding: "utf-8",
1720
- windowsHide: true
1721
- });
1722
- }
1728
+ for (const repo of repos) await runGitAsync(repo.root, { args: ["update-ref", "-d", refName] });
1723
1729
  };
1724
1730
  if (repos.some((r) => captured[r.name] === null)) {
1725
- rollbackRefs();
1731
+ await rollbackRefs();
1726
1732
  return null;
1727
1733
  }
1728
1734
  if (!opts.force && !isFirst) {
1729
1735
  const prev = manifest.entries[manifest.entries.length - 1];
1730
- const treeOf = (root, commitSha) => {
1731
- if (!commitSha) return null;
1732
- const r = spawn_default.sync("git", ["rev-parse", `${commitSha}^{tree}`], { cwd: root, encoding: "utf-8", windowsHide: true });
1733
- if (r.status !== 0 || typeof r.stdout !== "string") return null;
1734
- return r.stdout.trim() || null;
1735
- };
1736
- const allTreesMatch = repos.every((repo) => {
1737
- const curTree = treeOf(repo.root, captured[repo.name]);
1738
- const prevTree = treeOf(repo.root, prev.repos[repo.name] ?? null);
1739
- return curTree !== null && curTree === prevTree;
1740
- });
1736
+ const allTreesMatch = await sameTrees(
1737
+ repos,
1738
+ (r) => captured[r.name],
1739
+ (r) => prev.repos[r.name] ?? null
1740
+ );
1741
1741
  if (allTreesMatch) {
1742
- rollbackRefs();
1742
+ await rollbackRefs();
1743
1743
  return null;
1744
1744
  }
1745
1745
  }
@@ -1776,22 +1776,10 @@ async function updateCheckpoint(scopeHash, repos, id) {
1776
1776
  const entry = manifest.entries.find((e) => e.id === id);
1777
1777
  if (!entry) return { status: "missing" };
1778
1778
  const refName = `refs/wd/${scopeHash}/${id}`;
1779
- const restoreRefs = () => {
1779
+ const restoreRefs = async () => {
1780
1780
  for (const repo of repos) {
1781
1781
  const old = entry.repos[repo.name] ?? null;
1782
- if (old) {
1783
- spawn_default.sync("git", ["update-ref", refName, old], {
1784
- cwd: repo.root,
1785
- encoding: "utf-8",
1786
- windowsHide: true
1787
- });
1788
- } else {
1789
- spawn_default.sync("git", ["update-ref", "-d", refName], {
1790
- cwd: repo.root,
1791
- encoding: "utf-8",
1792
- windowsHide: true
1793
- });
1794
- }
1782
+ await runGitAsync(repo.root, { args: old ? ["update-ref", refName, old] : ["update-ref", "-d", refName] });
1795
1783
  }
1796
1784
  };
1797
1785
  const captured = {};
@@ -1799,26 +1787,16 @@ async function updateCheckpoint(scopeHash, repos, id) {
1799
1787
  captured[repo.name] = await snapshotRepo(repo.root, scopeHash, id, true);
1800
1788
  }
1801
1789
  if (repos.some((r) => captured[r.name] === null)) {
1802
- restoreRefs();
1790
+ await restoreRefs();
1803
1791
  return { status: "missing" };
1804
1792
  }
1805
- const treeOf = (root, commitSha) => {
1806
- if (!commitSha) return null;
1807
- const r = spawn_default.sync("git", ["rev-parse", `${commitSha}^{tree}`], {
1808
- cwd: root,
1809
- encoding: "utf-8",
1810
- windowsHide: true
1811
- });
1812
- if (r.status !== 0 || typeof r.stdout !== "string") return null;
1813
- return r.stdout.trim() || null;
1814
- };
1815
- const unchanged = repos.every((repo) => {
1816
- const curTree = treeOf(repo.root, captured[repo.name]);
1817
- const prevTree = treeOf(repo.root, entry.repos[repo.name] ?? null);
1818
- return curTree !== null && curTree === prevTree;
1819
- });
1793
+ const unchanged = await sameTrees(
1794
+ repos,
1795
+ (r) => captured[r.name],
1796
+ (r) => entry.repos[r.name] ?? null
1797
+ );
1820
1798
  if (unchanged) {
1821
- restoreRefs();
1799
+ await restoreRefs();
1822
1800
  return { status: "unchanged" };
1823
1801
  }
1824
1802
  entry.repos = captured;
@@ -1837,21 +1815,15 @@ async function resetBaseline(scopeHash, repos) {
1837
1815
  for (const repo of repos) {
1838
1816
  captured[repo.name] = await snapshotRepo(repo.root, scopeHash, 0, false);
1839
1817
  }
1840
- const delRef = (id) => {
1841
- for (const repo of repos) {
1842
- spawn_default.sync("git", ["update-ref", "-d", `refs/wd/${scopeHash}/${id}`], {
1843
- cwd: repo.root,
1844
- encoding: "utf-8",
1845
- windowsHide: true
1846
- });
1847
- }
1818
+ const delRef = async (id) => {
1819
+ for (const repo of repos) await runGitAsync(repo.root, { args: ["update-ref", "-d", `refs/wd/${scopeHash}/${id}`] });
1848
1820
  };
1849
1821
  if (repos.some((r) => captured[r.name] === null)) {
1850
- delRef(0);
1822
+ await delRef(0);
1851
1823
  return null;
1852
1824
  }
1853
1825
  for (const id of prevIds) {
1854
- if (id !== 0) delRef(id);
1826
+ if (id !== 0) await delRef(id);
1855
1827
  }
1856
1828
  const entry = {
1857
1829
  id: 0,
@@ -1879,56 +1851,50 @@ async function setCheckpointLabel(scopeHash, id, label) {
1879
1851
  atomicWriteFile(file, JSON.stringify(manifest, null, 2));
1880
1852
  });
1881
1853
  }
1882
- function headAdvancedSinceInitial(scopeHash, repos) {
1854
+ async function headAdvancedSinceInitial(scopeHash, repos) {
1883
1855
  const manifest = loadManifest(scopeHash);
1884
1856
  const initial = manifest.entries.find((e) => e.id === 0);
1885
1857
  if (!initial) return false;
1886
- const treeOf = (root, rev) => {
1887
- const r = spawn_default.sync("git", ["rev-parse", `${rev}^{tree}`], {
1888
- cwd: root,
1889
- encoding: "utf-8",
1890
- windowsHide: true
1891
- });
1892
- if (r.status !== 0 || typeof r.stdout !== "string") return null;
1893
- return r.stdout.trim() || null;
1894
- };
1895
- return repos.some((repo) => {
1896
- const headTree = treeOf(repo.root, "HEAD");
1897
- if (headTree === null) return false;
1858
+ for (const repo of repos) {
1859
+ const headTree = await treeOfAsync(repo.root, "HEAD");
1860
+ if (headTree === null) continue;
1898
1861
  const baselineSha = initial.repos[repo.name];
1899
1862
  if (!baselineSha) return true;
1900
- const baselineTree = treeOf(repo.root, baselineSha);
1901
- if (baselineTree === null) return false;
1902
- return baselineTree !== headTree;
1903
- });
1863
+ const baselineTree = await treeOfAsync(repo.root, baselineSha);
1864
+ if (baselineTree === null) continue;
1865
+ if (baselineTree !== headTree) return true;
1866
+ }
1867
+ return false;
1904
1868
  }
1905
- function headBroughtInOtherWork(scopeHash, repos) {
1869
+ async function headBroughtInOtherWork(scopeHash, repos) {
1906
1870
  const entries = loadManifest(scopeHash).entries;
1907
1871
  if (entries.length === 0) return false;
1908
1872
  const newest = entries.reduce((a, b) => b.id > a.id ? b : a);
1909
- const run = (root, args) => {
1910
- const r = spawn_default.sync("git", args, { cwd: root, encoding: "utf-8", windowsHide: true });
1911
- return { ok: r.status === 0, out: typeof r.stdout === "string" ? r.stdout.trim() : "" };
1873
+ const run = async (root, args) => {
1874
+ const r = await runGitAsync(root, { args });
1875
+ return { ok: r.status === 0, out: r.stdout.trim() };
1912
1876
  };
1913
- const count = (root, args) => {
1914
- const r = run(root, ["rev-list", "--count", ...args]);
1877
+ const count = async (root, args) => {
1878
+ const r = await run(root, ["rev-list", "--count", ...args]);
1915
1879
  return r.ok && /^\d+$/.test(r.out) ? Number(r.out) : null;
1916
1880
  };
1917
- return repos.some((repo) => {
1881
+ const broughtIn = async (repo) => {
1918
1882
  const snap = newest.repos[repo.name];
1919
1883
  if (!snap) return false;
1920
- const was = run(repo.root, ["rev-parse", "--verify", "--quiet", `${snap}^`]);
1921
- const now = run(repo.root, ["rev-parse", "--verify", "--quiet", "HEAD"]);
1884
+ const was = await run(repo.root, ["rev-parse", "--verify", "--quiet", `${snap}^`]);
1885
+ const now = await run(repo.root, ["rev-parse", "--verify", "--quiet", "HEAD"]);
1922
1886
  if (!was.ok || !now.ok || !was.out || was.out === now.out) return false;
1923
- if (!run(repo.root, ["merge-base", "--is-ancestor", was.out, now.out]).ok) return true;
1887
+ if (!(await run(repo.root, ["merge-base", "--is-ancestor", was.out, now.out])).ok) return true;
1924
1888
  const range = `${was.out}..${now.out}`;
1925
- if ((count(repo.root, ["--merges", range]) ?? 0) > 0) return true;
1926
- const main = run(repo.root, ["rev-parse", "--verify", "--quiet", "origin/HEAD"]);
1889
+ if ((await count(repo.root, ["--merges", range]) ?? 0) > 0) return true;
1890
+ const main = await run(repo.root, ["rev-parse", "--verify", "--quiet", "origin/HEAD"]);
1927
1891
  if (!main.ok) return false;
1928
- const all = count(repo.root, [range]);
1929
- const own = count(repo.root, [range, "^origin/HEAD"]);
1892
+ const all = await count(repo.root, [range]);
1893
+ const own = await count(repo.root, [range, "^origin/HEAD"]);
1930
1894
  return all !== null && own !== null && own < all;
1931
- });
1895
+ };
1896
+ for (const repo of repos) if (await broughtIn(repo)) return true;
1897
+ return false;
1932
1898
  }
1933
1899
  function clearCheckpoints(scopeHash, repoRoots) {
1934
1900
  const manifest = loadManifest(scopeHash);
@@ -2678,4 +2644,4 @@ export {
2678
2644
  mergeHydratedSessions,
2679
2645
  forgetOtherBaseCheckoutEntries
2680
2646
  };
2681
- //# sourceMappingURL=chunk-SBLK524A.js.map
2647
+ //# sourceMappingURL=chunk-37XQIG7F.js.map