@ref0/git 0.11.0 → 0.14.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 (262) hide show
  1. package/dist/access/private-refs.mjs +8 -7
  2. package/dist/auth/auth.d.mts +2 -2
  3. package/dist/auth/auth.mjs +3 -6
  4. package/dist/auth/authorize.mjs +1 -17
  5. package/dist/auth/helpers.mjs +3 -11
  6. package/dist/auth/host-services.mjs +11 -0
  7. package/dist/auth/policy.d.mts +27 -7
  8. package/dist/auth/policy.mjs +8 -4
  9. package/dist/auth/tokens-layer.d.mts +1 -2
  10. package/dist/auth/tokens-layer.mjs +2 -3
  11. package/dist/auth/tokens-public.d.mts +3 -3
  12. package/dist/auth/tokens.d.mts +1 -8
  13. package/dist/auth/tokens.mjs +1 -8
  14. package/dist/auth.d.mts +1 -4
  15. package/dist/auth.mjs +1 -3
  16. package/dist/client/git-http.mjs +18 -4
  17. package/dist/client/push-upload.mjs +33 -7
  18. package/dist/client/remote.mjs +94 -28
  19. package/dist/client/slice-push.d.mts +1 -1
  20. package/dist/contracts/access.d.mts +8 -8
  21. package/dist/contracts/actors.d.mts +2 -34
  22. package/dist/contracts/blobs.d.mts +2 -2
  23. package/dist/contracts/client.d.mts +8 -3
  24. package/dist/contracts/commits.d.mts +10 -2
  25. package/dist/contracts/commits.mjs +9 -1
  26. package/dist/contracts/files.d.mts +2 -2
  27. package/dist/contracts/forks.d.mts +14 -3
  28. package/dist/contracts/git.d.mts +41 -12
  29. package/dist/contracts/git.mjs +3 -2
  30. package/dist/contracts/lfs.d.mts +0 -7
  31. package/dist/contracts/objects.d.mts +80 -10
  32. package/dist/contracts/operations.d.mts +3 -0
  33. package/dist/contracts/operations.mjs +12 -2
  34. package/dist/contracts/push-uploads.d.mts +44 -5
  35. package/dist/contracts/push-uploads.mjs +7 -3
  36. package/dist/contracts/refs.d.mts +28 -6
  37. package/dist/contracts/remote.mjs +1 -3
  38. package/dist/contracts/repo-records.d.mts +1 -0
  39. package/dist/contracts/repos.d.mts +90 -2
  40. package/dist/contracts/repos.mjs +29 -2
  41. package/dist/contracts/result.d.mts +30 -23
  42. package/dist/contracts/result.mjs +24 -9
  43. package/dist/contracts/rules.d.mts +22 -22
  44. package/dist/contracts/server.d.mts +28 -77
  45. package/dist/contracts/signin.d.mts +1 -1
  46. package/dist/contracts/sync.d.mts +90 -19
  47. package/dist/contracts/sync.mjs +34 -10
  48. package/dist/contracts/tokens.d.mts +1 -6
  49. package/dist/contracts/tokens.mjs +1 -2
  50. package/dist/contracts/topics.d.mts +0 -5
  51. package/dist/contracts/work.d.mts +66 -2
  52. package/dist/contracts/work.mjs +8 -1
  53. package/dist/core/access.d.mts +1 -0
  54. package/dist/core/access.mjs +34 -13
  55. package/dist/core/ancestry.d.mts +9 -0
  56. package/dist/core/ancestry.mjs +6 -6
  57. package/dist/core/asked.mjs +68 -0
  58. package/dist/core/call-names.mjs +1 -0
  59. package/dist/core/call-services.mjs +2 -1
  60. package/dist/core/events/deliver.d.mts +1 -0
  61. package/dist/core/events/deliver.mjs +15 -3
  62. package/dist/core/forks.mjs +42 -16
  63. package/dist/core/imports.mjs +156 -13
  64. package/dist/core/index-job.mjs +9 -6
  65. package/dist/core/job-view.mjs +8 -9
  66. package/dist/core/mirror-rows.mjs +19 -4
  67. package/dist/core/objects/commits.mjs +16 -6
  68. package/dist/core/objects/reading.mjs +17 -9
  69. package/dist/core/parts.d.mts +8 -2
  70. package/dist/core/parts.mjs +1 -4
  71. package/dist/core/purge.mjs +76 -6
  72. package/dist/core/push-decide.mjs +1 -1
  73. package/dist/core/push-files.d.mts +12 -0
  74. package/dist/core/push-files.mjs +225 -0
  75. package/dist/core/push-repo.d.mts +8 -0
  76. package/dist/core/push-repo.mjs +56 -0
  77. package/dist/core/push.d.mts +17 -0
  78. package/dist/core/push.mjs +107 -32
  79. package/dist/core/receipts.mjs +26 -10
  80. package/dist/core/ref-view.mjs +59 -5
  81. package/dist/core/refs.mjs +18 -10
  82. package/dist/core/registered-rows.mjs +7 -5
  83. package/dist/core/repack.mjs +16 -11
  84. package/dist/core/repo-info.mjs +16 -9
  85. package/dist/core/repos.mjs +30 -14
  86. package/dist/core/saved-caller-views.d.mts +18 -0
  87. package/dist/core/saved-caller-views.mjs +17 -4
  88. package/dist/core/saved-callers-public.d.mts +3 -3
  89. package/dist/core/saved-callers-public.mjs +3 -2
  90. package/dist/core/saved-callers.d.mts +7 -0
  91. package/dist/core/seam.mjs +2 -2
  92. package/dist/core/view.d.mts +6 -0
  93. package/dist/core/view.mjs +45 -12
  94. package/dist/core/work.mjs +47 -22
  95. package/dist/effect.d.mts +3 -1
  96. package/dist/effect.mjs +3 -1
  97. package/dist/engine/reads.mjs +13 -6
  98. package/dist/engine/walk.mjs +4 -4
  99. package/dist/event-streams/event-streams.d.mts +1 -1
  100. package/dist/event-streams/event-streams.mjs +1 -1
  101. package/dist/event-streams/stream.d.mts +1 -1
  102. package/dist/event-streams/stream.mjs +1 -1
  103. package/dist/extend.d.mts +4 -3
  104. package/dist/extend.mjs +3 -2
  105. package/dist/http/answers.mjs +4 -2
  106. package/dist/http/core-parts.mjs +64 -15
  107. package/dist/http/handler.mjs +2 -2
  108. package/dist/http/node.mjs +5 -4
  109. package/dist/http/parts.d.mts +1 -0
  110. package/dist/http/push-upload-job.mjs +503 -0
  111. package/dist/http/push-uploads.d.mts +1 -0
  112. package/dist/http/push-uploads.mjs +120 -59
  113. package/dist/http/upload-pack.mjs +7 -6
  114. package/dist/index.d.mts +23 -24
  115. package/dist/index.mjs +4 -7
  116. package/dist/lfs/base.d.mts +7 -3
  117. package/dist/lfs/base.mjs +2 -1
  118. package/dist/lfs/copy.d.mts +46 -0
  119. package/dist/lfs/copy.mjs +26 -0
  120. package/dist/lfs/layer.mjs +4 -2
  121. package/dist/lfs/locks.mjs +14 -9
  122. package/dist/lfs/objects.d.mts +6 -0
  123. package/dist/lfs/objects.mjs +95 -61
  124. package/dist/lfs/rows.d.mts +13 -0
  125. package/dist/lfs/service.d.mts +1 -7
  126. package/dist/lfs/service.mjs +1 -9
  127. package/dist/lfs/upload-most.mjs +5 -5
  128. package/dist/node.d.mts +2 -2
  129. package/dist/protocol/bytes/sha256-hasher.d.mts +15 -0
  130. package/dist/protocol/bytes/sha256.d.mts +32 -0
  131. package/dist/protocol/bytes/sha256.mjs +105 -49
  132. package/dist/protocol/wire/advertisement.mjs +9 -4
  133. package/dist/protocol/wire/lines.d.mts +4 -2
  134. package/dist/protocol/wire/lines.mjs +11 -5
  135. package/dist/protocol/wire/push-uploads.mjs +13 -1
  136. package/dist/protocol/wire/v2.mjs +2 -2
  137. package/dist/protocol.d.mts +3 -1
  138. package/dist/protocol.mjs +3 -1
  139. package/dist/queue/advance.mjs +1 -1
  140. package/dist/queue/calls.mjs +21 -1
  141. package/dist/queue/host.d.mts +1 -7
  142. package/dist/queue/host.mjs +1 -7
  143. package/dist/queue/layer.mjs +1 -1
  144. package/dist/queue/trim.mjs +1 -1
  145. package/dist/rest/blobs.d.mts +16 -8
  146. package/dist/rest/blobs.mjs +1 -1
  147. package/dist/rest/caller.d.mts +49 -9
  148. package/dist/rest/caller.mjs +1 -1
  149. package/dist/rest/client.d.mts +10 -3
  150. package/dist/rest/client.mjs +4 -0
  151. package/dist/rest/commits.d.mts +272 -239
  152. package/dist/rest/errors.d.mts +24 -4
  153. package/dist/rest/events.d.mts +9 -6
  154. package/dist/rest/events.mjs +1 -2
  155. package/dist/rest/files.d.mts +112 -100
  156. package/dist/rest/forks.d.mts +146 -122
  157. package/dist/rest/handler.mjs +4 -57
  158. package/dist/rest/handlers.d.mts +1 -1
  159. package/dist/rest/handlers.mjs +18 -4
  160. package/dist/rest/layer.mjs +10 -2
  161. package/dist/rest/me.d.mts +8 -4
  162. package/dist/rest/merges.d.mts +8 -4
  163. package/dist/rest/paths.mjs +1 -0
  164. package/dist/rest/queue.d.mts +292 -236
  165. package/dist/rest/refs.d.mts +98 -69
  166. package/dist/rest/repos.d.mts +133 -105
  167. package/dist/rest/tags.d.mts +100 -88
  168. package/dist/rest/tokens.d.mts +192 -168
  169. package/dist/rest/topics.d.mts +154 -134
  170. package/dist/rest/trees.d.mts +32 -16
  171. package/dist/rest/work.d.mts +467 -20
  172. package/dist/rest/work.mjs +8 -0
  173. package/dist/server/edge-node.d.mts +9 -13
  174. package/dist/server/edge-node.mjs +9 -12
  175. package/dist/server/git-layer.d.mts +1 -6
  176. package/dist/server/git-layer.mjs +2 -2
  177. package/dist/server/git-namespace.d.mts +4 -4
  178. package/dist/server/joined.d.mts +15 -22
  179. package/dist/server/joined.mjs +5 -29
  180. package/dist/server/lifecycle.mjs +107 -23
  181. package/dist/server/registry.mjs +9 -1
  182. package/dist/server/server.mjs +139 -216
  183. package/dist/storage/budget.mjs +2 -2
  184. package/dist/storage/clean-up.mjs +13 -10
  185. package/dist/storage/fetch.mjs +13 -8
  186. package/dist/storage/file-limits.mjs +24 -0
  187. package/dist/storage/index-build.d.mts +1 -0
  188. package/dist/storage/index-build.mjs +106 -62
  189. package/dist/storage/index-fetch.mjs +16 -3
  190. package/dist/storage/index-reach.mjs +33 -5
  191. package/dist/storage/index-remap.mjs +8 -1
  192. package/dist/storage/index-shallow.mjs +5 -3
  193. package/dist/storage/largest-files.mjs +48 -0
  194. package/dist/storage/lfs-pointers.mjs +10 -1
  195. package/dist/storage/loose.mjs +3 -1
  196. package/dist/storage/memory-budget.mjs +154 -8
  197. package/dist/storage/merge-cut.mjs +5 -4
  198. package/dist/storage/pack-reads.mjs +246 -34
  199. package/dist/storage/pack-receive.mjs +83 -25
  200. package/dist/storage/packs.mjs +37 -21
  201. package/dist/storage/prune-keep.mjs +203 -34
  202. package/dist/storage/prune-seen.mjs +11 -6
  203. package/dist/storage/prune-walk.mjs +219 -81
  204. package/dist/storage/prune.mjs +629 -196
  205. package/dist/storage/push-uploads.mjs +36 -12
  206. package/dist/storage/quarantine.mjs +9 -7
  207. package/dist/storage/ready.mjs +47 -19
  208. package/dist/storage/receive-bounds.mjs +29 -8
  209. package/dist/storage/receive-state.mjs +8 -0
  210. package/dist/storage/receive-steps.mjs +71 -18
  211. package/dist/storage/repack.d.mts +1 -1
  212. package/dist/storage/repack.mjs +1 -8
  213. package/dist/storage/rows.mjs +12 -1
  214. package/dist/storage/shallow.d.mts +1 -0
  215. package/dist/storage/shallow.mjs +26 -4
  216. package/dist/storage/stream-whole.mjs +5 -2
  217. package/dist/storage/visible.mjs +29 -1
  218. package/dist/storage/walk.mjs +2 -1
  219. package/dist/store/catalogue.mjs +1 -0
  220. package/dist/store/cursor-seal-namespace.d.mts +2 -0
  221. package/dist/store/cursor-seal-public.d.mts +5 -0
  222. package/dist/store/cursor-seal-public.mjs +5 -0
  223. package/dist/store/cursor-seal.d.mts +16 -2
  224. package/dist/store/cursor-seal.mjs +26 -14
  225. package/dist/store/errors.mjs +9 -1
  226. package/dist/store/records.d.mts +2 -0
  227. package/dist/store/records.mjs +9 -6
  228. package/dist/store/repo-record.d.mts +27 -0
  229. package/dist/store/repo-record.mjs +141 -4
  230. package/dist/store/scopes.mjs +10 -2
  231. package/dist/sync/bound.d.mts +2 -0
  232. package/dist/sync/bound.mjs +11 -2
  233. package/dist/sync/github.d.mts +6 -1
  234. package/dist/sync/github.mjs +63 -42
  235. package/dist/sync/http.mjs +36 -1
  236. package/dist/sync/import.mjs +4 -2
  237. package/dist/sync/layer.mjs +6 -2
  238. package/dist/sync/lfs-batch.mjs +119 -0
  239. package/dist/sync/lfs-copy.mjs +251 -0
  240. package/dist/sync/mirror.mjs +227 -147
  241. package/dist/sync/said.mjs +204 -0
  242. package/dist/sync/smart-http.mjs +4 -2
  243. package/dist/sync/step.mjs +33 -13
  244. package/dist/sync/tries.mjs +71 -24
  245. package/dist/sync.d.mts +2 -2
  246. package/dist/topics/advance.mjs +10 -3
  247. package/dist/topics/host.mjs +1 -19
  248. package/dist/topics/layer.mjs +1 -1
  249. package/package.json +3 -8
  250. package/dist/auth/bridge.mjs +0 -30
  251. package/dist/auth/helpers.d.mts +0 -17
  252. package/dist/core/purge.d.mts +0 -8
  253. package/dist/core/registered-rows.d.mts +0 -4
  254. package/dist/core/repack.d.mts +0 -11
  255. package/dist/http/handler.d.mts +0 -2
  256. package/dist/rest/handler.d.mts +0 -21
  257. package/dist/rest.d.mts +0 -2
  258. package/dist/rest.mjs +0 -1
  259. package/dist/server/registry.d.mts +0 -16
  260. package/dist/server/server.d.mts +0 -36
  261. package/dist/storage/repack-job.d.mts +0 -3
  262. package/dist/topics/host.d.mts +0 -7
@@ -6,6 +6,7 @@ import { SealedObjects } from "../core/view.mjs";
6
6
  import { refNameOf } from "../core/objects/writing.mjs";
7
7
  import { pushFetched } from "../core/push.mjs";
8
8
  import { maxRefLimit } from "../core/refs.mjs";
9
+ import { infiniteDepth } from "../storage/shallow.mjs";
9
10
  import { heldOf } from "../storage/wants.mjs";
10
11
  import { joinedBytes } from "../protocol/bytes/joined.mjs";
11
12
  import { isOid } from "../protocol/bytes/text.mjs";
@@ -17,7 +18,8 @@ import { encodeV2Request, lsRefsArguments, readLsRefsAnswer, readV2Capabilities
17
18
  import { objectsFace, oneShotReads } from "../storage/calls.mjs";
18
19
  import { decodePacks } from "../store/git-store.mjs";
19
20
  import { WholeRepo, wholeRefs } from "../store/ref-rows.mjs";
20
- import { collections } from "../store/scopes.mjs";
21
+ import { rootsOf } from "../store/repo-record.mjs";
22
+ import { collections, repoRootsKey } from "../store/scopes.mjs";
21
23
  import { advertisementRefused } from "./answer.mjs";
22
24
  import { heldBody } from "./git-http.mjs";
23
25
  import { localRepo } from "./local.mjs";
@@ -145,15 +147,22 @@ const remoteRefs = /* @__PURE__ */ Effect.fnUntraced(function* (http, input = {}
145
147
  });
146
148
  /** `effect` over the local repo's parts and its `Authorize`, the local side built first. */
147
149
  const overLocal = (local, effect) => Effect.flatMap(local.built, ({ needs }) => Effect.provideContext(effect, needs));
148
- /** The local repo at one read: its list for the objects, and its refs by name. */
150
+ /**
151
+ * The local repo at one read: its list for the objects, its refs by name, and its roots, the
152
+ * commits a shallow fetch's history stops at.
153
+ */
149
154
  const openedLocal = /* @__PURE__ */ Effect.fnUntraced(function* (local) {
150
155
  const stored = yield* ObjectsParts;
151
156
  const operation = {
152
157
  kind: "read",
153
158
  repo: localRepo
154
159
  };
155
- const resolved = yield* openRepo(local.caller, operation, [refsRead, packsRead]);
156
- const [, refRows = [], packRows = []] = resolved.snapshot.results;
160
+ const resolved = yield* openRepo(local.caller, operation, [
161
+ refsRead,
162
+ packsRead,
163
+ repoRootsKey
164
+ ]);
165
+ const [, refRows = [], packRows = [], rootRows] = resolved.snapshot.results;
157
166
  const packs = yield* decodePacks(packRows);
158
167
  return {
159
168
  stored,
@@ -162,7 +171,8 @@ const openedLocal = /* @__PURE__ */ Effect.fnUntraced(function* (local) {
162
171
  version: resolved.snapshot.version,
163
172
  packs
164
173
  },
165
- refs: yield* wholeRefs(clientWhole, refRows)
174
+ refs: yield* wholeRefs(clientWhole, refRows),
175
+ roots: yield* rootsOf(rootRows)
166
176
  };
167
177
  });
168
178
  /** `name` as a full name: a branch's short name, such as `main`, is `refs/heads/main`. */
@@ -172,25 +182,63 @@ const fullName = (name) => {
172
182
  };
173
183
  /** `refs` as full names, each as `fullName` says. */
174
184
  const fullNames = (refs) => Effect.forEach(refs, fullName);
175
- /** Whether `filter` and `depth` are what a request can say: whole numbers, and a depth past 0. */
176
- const checkedPartial = (depth, filter) => {
185
+ /** No tips held: a deepen asks every tip, as Git's does. */
186
+ const noTips = /* @__PURE__ */ new Set();
187
+ /**
188
+ * The deepen a fetch asks: `depth` commits from each tip, `deepen` more past the local edge, as
189
+ * Git's `deepen-relative`, or `unshallow`, the whole history, as Git's largest depth.
190
+ */
191
+ const deepenOf = (input) => {
192
+ if (input.depth !== void 0) return { depth: input.depth };
193
+ if (input.deepen !== void 0) return {
194
+ depth: input.deepen,
195
+ deepenRelative: true
196
+ };
197
+ return input.unshallow === true ? { depth: infiniteDepth } : void 0;
198
+ };
199
+ /**
200
+ * Whether `depth`, `deepen` and `filter` are what a request can say: whole numbers, a depth from 1
201
+ * to Git's largest, and at most one of `depth`, `deepen` and `unshallow`, as Git takes them.
202
+ */
203
+ const checkedPartial = (input) => {
204
+ const { depth, deepen, unshallow, filter } = input;
177
205
  const whole = (value) => Number.isSafeInteger(value) && value >= 0;
178
- if (depth !== void 0 && !(whole(depth) && depth > 0)) return fail("INVALID_ARGUMENT", `A fetch's depth is a whole number past 0, not ${depth}`);
206
+ const deep = (value) => whole(value) && value > 0 && value <= 2147483647;
207
+ if (depth !== void 0 && !deep(depth)) return fail("INVALID_ARGUMENT", `A fetch's depth is a whole number from 1 to ${infiniteDepth}, not ${depth}`);
208
+ if (deepen !== void 0 && !deep(deepen)) return fail("INVALID_ARGUMENT", `A fetch deepens by a whole number from 1 to ${infiniteDepth}, not ${deepen}`);
209
+ const asked = [
210
+ ...depth === void 0 ? [] : ["depth"],
211
+ ...deepen === void 0 ? [] : ["deepen"],
212
+ ...unshallow === true ? ["unshallow"] : []
213
+ ];
214
+ if (asked.length > 1) return fail("INVALID_ARGUMENT", `A fetch takes one of depth, deepen and unshallow, not ${asked.join(" and ")}`);
179
215
  if (filter?.kind === "blob:limit" && !whole(filter.bytes)) return fail("INVALID_ARGUMENT", `A blob limit is a whole number of bytes, not ${filter.bytes}`);
180
216
  if (filter?.kind === "tree" && !whole(filter.depth)) return fail("INVALID_ARGUMENT", `A tree filter's depth is a whole number, not ${filter.depth}`);
181
217
  return Effect.void;
182
218
  };
183
- /** How the remote's upload-pack takes a fetch, once it's known to take `depth` and `filter`. */
184
- const fetchTerms = /* @__PURE__ */ Effect.fnUntraced(function* (upload, input) {
219
+ /** What a fetch asks of the remote's `shallow`: a deepen's, or sending a shallow repo's edge. */
220
+ const shallowAsk = (input, shallowed) => {
221
+ if (input.depth !== void 0) return "a shallow fetch";
222
+ if (input.deepen !== void 0) return "a deepen";
223
+ if (input.unshallow === true) return "an unshallow";
224
+ return shallowed ? "a fetch into a shallow repo" : void 0;
225
+ };
226
+ /**
227
+ * How the remote's upload-pack takes a fetch, once it's known to take what `input` asks: a
228
+ * deepen, or `shallowed`, a local repo with roots, which sends them, needs its `shallow`.
229
+ */
230
+ const fetchTerms = /* @__PURE__ */ Effect.fnUntraced(function* (upload, input, shallowed) {
185
231
  const { capabilities } = upload;
186
232
  const features = upload.version === "v2" ? featuresOf(capabilities, "fetch") ?? [] : capabilities;
187
- if (input.depth !== void 0 && !features.includes("shallow")) return yield* Effect.fail(notOffered("a shallow fetch", "shallow"));
233
+ const shallowing = shallowAsk(input, shallowed === true);
234
+ if (shallowing !== void 0 && !features.includes("shallow")) return yield* Effect.fail(notOffered(shallowing, "shallow"));
235
+ if (input.deepen !== void 0 && upload.version === "v0" && !features.includes("deepen-relative")) return yield* Effect.fail(notOffered("a deepen", "deepen-relative"));
188
236
  if (input.filter !== void 0 && !features.includes("filter")) return yield* Effect.fail(notOffered("a filtered fetch", "filter"));
189
237
  const offered = (word) => capabilities.includes(word);
190
238
  const acks = offered("multi_ack_detailed") ? "multi_ack_detailed" : offered("multi_ack") ? "multi_ack" : "plain";
191
239
  const sideBand = upload.version === "v2" || offered("side-band-64k") ? "side-band-64k" : "side-band";
192
240
  if (upload.version === "v0" && !offered(sideBand)) return yield* Effect.fail(notOffered("a fetch this client reads", "side-band-64k"));
193
- const asked = [...input.depth === void 0 ? [] : ["shallow"], ...input.filter === void 0 ? [] : ["filter"]];
241
+ const asked = [...shallowing === void 0 ? [] : ["shallow"], ...input.filter === void 0 ? [] : ["filter"]];
194
242
  const sent = sentCapabilities(capabilities, upload.version);
195
243
  return {
196
244
  acks,
@@ -203,10 +251,12 @@ const fetchTerms = /* @__PURE__ */ Effect.fnUntraced(function* (upload, input) {
203
251
  * `fetch`: the refs asked for, each branch and tag when none is, read from the remote; each
204
252
  * tip the local repo doesn't hold fetched, in rounds, and kept; and each local ref of the same
205
253
  * name moved to the remote's tip, unless it holds commits the tip doesn't, which is refused as
206
- * `diverged`, or with `force`, moved anyway.
254
+ * `diverged`, or with `force`, moved anyway. A shallow local repo sends its roots as `shallow`
255
+ * lines, and the answer's `shallow` and `unshallow` lines move them in the commit that lands the
256
+ * pack. A deepen, `depth`, `deepen` or `unshallow`, asks every tip, held or not, as Git's does.
207
257
  */
208
258
  const fetchInto = (http, local, input = {}) => overLocal(local, Effect.gen(function* () {
209
- yield* checkedPartial(input.depth, input.filter);
259
+ yield* checkedPartial(input);
210
260
  const asked = input.refs === void 0 ? void 0 : yield* fullNames(input.refs);
211
261
  const upload = yield* discover(http);
212
262
  const remote = yield* remoteRefsOf(http, upload, asked ?? ["refs/heads/", "refs/tags/"]);
@@ -216,11 +266,13 @@ const fetchInto = (http, local, input = {}) => overLocal(local, Effect.gen(funct
216
266
  name,
217
267
  oid: remote.get(name) ?? noObject
218
268
  }));
219
- const terms = yield* fetchTerms(upload, input);
220
269
  const opened = yield* openedLocal(local);
270
+ if (input.unshallow === true && opened.roots.size === 0) return yield* fail("FAILED_PRECONDITION", "A fetch can't unshallow a repo that isn't shallow", { hint: "Fetch without unshallow" });
271
+ const terms = yield* fetchTerms(upload, input, opened.roots.size > 0);
221
272
  const objects = objectsFace(SealedObjects.whole(opened.stored.objects, clientWhole));
222
273
  const tips = [...new Set(refs.map((ref) => ref.oid))];
223
- const held = yield* heldOf(objects, opened.listed, tips);
274
+ const deepens = deepenOf(input);
275
+ const held = deepens === void 0 ? yield* heldOf(objects, opened.listed, tips) : noTips;
224
276
  const wants = tips.filter((oid) => !held.has(oid));
225
277
  const edits = refs.flatMap((ref) => {
226
278
  const from = opened.refs.get(ref.name) ?? null;
@@ -230,18 +282,19 @@ const fetchInto = (http, local, input = {}) => overLocal(local, Effect.gen(funct
230
282
  to: ref.oid
231
283
  }];
232
284
  });
233
- if (edits.length === 0) return {
285
+ if (edits.length === 0 && wants.length === 0) return {
234
286
  refs,
235
287
  shallow: [],
236
288
  unshallow: [],
237
289
  updates: []
238
290
  };
291
+ const shallows = [...opened.roots].sort();
239
292
  const request = {
240
293
  wants,
241
- shallows: [],
242
- includeTag: false
294
+ shallows,
295
+ includeTag: false,
296
+ ...deepens
243
297
  };
244
- if (input.depth !== void 0) request.depth = input.depth;
245
298
  if (input.filter !== void 0) request.filter = input.filter;
246
299
  const negotiated = wants.length === 0 ? void 0 : yield* negotiate({
247
300
  http,
@@ -253,7 +306,14 @@ const fetchInto = (http, local, input = {}) => overLocal(local, Effect.gen(funct
253
306
  tips: [...new Set(opened.refs.values())]
254
307
  });
255
308
  const shallow = [.../* @__PURE__ */ new Set([...upload.version === "v0" ? upload.shallows : [], ...negotiated?.shallow ?? []])];
256
- const partial = input.depth !== void 0 || input.filter !== void 0 || shallow.length > 0;
309
+ const unshallow = negotiated?.unshallow ?? [];
310
+ const sent = new Set(shallows);
311
+ const stray = unshallow.find((oid) => !sent.has(oid));
312
+ if (stray !== void 0) {
313
+ negotiated?.pack.cancel();
314
+ return yield* fail("DATA_LOSS", `The remote unshallowed ${stray}, which this fetch didn't send as shallow`);
315
+ }
316
+ const partial = deepens !== void 0 || input.filter !== void 0 || shallow.length > 0 || sent.size > 0;
257
317
  const pack = negotiated === void 0 ? void 0 : {
258
318
  bytes: negotiated.pack.bytes,
259
319
  objects: negotiated.pack.objects,
@@ -265,20 +325,26 @@ const fetchInto = (http, local, input = {}) => overLocal(local, Effect.gen(funct
265
325
  source: "import",
266
326
  edits,
267
327
  atomic: false,
268
- fetched: { force: input.force === true }
328
+ fetched: {
329
+ force: input.force === true,
330
+ roots: {
331
+ shallow,
332
+ unshallow,
333
+ sent: shallows
334
+ }
335
+ }
269
336
  };
270
337
  if (pack !== void 0) push.pack = pack;
271
338
  const stopped = new AbortController();
272
339
  push.signal = stopped.signal;
273
- const updates = yield* pushFetched(push).pipe(Effect.mapError((error) => negotiated?.pack.failure() ?? error), Effect.onInterrupt(() => Effect.sync(() => {
274
- stopped.abort();
275
- negotiated?.pack.cancel();
276
- })));
277
340
  return {
278
341
  refs,
279
342
  shallow,
280
- unshallow: negotiated?.unshallow ?? [],
281
- updates
343
+ unshallow,
344
+ updates: yield* pushFetched(push).pipe(Effect.mapError((error) => negotiated?.pack.failure() ?? error), Effect.onInterrupt(() => Effect.sync(() => {
345
+ stopped.abort();
346
+ negotiated?.pack.cancel();
347
+ })))
282
348
  };
283
349
  }));
284
350
  /**
@@ -68,7 +68,7 @@ export declare const pushSlices: (push: {
68
68
  };
69
69
  }[];
70
70
  };
71
- reason: "ambiguous" | "atomic-partner" | "awaiting-index" | "body-ended" | "boundary-not-in-pack" | "busy" | "call-budget" | "candidate-cancelled" | "candidate-superseded" | "changed-while-checked" | "cursor-expired" | "delta-too-large" | "diff-limit" | "diverged" | "entry-gone" | "entry-unpublishable" | "event-version" | "events-undelivered" | "events-waiting" | "fetch-depth-unsupported" | "fetch-plan-too-large" | "files-refused" | "fsck" | "graph-length" | "history-not-imported" | "import-cancelled" | "importing" | "job-step-calls" | "job-step-yielded" | "key-reused" | "link-wrong-type" | "may-have-saved" | "merge-conflict" | "merge-incomplete" | "merges-off" | "name-churn" | "newer-format" | "no-copy-rows" | "no-queue" | "no-releases" | "no-sync" | "no-topics" | "not-a-fork" | "object-missing" | "object-too-large" | "ofs-delta" | "own-repo" | "packs-awaiting-repack" | "provider-unknown" | "prune-walk-too-large" | "queue-full" | "queue-targets-full" | "rate-limited" | "ref-conflict" | "remote-refused" | "response-too-large" | "shallow-root" | "shallow-upload" | "stage-gone" | "tag-target-missing" | "too-many-gitmodules-and-gitattributes" | "too-many-parents" | "too-many-pointers" | "too-many-short-ids" | "too-many-store-calls" | "too-many-writes" | "unrelated-histories" | "unsupported-attribute" | "unsupported-virtual-base" | "walk-limit" | undefined;
71
+ reason: "ambiguous" | "atomic-partner" | "awaiting-index" | "body-ended" | "boundary-not-in-pack" | "busy" | "call-budget" | "candidate-cancelled" | "candidate-superseded" | "changed-while-checked" | "cursor-expired" | "delta-too-large" | "diff-limit" | "diverged" | "entry-gone" | "entry-unpublishable" | "event-version" | "events-undelivered" | "events-waiting" | "fetch-depth-unsupported" | "fetch-plan-too-large" | "files-refused" | "fsck" | "graph-length" | "history-not-imported" | "import-cancelled" | "importing" | "job-step-calls" | "job-step-yielded" | "key-reused" | "link-wrong-type" | "may-have-saved" | "merge-conflict" | "merge-incomplete" | "merges-off" | "name-churn" | "newer-format" | "no-copy-rows" | "no-queue" | "no-releases" | "no-sync" | "no-topics" | "not-a-fork" | "object-missing" | "object-too-large" | "ofs-delta" | "own-repo" | "packs-awaiting-repack" | "provider-unknown" | "prune-walk-too-large" | "queue-full" | "queue-targets-full" | "rate-limited" | "ref-conflict" | "remote-refused" | "repo-too-large" | "response-too-large" | "shallow-root" | "shallow-upload" | "stage-gone" | "starting" | "tag-target-missing" | "too-many-gitmodules-and-gitattributes" | "too-many-parents" | "too-many-pointers" | "too-many-short-ids" | "too-many-store-calls" | "too-many-writes" | "unrelated-histories" | "unsupported-attribute" | "unsupported-virtual-base" | "walk-limit" | undefined;
72
72
  };
73
73
  } | {
74
74
  refusal?: never;
@@ -24,9 +24,10 @@ export type HiddenSpan = typeof HiddenSpan.Type;
24
24
  /**
25
25
  * Which refs one caller sees, from its `refs.private` answer. A ref it doesn't see answers as a
26
26
  * missing one on every surface. `whole` is true when it reads every pattern: then it sees every
27
- * ref, and nothing is filtered. A caller who isn't whole sees none of Git's own refs, a merge
28
- * queue's candidates under `refs/queue/` and an import's staging under `refs/import/`, since they
29
- * hold whatever their entries hold, private commits too.
27
+ * ref, and nothing is filtered, but an owned prefix's refs, which only its owner reads: Git's view
28
+ * of a whole caller leaves them out, as its spans. A caller who isn't whole sees none of Git's own
29
+ * refs, a merge queue's candidates under `refs/queue/` and an import's staging under
30
+ * `refs/import/`, since they hold whatever their entries hold, private commits too.
30
31
  */
31
32
  export interface RefView {
32
33
  readonly whole: boolean;
@@ -50,12 +51,12 @@ export interface RefView {
50
51
  * ref under it, and the listing answers empty with no read.
51
52
  * - Every name in a span is hidden: a pattern the caller reads, listed before the one that
52
53
  * hides it, ends the span, since a ref is private by the first pattern that matches it.
53
- * Git's own prefixes are spans too, for a caller who isn't whole.
54
+ * Git's own prefixes are spans too, for a caller who isn't whole, and owned ones for any.
54
55
  * - Every hidden name is in a span, but a classed pattern's: `refs.count` counts the prefix less
55
56
  * the spans, with no row read out. A ref view that leaves another hidden name out of them, an
56
57
  * empty list with `sees` left to filter included, counts that ref where no listing shows it,
57
58
  * so a caller learns how many refs under a prefix it can't see: the count less the listing's
58
- * length. `whole` answers none.
59
+ * length. `whole` answers only owned prefixes' spans.
59
60
  * - A classed pattern's names, one with a `*` that matches no `/`, scatter through its range, so
60
61
  * none of its own is a span, though it may end one. Where the server keeps a ref index a
61
62
  * listing reads `plainSpans` and `classes` instead, and while the repo's index is rebuilt it
@@ -72,7 +73,7 @@ export interface RefView {
72
73
  * less the names of each exact name or last-`**` pattern before it that the caller reads, and
73
74
  * Git's own prefixes. `refs.count` counts the plain class less them and adds each of `classes`,
74
75
  * so a span too few or too many counts a ref no listing shows, or leaves one out. `whole`
75
- * answers none.
76
+ * answers only owned prefixes' spans.
76
77
  */
77
78
  readonly plainSpans: (prefix: string) => readonly HiddenSpan[];
78
79
  /**
@@ -99,8 +100,7 @@ export interface RefView {
99
100
  readonly publishes: (pattern: RefName) => boolean;
100
101
  }
101
102
  /**
102
- * Private branches, as `PrivateRefs.layer` configures them, for `createGitServer`'s
103
- * `access`. Without it, everyone who may read a repo sees all of it, and none of this runs.
103
+ * Private branches, as `PrivateRefs.layer` configures them. Without it, everyone who may read a repo sees all of it, and none of this runs.
104
104
  */
105
105
  export interface AccessOption {
106
106
  /** The patterns `privateRefs` was given, as written, in order. */
@@ -1,6 +1,6 @@
1
1
  import { Operation } from "./operations.mjs";
2
2
  import { RefAudience } from "./access.mjs";
3
- import { Accepted, Awaitable, DecisionAnswer } from "./result.mjs";
3
+ import { Accepted, DecisionAnswer } from "./result.mjs";
4
4
  import { TokenInfo } from "./tokens.mjs";
5
5
  import * as Schema from "effect/Schema";
6
6
  /**
@@ -124,8 +124,6 @@ export declare const AuthInput: Schema.Struct<{
124
124
  readonly signal: Schema.declare<AbortSignal, AbortSignal>;
125
125
  }>;
126
126
  export type AuthInput = typeof AuthInput.Type;
127
- /** Who is calling: `undefined` for a credential it doesn't know. */
128
- export type GitAuth<Meta = unknown> = (input: AuthInput) => Awaitable<Actor<Meta> | undefined>;
129
127
  /**
130
128
  * The extension's grant resolver that identified a caller, by its `name`, for reading only: Git
131
129
  * never trusts it, so a caller built by hand with it is a plain caller. To keep a caller's grant,
@@ -173,35 +171,5 @@ export type AuthorizeInput<Meta = unknown> = Acting<Meta> & {
173
171
  readonly repo?: RepoAccess;
174
172
  readonly signal: AbortSignal;
175
173
  };
176
- /**
177
- * Whether they may. A merge queue's publish asks again, for each entry, as the caller that added
178
- * it, with `at: 'queued'` and no actor `meta`: decide it from the actor's ID, and never grant on
179
- * `meta`'s absence.
180
- *
181
- * A refusal reaches the caller exactly as it's returned when it names a code of
182
- * its own, such as `FAILED_PRECONDITION`: Git can't tell who may know a repo exists, so it passes
183
- * that code on. The default refusal, `reject` with no code, `NOT_ALLOWED` or `NOT_FOUND`, answers
184
- * a stranger as for a repo that isn't there: `UNAUTHENTICATED` when anonymous, so Git asks to sign
185
- * in, and `NOT_FOUND` when signed in. A refusal of anything but a read or a create, whatever its code,
186
- * reaches only a caller you'd let read the repo; anyone else gets your answer to a read, and a
187
- * name with no repo answers as a read of it would. So return the
188
- * default refusal to anyone who may not know a private repo exists, and a code of your own only
189
- * to a caller who may.
190
- *
191
- * A `token.create` names whom the token is for, its `subject`, and any `actor` acting for them,
192
- * since a token's caller is its subject: refuse one a caller mints for anyone they may not act as.
193
- * Decided 21 Nov by the coordinator.
194
- *
195
- * A `refs.private` operation, asked only of a server made with `access`, is accepted with the
196
- * caller's `RefAudience`: `accept({ read, publish })`. Any other is accepted with no value. One
197
- * asked with no `repo` is an import's, before it makes the repo the operation names: decide it
198
- * from the caller, the name and the patterns, as `repo.create`, and read no repo, as none is
199
- * there yet. An importer who reads fewer than every pattern is refused the import.
200
- *
201
- * Decide about a repo by its `repo.internalId`, the repo the call then acts on. A name can move
202
- * between repos while you decide: swap two repos' names and back around one call, and a host that
203
- * decides by `repo.name` alone answers about the other repo (the coordinator, Q871, 25 Nov).
204
- */
205
- export type GitAuthorize<Meta = unknown> = (input: AuthorizeInput<Meta>) => Awaitable<AuthorizeAnswer>;
206
- /** What `authorize` answers: a decision, or for `refs.private`, the caller's ref audience. */
174
+ /** What a `Policy` answers: a decision, or for `refs.private`, the caller's ref audience. */
207
175
  export type AuthorizeAnswer = DecisionAnswer | Accepted<RefAudience>;
@@ -36,8 +36,8 @@ export type CreatedObject = typeof CreatedObject.Type;
36
36
  export interface BlobCalls {
37
37
  /**
38
38
  * Any blob the repo holds, its `bytes` streamed and checked against its ID as they go: a
39
- * mismatch errors the stream with `DATA_LOSS`. Its `bytes` limit has no default, so the file
40
- * limit, 100 MiB, caps it. `RESOURCE_EXHAUSTED` with `object-too-large` comes before the first
39
+ * mismatch errors the stream with `DATA_LOSS`. Its `bytes` limit has no default, so the largest
40
+ * file a host may let a push take, 1 GiB, caps it. `RESOURCE_EXHAUSTED` with `object-too-large` comes before the first
41
41
  * byte for a blob past the `bytes` limit the caller sets, or one stored as a delta past 16 MiB.
42
42
  * `milliseconds` limits the call until it answers, not the stream after it.
43
43
  */
@@ -35,13 +35,18 @@ export interface RemoteRefsInput {
35
35
  }
36
36
  /**
37
37
  * `refs`: branch names, such as `main`, or full names; every branch and tag when left out.
38
- * `depth`: commits of history from each tip, a shallow fetch. `filter`: objects left out, a
39
- * partial fetch, such as `{ kind: 'blob:none' }`. `force`: move a local ref that holds commits
40
- * the remote's tip doesn't to that tip anyway, as `git fetch --force` does.
38
+ * `depth`: commits of history from each tip, a shallow fetch, as `git fetch --depth`. `deepen`:
39
+ * commits more past a shallow repo's edge, as `git fetch --deepen`. `unshallow`: the whole
40
+ * history of a shallow repo, as `git fetch --unshallow`, refused on a repo that isn't shallow.
41
+ * A fetch takes at most one of the three. `filter`: objects left out, a partial fetch, such as
42
+ * `{ kind: 'blob:none' }`. `force`: move a local ref that holds commits the remote's tip doesn't
43
+ * to that tip anyway, as `git fetch --force` does.
41
44
  */
42
45
  export interface ClientFetchInput {
43
46
  readonly refs?: readonly RefName[];
44
47
  readonly depth?: number;
48
+ readonly deepen?: number;
49
+ readonly unshallow?: true;
45
50
  readonly filter?: Filter;
46
51
  readonly force?: boolean;
47
52
  }
@@ -11,7 +11,7 @@ import * as Schema from "effect/Schema";
11
11
  import { Listing } from "@ref0/infra";
12
12
  import * as Context from "effect/Context";
13
13
  declare namespace commits_d_exports {
14
- export { CommitCalls, CommitCreate, CommitCreateFields, CommitCreateInput, CommitDiff, CommitDiffInput, CommitMessage, CommitPick, CommitPickInput, CommitRevert, CommitRevertInput, Commits, CommitsMergeBase, CommitsMergeBaseInput, Compare, CompareInput, CompareRange, ComparisonFile, ComparisonFileFields, LineCounts, Log, LogInput, RefPublication, Revision, compare, create, diff, get, list, logEmailsMost, mergeBase, pick, revert };
14
+ export { CommitCalls, CommitCreate, CommitCreateFields, CommitCreateInput, CommitDiff, CommitDiffInput, CommitMessage, CommitPick, CommitPickInput, CommitRevert, CommitRevertInput, Commits, CommitsMergeBase, CommitsMergeBaseInput, Compare, CompareInput, CompareRange, ComparisonFile, ComparisonFileFields, LineCounts, Log, LogInput, RefPublication, Revision, compare, create, diff, get, list, logEmailsMost, logExcludeMost, mergeBase, pick, revert };
15
15
  }
16
16
  /**
17
17
  * A revision, as a call names a commit: a full object ID, a full ref name, `HEAD` for the
@@ -23,15 +23,23 @@ export declare const Revision: Schema.String;
23
23
  export type Revision = typeof Revision.Type;
24
24
  /** The most addresses a log's `authors` or `committers` names. */
25
25
  export declare const logEmailsMost = 100;
26
+ /** The most revisions a log's `exclude` names. */
27
+ export declare const logExcludeMost = 100;
26
28
  /**
27
- * `git log <ref> [-- <path>]`: newest first; with `path`, only the commits that changed it.
29
+ * `git log <ref> [^<exclude>…] [-- <path>]`: newest first; with `path`, only the commits that
30
+ * changed it. `exclude` is Git's `^rev`: the commits `ref` has that none of them has, each
31
+ * resolved as the caller as `ref` is. Like Git's, that walk marks the whole range before its
32
+ * first page, so its cost is the range's, whatever the page's size; `path` doesn't take it.
28
33
  * `authors` and `committers` keep the commits whose author's or committer's email is one they
29
34
  * name, compared without case. `since` and `until` keep the commits committed at or after and at
30
35
  * or before them, as `git log --since` and `--until` do, and as with `--since` the walk follows no
31
36
  * commit committed before `since`, so it stops along each line at the first older one.
37
+ * In process a page holds up to `logLimitMost`, 1,001, for a caller that reads a range whole in
38
+ * one walk; the REST API's pages hold up to 200, as every list's do.
32
39
  */
33
40
  export declare const Log: Schema.Struct<{
34
41
  readonly ref: Schema.String;
42
+ readonly exclude: Schema.optionalKey<Schema.$Array<Schema.String>>;
35
43
  readonly path: Schema.optionalKey<Schema.String>;
36
44
  readonly authors: Schema.optionalKey<Schema.$Array<Schema.String>>;
37
45
  readonly committers: Schema.optionalKey<Schema.$Array<Schema.String>>;
@@ -28,6 +28,7 @@ var commits_exports = /* @__PURE__ */ __exportAll({
28
28
  get: () => get,
29
29
  list: () => list,
30
30
  logEmailsMost: () => 100,
31
+ logExcludeMost: () => 100,
31
32
  mergeBase: () => mergeBase,
32
33
  pick: () => pick,
33
34
  revert: () => revert
@@ -46,15 +47,22 @@ const logEmailsMost = 100;
46
47
  * none, and at most `logEmailsMost`.
47
48
  */
48
49
  const LogEmails = /* @__PURE__ */ Schema.Array(Schema.String).check(Schema.isMinLength(1, { message: "named no address: leave the field out instead" }), Schema.isMaxLength(100, { message: `named more than 100 addresses` }));
50
+ const LogExclude = /* @__PURE__ */ Schema.Array(Revision).check(Schema.isMaxLength(100, { message: `named more than 100 revisions` }));
49
51
  /**
50
- * `git log <ref> [-- <path>]`: newest first; with `path`, only the commits that changed it.
52
+ * `git log <ref> [^<exclude>…] [-- <path>]`: newest first; with `path`, only the commits that
53
+ * changed it. `exclude` is Git's `^rev`: the commits `ref` has that none of them has, each
54
+ * resolved as the caller as `ref` is. Like Git's, that walk marks the whole range before its
55
+ * first page, so its cost is the range's, whatever the page's size; `path` doesn't take it.
51
56
  * `authors` and `committers` keep the commits whose author's or committer's email is one they
52
57
  * name, compared without case. `since` and `until` keep the commits committed at or after and at
53
58
  * or before them, as `git log --since` and `--until` do, and as with `--since` the walk follows no
54
59
  * commit committed before `since`, so it stops along each line at the first older one.
60
+ * In process a page holds up to `logLimitMost`, 1,001, for a caller that reads a range whole in
61
+ * one walk; the REST API's pages hold up to 200, as every list's do.
55
62
  */
56
63
  const Log = /* @__PURE__ */ Schema.Struct({
57
64
  ref: Revision,
65
+ exclude: Schema.optionalKey(LogExclude),
58
66
  path: Schema.optionalKey(Schema.String),
59
67
  authors: Schema.optionalKey(LogEmails),
60
68
  committers: Schema.optionalKey(LogEmails),
@@ -152,8 +152,8 @@ export declare const FileDiff: Schema.Union<readonly [Schema.Struct<{
152
152
  export type FileDiff = typeof FileDiff.Type;
153
153
  export interface FileCalls {
154
154
  /**
155
- * Files at a revision, each its `bytes` streamed as `blobs.get` streams a blob, to the file
156
- * limit, 100 MiB. A page holds as many as fit 8 MiB as base64, and a file past it alone, which
155
+ * Files at a revision, each its `bytes` streamed as `blobs.get` streams a blob, to the largest
156
+ * file a host may let a push take, 1 GiB. A page holds as many as fit 8 MiB as base64, and a file past it alone, which
157
157
  * REST sends with no content and its client streams from the blob route. Its `bytes` limit has
158
158
  * no default for a file's bytes: when the caller sets one, the page's files count against it.
159
159
  */
@@ -41,8 +41,9 @@ export declare const ForkFetched: Schema.Struct<{
41
41
  }>;
42
42
  export type ForkFetched = typeof ForkFetched.Type;
43
43
  /**
44
- * A fork is a complete repo of its own, made from what its source lists when it's made: every ref,
45
- * and the source's packs, shared without copying a byte. Later pushes to either reach only the
44
+ * A fork is a complete repo of its own, made from what its source lists when it's made: every ref
45
+ * but those under a prefix a registration publishes, such as `refs/pull/`, which the host writes
46
+ * from rows the fork doesn't copy, and the source's packs, shared without copying a byte. Later pushes to either reach only the
46
47
  * repo they're sent to, and deleting either leaves the other whole.
47
48
  */
48
49
  export interface ForkCalls {
@@ -63,7 +64,9 @@ export interface ForkCalls {
63
64
  * `repo`'s live forks, the newest first, each named as it's named now. A fork the caller may not
64
65
  * read is left out, and nothing counts it, so a page can be short while `next` says more may
65
66
  * follow. Each `next` is sealed for this source's list and names no fork, and one that isn't a
66
- * `next` of it is `INVALID_ARGUMENT`.
67
+ * `next` of it is `INVALID_ARGUMENT`. Unlike `RepoCalls.list`'s names, each fork is read again
68
+ * once `authorize` answers, and one renamed or made public or private meanwhile is asked of again
69
+ * as it is now, so none is listed as it was.
67
70
  */
68
71
  readonly list: (repo: RepoName, input: ForkListInput) => Promise<Result<Listing<RepoInfo>>>;
69
72
  /**
@@ -99,6 +102,7 @@ declare const Forks_base: Context.ServiceClass<Forks, "@ref0/git/Forks", EffectC
99
102
  readonly defaultBranch?: string;
100
103
  readonly public: boolean;
101
104
  readonly upstream?: string;
105
+ readonly shallow: boolean;
102
106
  readonly stats: {
103
107
  readonly repo: string;
104
108
  readonly refs: number;
@@ -126,6 +130,7 @@ declare const Forks_base: Context.ServiceClass<Forks, "@ref0/git/Forks", EffectC
126
130
  readonly defaultBranch?: string;
127
131
  readonly public: boolean;
128
132
  readonly upstream?: string;
133
+ readonly shallow: boolean;
129
134
  readonly stats: {
130
135
  readonly repo: string;
131
136
  readonly refs: number;
@@ -153,6 +158,7 @@ declare const Forks_base: Context.ServiceClass<Forks, "@ref0/git/Forks", EffectC
153
158
  readonly defaultBranch?: string;
154
159
  readonly public: boolean;
155
160
  readonly upstream?: string;
161
+ readonly shallow: boolean;
156
162
  readonly stats: {
157
163
  readonly repo: string;
158
164
  readonly refs: number;
@@ -180,6 +186,7 @@ declare const Forks_base: Context.ServiceClass<Forks, "@ref0/git/Forks", EffectC
180
186
  readonly defaultBranch?: string;
181
187
  readonly public: boolean;
182
188
  readonly upstream?: string;
189
+ readonly shallow: boolean;
183
190
  readonly stats: {
184
191
  readonly repo: string;
185
192
  readonly refs: number;
@@ -221,6 +228,7 @@ export declare const create: (repo: RepoName, input: ForkCreateInput, by?: Calle
221
228
  readonly defaultBranch?: string;
222
229
  readonly public: boolean;
223
230
  readonly upstream?: string;
231
+ readonly shallow: boolean;
224
232
  readonly stats: {
225
233
  readonly repo: string;
226
234
  readonly refs: number;
@@ -248,6 +256,7 @@ export declare const get: (repo: RepoName, input: ForkGetInput, by?: Caller) =>
248
256
  readonly defaultBranch?: string;
249
257
  readonly public: boolean;
250
258
  readonly upstream?: string;
259
+ readonly shallow: boolean;
251
260
  readonly stats: {
252
261
  readonly repo: string;
253
262
  readonly refs: number;
@@ -275,6 +284,7 @@ export declare const list: (repo: RepoName, input: ForkListInput, by?: Caller) =
275
284
  readonly defaultBranch?: string;
276
285
  readonly public: boolean;
277
286
  readonly upstream?: string;
287
+ readonly shallow: boolean;
278
288
  readonly stats: {
279
289
  readonly repo: string;
280
290
  readonly refs: number;
@@ -302,6 +312,7 @@ export declare const sync: (fork: RepoName, input: WriteInput & Pick<RepoInput,
302
312
  readonly defaultBranch?: string;
303
313
  readonly public: boolean;
304
314
  readonly upstream?: string;
315
+ readonly shallow: boolean;
305
316
  readonly stats: {
306
317
  readonly repo: string;
307
318
  readonly refs: number;