type-git 0.7.0 → 0.8.1

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.
@@ -206,9 +206,19 @@ type ExecOpts = {
206
206
  /**
207
207
  * Options for `raw()` and `strict(...).command()` calls.
208
208
  *
209
- * Extends {@link ExecOpts} with a per-call environment overlay.
209
+ * Extends {@link ExecOpts} with standard input and a per-call environment overlay.
210
210
  */
211
211
  type CommandExecOpts = ExecOpts & {
212
+ /**
213
+ * Data written to the command's standard input, which is then closed. A string is written as
214
+ * UTF-8; a `Uint8Array` is written unchanged. Without it, standard input is empty.
215
+ *
216
+ * @example
217
+ * ```ts
218
+ * const { stdout } = await repo.raw(['hash-object', '-w', '--stdin'], { stdin: 'hello\n' });
219
+ * ```
220
+ */
221
+ stdin?: string | Uint8Array;
212
222
  /**
213
223
  * Extra environment variables for this call only, applied on top of the environment
214
224
  * resolved from `createGit` / `open` options (`env`, `inheritEnv`, `home`, `pathPrefix`).
@@ -259,7 +269,9 @@ type GitErrorKind =
259
269
  /** Expected a bare repository but found worktree repository */
260
270
  | 'NotBareRepo'
261
271
  /** Git version is below minimum supported version */
262
- | 'UnsupportedGitVersion';
272
+ | 'UnsupportedGitVersion'
273
+ /** A repository opened with `untrusted: true` has configuration that can run a program */
274
+ | 'UnsafeRepoConfig';
263
275
  /**
264
276
  * Git error category for error handling (§13.2)
265
277
  *
@@ -474,6 +486,33 @@ type GitOpenOptions = {
474
486
  credential?: CredentialConfig;
475
487
  /** LFS mode configuration */
476
488
  lfs?: LfsMode;
489
+ /**
490
+ * Treat the repository directory as written by someone else.
491
+ *
492
+ * Git takes hooks and configuration from the repository itself, and many configuration keys
493
+ * name a program (`core.fsmonitor`, `diff.<driver>.textconv`, `filter.<driver>.smudge`,
494
+ * `remote.<name>.uploadpack`, ...). With `untrusted: true`:
495
+ *
496
+ * - every command runs with `-c` overrides that point `core.hooksPath` at a path that cannot
497
+ * hold hooks, turn off `core.fsmonitor`, refuse the `ext::` transport and set
498
+ * `safe.bareRepository=explicit`;
499
+ * - opening fails with `GitError` kind `'UnsafeRepoConfig'` when the repository's own
500
+ * configuration (`local` and `worktree` scopes, with the files they include) holds any key
501
+ * outside a closed list of data-only keys, such as core format settings,
502
+ * `branch.<name>.merge` and the `filter.lfs.*` values that `git lfs install` writes. Remote
503
+ * and submodule URLs must be `https`, `http`, `ssh`, `git` or scp-style URLs: a local path
504
+ * would point Git at another repository whose hooks and configuration are not checked.
505
+ * Every populated submodule's configuration is checked the same way.
506
+ *
507
+ * The configuration is checked once, when the repository is opened, so the directory must not
508
+ * be changed by anyone else while it is in use. Your own global and system configuration and
509
+ * any `credential` or `env` options are trusted as usual, and so is a local path that you pass
510
+ * yourself as a remote. Open a worktree by its top-level directory, not its `.git` directory.
511
+ * Requires Git 2.38 or later (`UnsupportedGitVersion` otherwise).
512
+ *
513
+ * @default false
514
+ */
515
+ untrusted?: boolean;
477
516
  };
478
517
  /**
479
518
  * Credential request information
@@ -1298,6 +1337,30 @@ declare const COMMAND_CONSTRAINTS: {
1298
1337
  readonly origin: "git";
1299
1338
  readonly reason: "Explicit submodule filtering requires a filter and recursive submodule initialization.";
1300
1339
  readonly source: string;
1340
+ }, {
1341
+ readonly id: "clone.recursive-references";
1342
+ readonly kind: "forbid";
1343
+ readonly when: readonly [{
1344
+ readonly key: "recurseSubmodules";
1345
+ readonly test: "active";
1346
+ }, {
1347
+ readonly key: "reference";
1348
+ readonly test: "active";
1349
+ }, {
1350
+ readonly key: "referenceIfAble";
1351
+ readonly test: "active";
1352
+ }];
1353
+ readonly origin: "git";
1354
+ readonly reason: "Recursive clones cannot use both reference and referenceIfAble.";
1355
+ readonly source: string;
1356
+ }, {
1357
+ readonly id: "clone.origin-name";
1358
+ readonly kind: "scalar";
1359
+ readonly key: "origin";
1360
+ readonly parser: "remote-name";
1361
+ readonly origin: "git";
1362
+ readonly reason: "The remote name must form a valid fetch refspec refs/heads/test:refs/remotes/<name>/test.";
1363
+ readonly source: string;
1301
1364
  }, {
1302
1365
  readonly id: "clone.depth";
1303
1366
  readonly kind: "integer";
@@ -1379,6 +1442,39 @@ declare const COMMAND_CONSTRAINTS: {
1379
1442
  readonly origin: "type-git";
1380
1443
  readonly reason: "Structured paths use NUL delimiters to preserve all filenames.";
1381
1444
  readonly source: "docs/design/option-constraints.md";
1445
+ }, {
1446
+ readonly id: "status.ignored-untracked";
1447
+ readonly kind: "forbid";
1448
+ readonly when: readonly [{
1449
+ readonly key: "ignored";
1450
+ readonly test: "equals";
1451
+ readonly value: "matching";
1452
+ }, {
1453
+ readonly key: "untracked";
1454
+ readonly test: "equals";
1455
+ readonly value: "no";
1456
+ }];
1457
+ readonly origin: "git";
1458
+ readonly reason: "Matching ignored files requires showing untracked files.";
1459
+ readonly source: string;
1460
+ }, {
1461
+ readonly id: "status.findRenames";
1462
+ readonly kind: "integer";
1463
+ readonly key: "findRenames";
1464
+ readonly min: 1;
1465
+ readonly allowBoolean: true;
1466
+ readonly origin: "type-git";
1467
+ readonly reason: "A rename threshold is a whole percentage.";
1468
+ readonly source: "docs/design/option-constraints.md";
1469
+ }, {
1470
+ readonly id: "status.findRenames-range";
1471
+ readonly kind: "range";
1472
+ readonly key: "findRenames";
1473
+ readonly min: 1;
1474
+ readonly max: 100;
1475
+ readonly origin: "type-git";
1476
+ readonly reason: "A rename threshold is a percentage from 1 to 100.";
1477
+ readonly source: "docs/design/option-constraints.md";
1382
1478
  }];
1383
1479
  readonly log: readonly [{
1384
1480
  readonly id: "log.unsupported";
@@ -1485,6 +1581,28 @@ declare const COMMAND_CONSTRAINTS: {
1485
1581
  readonly origin: "git";
1486
1582
  readonly reason: "Git rejects these simultaneous modes or operands.";
1487
1583
  readonly source: string;
1584
+ }, {
1585
+ readonly id: "fetch.refspec-remote";
1586
+ readonly kind: "requires";
1587
+ readonly when: {
1588
+ readonly key: "refspec";
1589
+ readonly test: "nonempty";
1590
+ };
1591
+ readonly required: readonly [{
1592
+ readonly key: "remote";
1593
+ readonly test: "nonempty";
1594
+ }];
1595
+ readonly origin: "git";
1596
+ readonly reason: "Git reads the first positional word as the repository, so refspecs need an explicit remote.";
1597
+ readonly source: string;
1598
+ }, {
1599
+ readonly id: "fetch.tag-shorthand";
1600
+ readonly kind: "scalar";
1601
+ readonly key: "refspec";
1602
+ readonly parser: "fetch-refspec-words";
1603
+ readonly origin: "git";
1604
+ readonly reason: "Refspec words must parse as refspecs, and a word 'tag' must be followed by a tag name that forms one.";
1605
+ readonly source: string;
1488
1606
  }, {
1489
1607
  readonly id: "fetch.unsupported";
1490
1608
  readonly kind: "unsupported";
@@ -1610,6 +1728,52 @@ declare const COMMAND_CONSTRAINTS: {
1610
1728
  readonly origin: "git";
1611
1729
  readonly reason: "Deletion requires explicit refs.";
1612
1730
  readonly source: string;
1731
+ }, {
1732
+ readonly id: "push.refspec-remote";
1733
+ readonly kind: "requires";
1734
+ readonly when: {
1735
+ readonly key: "refspec";
1736
+ readonly test: "nonempty";
1737
+ };
1738
+ readonly required: readonly [{
1739
+ readonly key: "remote";
1740
+ readonly test: "nonempty";
1741
+ }];
1742
+ readonly origin: "git";
1743
+ readonly reason: "Git reads the first positional word as the repository, so refspecs need an explicit remote.";
1744
+ readonly source: string;
1745
+ }, {
1746
+ readonly id: "push.tag-shorthand";
1747
+ readonly kind: "scalar";
1748
+ readonly key: "refspec";
1749
+ readonly parser: "refspec-words";
1750
+ readonly guard: readonly [{
1751
+ readonly key: "deleteRefs";
1752
+ readonly test: "inactive";
1753
+ }];
1754
+ readonly origin: "git";
1755
+ readonly reason: "Refspec words must parse as refspecs, and a word 'tag' must be followed by a tag name that forms one.";
1756
+ readonly source: string;
1757
+ }, {
1758
+ readonly id: "push.delete-names";
1759
+ readonly kind: "scalar";
1760
+ readonly key: "refspec";
1761
+ readonly parser: "push-delete-refspecs";
1762
+ readonly guard: readonly [{
1763
+ readonly key: "deleteRefs";
1764
+ readonly test: "active";
1765
+ }];
1766
+ readonly origin: "git";
1767
+ readonly reason: "Deletion accepts only nonempty plain ref names without a colon that are valid ref names.";
1768
+ readonly source: string;
1769
+ }, {
1770
+ readonly id: "push.option-newline";
1771
+ readonly kind: "scalar";
1772
+ readonly key: "pushOption";
1773
+ readonly parser: "push-option-text";
1774
+ readonly origin: "git";
1775
+ readonly reason: "Push options must not contain newline characters.";
1776
+ readonly source: string;
1613
1777
  }];
1614
1778
  readonly add: readonly [{
1615
1779
  readonly id: "add.all-update";
@@ -1829,10 +1993,10 @@ declare const COMMAND_CONSTRAINTS: {
1829
1993
  readonly test: "active";
1830
1994
  }, {
1831
1995
  readonly key: "strategy";
1832
- readonly test: "active";
1996
+ readonly test: "nonempty";
1833
1997
  }, {
1834
1998
  readonly key: "strategyOption";
1835
- readonly test: "active";
1999
+ readonly test: "nonempty";
1836
2000
  }, {
1837
2001
  readonly key: "noVerify";
1838
2002
  readonly test: "active";
@@ -1906,10 +2070,10 @@ declare const COMMAND_CONSTRAINTS: {
1906
2070
  readonly test: "active";
1907
2071
  }, {
1908
2072
  readonly key: "strategy";
1909
- readonly test: "active";
2073
+ readonly test: "nonempty";
1910
2074
  }, {
1911
2075
  readonly key: "strategyOption";
1912
- readonly test: "active";
2076
+ readonly test: "nonempty";
1913
2077
  }, {
1914
2078
  readonly key: "noVerify";
1915
2079
  readonly test: "active";
@@ -1983,10 +2147,10 @@ declare const COMMAND_CONSTRAINTS: {
1983
2147
  readonly test: "active";
1984
2148
  }, {
1985
2149
  readonly key: "strategy";
1986
- readonly test: "active";
2150
+ readonly test: "nonempty";
1987
2151
  }, {
1988
2152
  readonly key: "strategyOption";
1989
- readonly test: "active";
2153
+ readonly test: "nonempty";
1990
2154
  }, {
1991
2155
  readonly key: "noVerify";
1992
2156
  readonly test: "active";
@@ -2069,6 +2233,53 @@ declare const COMMAND_CONSTRAINTS: {
2069
2233
  readonly source: string;
2070
2234
  }];
2071
2235
  readonly pull: readonly [{
2236
+ readonly id: "pull.branch-remote";
2237
+ readonly kind: "requires";
2238
+ readonly when: {
2239
+ readonly key: "branch";
2240
+ readonly test: "nonempty";
2241
+ };
2242
+ readonly required: readonly [{
2243
+ readonly key: "remote";
2244
+ readonly test: "nonempty";
2245
+ }];
2246
+ readonly origin: "git";
2247
+ readonly reason: "Git reads the first positional word as the repository, so a branch needs an explicit remote.";
2248
+ readonly source: string;
2249
+ }, {
2250
+ readonly id: "pull.all-remote";
2251
+ readonly kind: "forbid";
2252
+ readonly when: readonly [{
2253
+ readonly key: "all";
2254
+ readonly test: "active";
2255
+ }, {
2256
+ readonly key: "remote";
2257
+ readonly test: "nonempty";
2258
+ }];
2259
+ readonly origin: "git";
2260
+ readonly reason: "Fetching from all remotes cannot name a repository.";
2261
+ readonly source: string;
2262
+ }, {
2263
+ readonly id: "pull.tag-shorthand";
2264
+ readonly kind: "scalar";
2265
+ readonly key: "branch";
2266
+ readonly parser: "fetch-refspec-words";
2267
+ readonly origin: "git";
2268
+ readonly reason: "Refspec words must parse as refspecs, and a word 'tag' must be followed by a tag name that forms one.";
2269
+ readonly source: string;
2270
+ }, {
2271
+ readonly id: "pull.cleanup";
2272
+ readonly kind: "value";
2273
+ readonly key: "cleanup";
2274
+ readonly guard: readonly [{
2275
+ readonly key: "cleanup";
2276
+ readonly test: "nonempty";
2277
+ }];
2278
+ readonly allowed: readonly ["default", "verbatim", "whitespace", "strip", "scissors"];
2279
+ readonly origin: "git";
2280
+ readonly reason: "Pull validates the final cleanup value before fetching.";
2281
+ readonly source: string;
2282
+ }, {
2072
2283
  readonly id: "pull.depth-unshallow";
2073
2284
  readonly kind: "exclusive";
2074
2285
  readonly keys: readonly ["depth", "unshallow"];
@@ -2163,6 +2374,51 @@ declare const COMMAND_CONSTRAINTS: {
2163
2374
  readonly origin: "git";
2164
2375
  readonly reason: "Git rejects these simultaneous modes or operands.";
2165
2376
  readonly source: string;
2377
+ }, {
2378
+ readonly id: "switch.discard-conflict";
2379
+ readonly kind: "exclusive";
2380
+ readonly keys: readonly ["discard", "conflict"];
2381
+ readonly origin: "git";
2382
+ readonly reason: "A conflict style implies --merge, which Git rejects with --discard-changes.";
2383
+ readonly source: string;
2384
+ }, {
2385
+ readonly id: "switch.force-conflict";
2386
+ readonly kind: "exclusive";
2387
+ readonly keys: readonly ["force", "conflict"];
2388
+ readonly origin: "git";
2389
+ readonly reason: "A conflict style implies --merge, which Git rejects with --force.";
2390
+ readonly source: string;
2391
+ }, {
2392
+ readonly id: "switch.detach-track";
2393
+ readonly kind: "exclusive";
2394
+ readonly keys: readonly ["detach", "track"];
2395
+ readonly origin: "git";
2396
+ readonly reason: "Git rejects tracking with --detach.";
2397
+ readonly source: string;
2398
+ }, {
2399
+ readonly id: "switch.orphan-track";
2400
+ readonly kind: "exclusive";
2401
+ readonly keys: readonly ["orphan", "track"];
2402
+ readonly origin: "git";
2403
+ readonly reason: "Git rejects tracking with --orphan.";
2404
+ readonly source: string;
2405
+ }, {
2406
+ readonly id: "switch.startPoint";
2407
+ readonly kind: "requiresAny";
2408
+ readonly when: {
2409
+ readonly key: "startPoint";
2410
+ readonly test: "nonempty";
2411
+ };
2412
+ readonly choices: readonly [{
2413
+ readonly key: "create";
2414
+ readonly test: "active";
2415
+ }, {
2416
+ readonly key: "forceCreate";
2417
+ readonly test: "active";
2418
+ }];
2419
+ readonly origin: "git";
2420
+ readonly reason: "A start point is a second operand, which Git accepts only with -c or -C; --orphan takes no start point. An empty startPoint is not emitted.";
2421
+ readonly source: string;
2166
2422
  }];
2167
2423
  readonly cherryPick: readonly [{
2168
2424
  readonly id: "cherryPick.abort-continue-skip";
@@ -2219,10 +2475,10 @@ declare const COMMAND_CONSTRAINTS: {
2219
2475
  readonly test: "active";
2220
2476
  }, {
2221
2477
  readonly key: "strategy";
2222
- readonly test: "active";
2478
+ readonly test: "nonempty";
2223
2479
  }, {
2224
2480
  readonly key: "strategyOption";
2225
- readonly test: "active";
2481
+ readonly test: "nonempty";
2226
2482
  }, {
2227
2483
  readonly key: "appendCommitName";
2228
2484
  readonly test: "active";
@@ -2231,7 +2487,7 @@ declare const COMMAND_CONSTRAINTS: {
2231
2487
  readonly test: "active";
2232
2488
  }, {
2233
2489
  readonly key: "empty";
2234
- readonly test: "active";
2490
+ readonly test: "nonempty";
2235
2491
  }, {
2236
2492
  readonly key: "rerereAutoupdate";
2237
2493
  readonly test: "present";
@@ -2257,10 +2513,10 @@ declare const COMMAND_CONSTRAINTS: {
2257
2513
  readonly test: "active";
2258
2514
  }, {
2259
2515
  readonly key: "strategy";
2260
- readonly test: "active";
2516
+ readonly test: "nonempty";
2261
2517
  }, {
2262
2518
  readonly key: "strategyOption";
2263
- readonly test: "active";
2519
+ readonly test: "nonempty";
2264
2520
  }, {
2265
2521
  readonly key: "appendCommitName";
2266
2522
  readonly test: "active";
@@ -2269,7 +2525,7 @@ declare const COMMAND_CONSTRAINTS: {
2269
2525
  readonly test: "active";
2270
2526
  }, {
2271
2527
  readonly key: "empty";
2272
- readonly test: "active";
2528
+ readonly test: "nonempty";
2273
2529
  }, {
2274
2530
  readonly key: "rerereAutoupdate";
2275
2531
  readonly test: "present";
@@ -2295,10 +2551,10 @@ declare const COMMAND_CONSTRAINTS: {
2295
2551
  readonly test: "active";
2296
2552
  }, {
2297
2553
  readonly key: "strategy";
2298
- readonly test: "active";
2554
+ readonly test: "nonempty";
2299
2555
  }, {
2300
2556
  readonly key: "strategyOption";
2301
- readonly test: "active";
2557
+ readonly test: "nonempty";
2302
2558
  }, {
2303
2559
  readonly key: "appendCommitName";
2304
2560
  readonly test: "active";
@@ -2307,7 +2563,7 @@ declare const COMMAND_CONSTRAINTS: {
2307
2563
  readonly test: "active";
2308
2564
  }, {
2309
2565
  readonly key: "empty";
2310
- readonly test: "active";
2566
+ readonly test: "nonempty";
2311
2567
  }, {
2312
2568
  readonly key: "rerereAutoupdate";
2313
2569
  readonly test: "present";
@@ -2399,10 +2655,10 @@ declare const COMMAND_CONSTRAINTS: {
2399
2655
  readonly test: "active";
2400
2656
  }, {
2401
2657
  readonly key: "strategy";
2402
- readonly test: "active";
2658
+ readonly test: "nonempty";
2403
2659
  }, {
2404
2660
  readonly key: "strategyOption";
2405
- readonly test: "active";
2661
+ readonly test: "nonempty";
2406
2662
  }, {
2407
2663
  readonly key: "rerereAutoupdate";
2408
2664
  readonly test: "present";
@@ -2428,10 +2684,10 @@ declare const COMMAND_CONSTRAINTS: {
2428
2684
  readonly test: "active";
2429
2685
  }, {
2430
2686
  readonly key: "strategy";
2431
- readonly test: "active";
2687
+ readonly test: "nonempty";
2432
2688
  }, {
2433
2689
  readonly key: "strategyOption";
2434
- readonly test: "active";
2690
+ readonly test: "nonempty";
2435
2691
  }, {
2436
2692
  readonly key: "rerereAutoupdate";
2437
2693
  readonly test: "present";
@@ -2457,10 +2713,10 @@ declare const COMMAND_CONSTRAINTS: {
2457
2713
  readonly test: "active";
2458
2714
  }, {
2459
2715
  readonly key: "strategy";
2460
- readonly test: "active";
2716
+ readonly test: "nonempty";
2461
2717
  }, {
2462
2718
  readonly key: "strategyOption";
2463
- readonly test: "active";
2719
+ readonly test: "nonempty";
2464
2720
  }, {
2465
2721
  readonly key: "rerereAutoupdate";
2466
2722
  readonly test: "present";
@@ -2470,11 +2726,147 @@ declare const COMMAND_CONSTRAINTS: {
2470
2726
  readonly source: string;
2471
2727
  }];
2472
2728
  readonly rebase: readonly [{
2473
- readonly id: "rebase.abort-continue-skip";
2474
- readonly kind: "exclusive";
2475
- readonly keys: readonly ["abort", "continue", "skip"];
2729
+ readonly id: "rebase.action-alone";
2730
+ readonly kind: "exclusiveGroups";
2731
+ readonly groups: readonly [readonly [{
2732
+ readonly key: "abort";
2733
+ readonly test: "active";
2734
+ }], readonly [{
2735
+ readonly key: "continue";
2736
+ readonly test: "active";
2737
+ }], readonly [{
2738
+ readonly key: "skip";
2739
+ readonly test: "active";
2740
+ }], readonly [{
2741
+ readonly key: "upstream";
2742
+ readonly test: "nonempty";
2743
+ }, {
2744
+ readonly key: "onto";
2745
+ readonly test: "nonempty";
2746
+ }, {
2747
+ readonly key: "interactive";
2748
+ readonly test: "active";
2749
+ }, {
2750
+ readonly key: "rebaseMerges";
2751
+ readonly test: "active";
2752
+ }, {
2753
+ readonly key: "noVerify";
2754
+ readonly test: "active";
2755
+ }, {
2756
+ readonly key: "keepBase";
2757
+ readonly test: "active";
2758
+ }, {
2759
+ readonly key: "quiet";
2760
+ readonly test: "active";
2761
+ }, {
2762
+ readonly key: "verbose";
2763
+ readonly test: "active";
2764
+ }, {
2765
+ readonly key: "signoff";
2766
+ readonly test: "active";
2767
+ }, {
2768
+ readonly key: "committerDateIsAuthorDate";
2769
+ readonly test: "active";
2770
+ }, {
2771
+ readonly key: "resetAuthorDate";
2772
+ readonly test: "active";
2773
+ }, {
2774
+ readonly key: "ignoreWhitespace";
2775
+ readonly test: "active";
2776
+ }, {
2777
+ readonly key: "whitespace";
2778
+ readonly test: "nonempty";
2779
+ }, {
2780
+ readonly key: "forceRebase";
2781
+ readonly test: "active";
2782
+ }, {
2783
+ readonly key: "noFf";
2784
+ readonly test: "active";
2785
+ }, {
2786
+ readonly key: "apply";
2787
+ readonly test: "active";
2788
+ }, {
2789
+ readonly key: "rerereAutoupdate";
2790
+ readonly test: "present";
2791
+ }, {
2792
+ readonly key: "empty";
2793
+ readonly test: "nonempty";
2794
+ }, {
2795
+ readonly key: "autosquash";
2796
+ readonly test: "present";
2797
+ }, {
2798
+ readonly key: "updateRefs";
2799
+ readonly test: "present";
2800
+ }, {
2801
+ readonly key: "gpgSign";
2802
+ readonly test: "active";
2803
+ }, {
2804
+ readonly key: "autostash";
2805
+ readonly test: "present";
2806
+ }, {
2807
+ readonly key: "exec";
2808
+ readonly test: "nonempty";
2809
+ }, {
2810
+ readonly key: "forkPoint";
2811
+ readonly test: "present";
2812
+ }, {
2813
+ readonly key: "strategy";
2814
+ readonly test: "nonempty";
2815
+ }, {
2816
+ readonly key: "strategyOption";
2817
+ readonly test: "nonempty";
2818
+ }, {
2819
+ readonly key: "root";
2820
+ readonly test: "active";
2821
+ }, {
2822
+ readonly key: "rescheduleFailedExec";
2823
+ readonly test: "present";
2824
+ }, {
2825
+ readonly key: "reapplyCherryPicks";
2826
+ readonly test: "present";
2827
+ }]];
2476
2828
  readonly origin: "git";
2477
- readonly reason: "Git rejects these simultaneous modes or operands.";
2829
+ readonly reason: "A rebase action must be the only argument; Git prints usage otherwise.";
2830
+ readonly source: string;
2831
+ }, {
2832
+ readonly id: "rebase.backend";
2833
+ readonly kind: "exclusiveGroups";
2834
+ readonly groups: readonly [readonly [{
2835
+ readonly key: "apply";
2836
+ readonly test: "active";
2837
+ }, {
2838
+ readonly key: "whitespace";
2839
+ readonly test: "nonempty";
2840
+ }], readonly [{
2841
+ readonly key: "strategy";
2842
+ readonly test: "nonempty";
2843
+ }, {
2844
+ readonly key: "strategyOption";
2845
+ readonly test: "nonempty";
2846
+ }, {
2847
+ readonly key: "exec";
2848
+ readonly test: "nonempty";
2849
+ }, {
2850
+ readonly key: "rebaseMerges";
2851
+ readonly test: "active";
2852
+ }, {
2853
+ readonly key: "updateRefs";
2854
+ readonly test: "equals";
2855
+ readonly value: true;
2856
+ }, {
2857
+ readonly key: "autosquash";
2858
+ readonly test: "equals";
2859
+ readonly value: true;
2860
+ }, {
2861
+ readonly key: "empty";
2862
+ readonly test: "nonempty";
2863
+ }, {
2864
+ readonly key: "rescheduleFailedExec";
2865
+ readonly test: "equals";
2866
+ readonly value: true;
2867
+ }]];
2868
+ readonly origin: "git";
2869
+ readonly reason: "Apply options (--apply, --whitespace) cannot be combined with options that select or require the merge backend.";
2478
2870
  readonly source: string;
2479
2871
  }, {
2480
2872
  readonly id: "rebase.keepBase-onto";
@@ -2490,27 +2882,6 @@ declare const COMMAND_CONSTRAINTS: {
2490
2882
  readonly origin: "git";
2491
2883
  readonly reason: "Git rejects these simultaneous modes or operands.";
2492
2884
  readonly source: string;
2493
- }, {
2494
- readonly id: "rebase.apply-rebaseMerges";
2495
- readonly kind: "exclusive";
2496
- readonly keys: readonly ["apply", "rebaseMerges"];
2497
- readonly origin: "git";
2498
- readonly reason: "Git rejects these simultaneous modes or operands.";
2499
- readonly source: string;
2500
- }, {
2501
- readonly id: "rebase.apply-strategy";
2502
- readonly kind: "exclusive";
2503
- readonly keys: readonly ["apply", "strategy"];
2504
- readonly origin: "git";
2505
- readonly reason: "Git rejects these simultaneous modes or operands.";
2506
- readonly source: string;
2507
- }, {
2508
- readonly id: "rebase.apply-exec";
2509
- readonly kind: "exclusive";
2510
- readonly keys: readonly ["apply", "exec"];
2511
- readonly origin: "git";
2512
- readonly reason: "Git rejects these simultaneous modes or operands.";
2513
- readonly source: string;
2514
2885
  }, {
2515
2886
  readonly id: "rebase.unsupported";
2516
2887
  readonly kind: "unsupported";
@@ -2525,6 +2896,22 @@ declare const COMMAND_CONSTRAINTS: {
2525
2896
  readonly origin: "git";
2526
2897
  readonly reason: "Root rebases cannot use fork-point detection.";
2527
2898
  readonly source: string;
2899
+ }, {
2900
+ readonly id: "rebase.whitespace-value";
2901
+ readonly kind: "value";
2902
+ readonly key: "whitespace";
2903
+ readonly allowed: readonly ["", "nowarn", "warn", "error", "error-all", "fix", "strip"];
2904
+ readonly origin: "git";
2905
+ readonly reason: "cmd_rebase accepts only the git apply whitespace actions.";
2906
+ readonly source: string;
2907
+ }, {
2908
+ readonly id: "rebase.empty-value";
2909
+ readonly kind: "value";
2910
+ readonly key: "empty";
2911
+ readonly allowed: readonly ["drop", "keep", "stop", "ask"];
2912
+ readonly origin: "git";
2913
+ readonly reason: "parse_empty_value accepts drop, keep, stop and the deprecated ask.";
2914
+ readonly source: string;
2528
2915
  }];
2529
2916
  readonly restore: readonly [{
2530
2917
  readonly id: "restore.staged-conflict";
@@ -2577,6 +2964,57 @@ declare const COMMAND_CONSTRAINTS: {
2577
2964
  readonly origin: "git";
2578
2965
  readonly reason: "Git rejects these simultaneous modes or operands.";
2579
2966
  readonly source: string;
2967
+ }, {
2968
+ readonly id: "restore.stage-merge";
2969
+ readonly kind: "conflicts";
2970
+ readonly when: {
2971
+ readonly key: "merge";
2972
+ readonly test: "active";
2973
+ };
2974
+ readonly others: readonly [{
2975
+ readonly key: "ours";
2976
+ readonly test: "active";
2977
+ }, {
2978
+ readonly key: "theirs";
2979
+ readonly test: "active";
2980
+ }];
2981
+ readonly origin: "git";
2982
+ readonly reason: "Git rejects --ours or --theirs with --merge.";
2983
+ readonly source: string;
2984
+ }, {
2985
+ readonly id: "restore.stage-conflict";
2986
+ readonly kind: "conflicts";
2987
+ readonly when: {
2988
+ readonly key: "conflict";
2989
+ readonly test: "active";
2990
+ };
2991
+ readonly others: readonly [{
2992
+ readonly key: "ours";
2993
+ readonly test: "active";
2994
+ }, {
2995
+ readonly key: "theirs";
2996
+ readonly test: "active";
2997
+ }];
2998
+ readonly origin: "git";
2999
+ readonly reason: "A conflict style implies --merge, which Git rejects with --ours or --theirs.";
3000
+ readonly source: string;
3001
+ }, {
3002
+ readonly id: "restore.ignoreUnmerged-merge";
3003
+ readonly kind: "conflicts";
3004
+ readonly when: {
3005
+ readonly key: "ignoreUnmerged";
3006
+ readonly test: "active";
3007
+ };
3008
+ readonly others: readonly [{
3009
+ readonly key: "merge";
3010
+ readonly test: "active";
3011
+ }, {
3012
+ readonly key: "conflict";
3013
+ readonly test: "active";
3014
+ }];
3015
+ readonly origin: "git";
3016
+ readonly reason: "Git rejects --ignore-unmerged with --merge, which a conflict style implies.";
3017
+ readonly source: string;
2580
3018
  }];
2581
3019
  readonly clean: readonly [{
2582
3020
  readonly id: "clean.ignored-onlyIgnored";
@@ -3040,10 +3478,44 @@ declare const STRING_CALLBACKS: {
3040
3478
  readonly exact: readonly ["changes", "lines", "files", "noncumulative", "cumulative"];
3041
3479
  readonly source: "Git 2.25.1/2.55.0 diff.c:parse_dirstat_params/parse_dirstat_opt/diff_opt_dirstat; whole empty text/bare defaults accepted, nonempty comma fields must be exact words or ASCII digit-first decimal with at most one dot (trailing dot accepted). No trimming or range clamp. Invalid fields accumulate errors and cannot be repaired by later words; native fatal128. Keep raw argv and native cutoff arithmetic/rendering.";
3042
3480
  };
3481
+ readonly 'commit-fixup': {
3482
+ readonly kind: "alpha-prefix";
3483
+ readonly separator: ":";
3484
+ readonly allowed: readonly ["amend", "reword"];
3485
+ readonly source: "builtin/commit.c:parse_and_validate_options; a nonempty run of ASCII letters (git-compat-util/sane-ctype isalpha, which ignores the locale) directly followed by ':' names a suboption, which must be amend or reword; any other value is a commit name";
3486
+ };
3487
+ readonly 'rebase-apply-context': {
3488
+ readonly kind: "character-set";
3489
+ readonly characters: "0123456789";
3490
+ readonly source: "Git 2.55.0 builtin/rebase.c:cmd_rebase; every character after -C must be a decimal digit, and an empty value is accepted.";
3491
+ };
3492
+ readonly 'rebase-whitespace': {
3493
+ readonly kind: "choice";
3494
+ readonly exact: readonly ["nowarn", "warn", "error", "error-all", "fix", "strip"];
3495
+ readonly prefixes: readonly [];
3496
+ readonly allowEmpty: true;
3497
+ readonly source: "Git 2.55.0 builtin/rebase.c:cmd_rebase; --whitespace=fix and strip are matched first, then any nonempty value other than warn, nowarn, error and error-all is refused. An empty value passes cmd_rebase; git apply refuses it only when there are patches to apply.";
3498
+ };
3499
+ readonly 'rebase-trailer': {
3500
+ readonly kind: "text";
3501
+ readonly blank: "";
3502
+ readonly forbiddenFirst: "=";
3503
+ readonly forbidden: "";
3504
+ readonly source: "Git 2.55.0 trailer.c:validate_trailer_args/find_separator; an empty trailer and one whose first character is '=' are always refused. Other separators come from trailer.separators (default ':') and remain native.";
3505
+ };
3506
+ readonly 'rebase-exec': {
3507
+ readonly kind: "text";
3508
+ readonly blank: " \t\r\f\v";
3509
+ readonly forbiddenFirst: "";
3510
+ readonly forbidden: "\n";
3511
+ readonly source: "Git 2.55.0 builtin/rebase.c:check_exec_cmd; a command must not contain a newline and must not consist only of spaces, tabs, carriage returns, form feeds and vertical tabs.";
3512
+ };
3043
3513
  };
3044
3514
 
3045
3515
  type StringCallbackParser = keyof typeof STRING_CALLBACKS;
3046
3516
 
3517
+ type ConfigParameterParser = 'clone-config-parameters' | 'clone-config-remote-name';
3518
+
3047
3519
  /** Revision age uses uintmax seconds; old Git first converts an atoi signed int. */
3048
3520
  type GitTimestampParser = {
3049
3521
  kind: 'timestamp';
@@ -3054,7 +3526,9 @@ type GitTimestampParser = {
3054
3526
  /** Git initializes revision age filters to the timestamp_t all-ones sentinel. */
3055
3527
  declare const TIMESTAMP_DEFAULT = 18446744073709551615n;
3056
3528
 
3057
- type GitScalarParser = FastImportUnsignedParser | GitBooleanCallback | GitDecimalParser | GitTimestampParser | GitIntegerParser | 'blame-line-range' | 'python-int' | 'perl-int' | 'perl-int-gnu' | 'depth-initial' | 'object-filter' | 'object-filter-auto' | StringCallbackParser | 'shortlog-group' | CompoundDecimalParser | 'rev-list-missing' | 'abbrev' | 'mainline' | 'revision-count' | 'unsigned-int' | 'unsigned-size' | 'git-bool' | 'fetch-recurse' | 'push-recurse' | 'push-signed' | 'config-type';
3529
+ type PushRefspecParser = 'refspec-operands' | 'push-delete-operands' | 'refspec-words' | 'push-delete-refspecs' | 'fetch-refspec-operands' | 'fetch-refspec-words' | 'push-option-text' | 'remote-name';
3530
+
3531
+ type GitScalarParser = FastImportUnsignedParser | GitBooleanCallback | GitDecimalParser | GitTimestampParser | GitIntegerParser | 'blame-line-range' | 'log-line-range' | 'track-start-point' | 'python-int' | 'perl-int' | 'perl-int-gnu' | 'depth-initial' | 'object-filter' | 'object-filter-auto' | StringCallbackParser | 'shortlog-group' | CompoundDecimalParser | 'rev-list-missing' | 'abbrev' | 'mainline' | 'revision-count' | 'unsigned-int' | 'unsigned-size' | 'git-bool' | 'fetch-recurse' | 'push-recurse' | 'push-signed' | 'config-type' | 'branch-name' | 'refname-onelevel' | 'commit-author' | 'commit-date' | 'ref-format' | 'ref-sort-key' | PushRefspecParser | ConfigParameterParser;
3058
3532
 
3059
3533
  /** Declarative constraints: no Git processes, TypeScript compiler, or repository state. */
3060
3534
  type Evidence = {
@@ -3138,6 +3612,10 @@ type Constraint = Evidence & {
3138
3612
  kind: 'elements';
3139
3613
  key: string;
3140
3614
  allowed: readonly (string | number | boolean)[];
3615
+ /** How many items may lie outside `allowed` (default 0). */
3616
+ maxOutside?: number;
3617
+ /** An option check also counts this incoming value (`$value`) after the stored items. */
3618
+ withKey?: string;
3141
3619
  } | {
3142
3620
  kind: 'scalar';
3143
3621
  key: string;
@@ -3163,12 +3641,12 @@ type Constraint = Evidence & {
3163
3641
  allowBoolean?: boolean;
3164
3642
  });
3165
3643
 
3166
- type White$1 = ' ' | '\t' | '\r' | '\n' | '\v' | '\f';
3167
- type Digit$3 = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';
3644
+ type White$2 = ' ' | '\t' | '\r' | '\n' | '\v' | '\f';
3645
+ type Digit$5 = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';
3168
3646
  type Deferred$1 = {
3169
3647
  deferred: true;
3170
3648
  };
3171
- type Digits$2<S extends string, Negative extends boolean, Zero extends boolean = true, Seen extends boolean = false, N extends readonly unknown[] = []> = string extends S ? Deferred$1 : N['length'] extends 128 ? Deferred$1 : S extends `${infer C}${infer R}` ? C extends Digit$3 ? Digits$2<R, Negative, C extends '0' ? Zero : false, true, readonly [...N, 0]> : Seen extends true ? {
3649
+ type Digits$4<S extends string, Negative extends boolean, Zero extends boolean = true, Seen extends boolean = false, N extends readonly unknown[] = []> = string extends S ? Deferred$1 : N['length'] extends 128 ? Deferred$1 : S extends `${infer C}${infer R}` ? C extends Digit$5 ? Digits$4<R, Negative, C extends '0' ? Zero : false, true, readonly [...N, 0]> : Seen extends true ? {
3172
3650
  negative: Negative;
3173
3651
  zero: Zero;
3174
3652
  rest: S;
@@ -3181,14 +3659,14 @@ type Digits$2<S extends string, Negative extends boolean, Zero extends boolean =
3181
3659
  } : {
3182
3660
  none: true;
3183
3661
  };
3184
- type Prefix<S extends string, N extends readonly unknown[] = []> = string extends S ? Deferred$1 : N['length'] extends 128 ? Deferred$1 : S extends `${White$1}${infer R}` ? Prefix<R, readonly [...N, 0]> : S extends `-${infer R}` ? Digits$2<R, true> : S extends `+${infer R}` ? Digits$2<R, false> : Digits$2<S, false>;
3662
+ type Prefix<S extends string, N extends readonly unknown[] = []> = string extends S ? Deferred$1 : N['length'] extends 128 ? Deferred$1 : S extends `${White$2}${infer R}` ? Prefix<R, readonly [...N, 0]> : S extends `-${infer R}` ? Digits$4<R, true> : S extends `+${infer R}` ? Digits$4<R, false> : Digits$4<S, false>;
3185
3663
  type End<P, Relative extends boolean> = P extends {
3186
3664
  zero: true;
3187
3665
  } ? false : Relative extends false ? P extends {
3188
3666
  negative: true;
3189
3667
  } ? false : true : true;
3190
3668
  type Tail<S extends string> = S extends `,${infer E}` ? E extends `+${infer R}` | `-${infer R}` ? End<Prefix<R>, true> : End<Prefix<E>, false> : true;
3191
- type Parsed$4<S extends string> = string extends S ? true : `${number}` extends S ? true : `${bigint}` extends S ? true : Prefix<S> extends infer P ? P extends {
3669
+ type Parsed$6<S extends string> = string extends S ? true : `${number}` extends S ? true : `${bigint}` extends S ? true : Prefix<S> extends infer P ? P extends {
3192
3670
  deferred: true;
3193
3671
  } ? true : P extends {
3194
3672
  negative: true;
@@ -3198,7 +3676,22 @@ type Parsed$4<S extends string> = string extends S ? true : `${number}` extends
3198
3676
  rest: infer R extends string;
3199
3677
  } ? Tail<R> : Tail<S> : true;
3200
3678
  /** Reject every known invalid alternative; dynamic or compiler-budget-exceeding text defers to Git. */
3201
- type BlameLineRangeLiteral<V> = [V] extends [string] ? false extends (V extends string ? Parsed$4<V> : false) ? false : true : false;
3679
+ type BlameLineRangeLiteral<V> = [V] extends [string] ? false extends (V extends string ? Parsed$6<V> : false) ? false : true : false;
3680
+
3681
+ /** Type-level mirror of commit-ident.ts:validCommitAuthor for literal --author values. */
3682
+ type Crud = '\x00' | '\x01' | '\x02' | '\x03' | '\x04' | '\x05' | '\x06' | '\x07' | '\x08' | '\x09' | '\x0a' | '\x0b' | '\x0c' | '\x0d' | '\x0e' | '\x0f' | '\x10' | '\x11' | '\x12' | '\x13' | '\x14' | '\x15' | '\x16' | '\x17' | '\x18' | '\x19' | '\x1a' | '\x1b' | '\x1c' | '\x1d' | '\x1e' | '\x1f' | ' ' | ',' | ':' | ';' | '<' | '>' | '"' | '\\' | "'";
3683
+ /** Whether the name text before '<' has a character that ident.c does not strip as crud. */
3684
+ type HasNonCrud<S extends string> = S extends `${infer C}${infer R}` ? C extends Crud ? HasNonCrud<R> : true : false;
3685
+ /** `true` unless a literal --author value is refused by split_ident_line or fmt_ident. */
3686
+ type CommitAuthorLiteral<V> = V extends string ? string extends V ? true : V extends `${string}>${string}` ? V extends `${infer Name}<${infer Rest}` ? Rest extends `${string}>${string}` ? HasNonCrud<Name> : false : false : true : false;
3687
+
3688
+ /** The key of a literal parameter: the text before its first '='. */
3689
+ type ParameterKey<P> = P extends `${infer K}=${string}` ? K : P;
3690
+ /** Certain key refusals (no section or variable name); finer key grammar stays runtime. */
3691
+ type KeyInvalid<K> = string extends K ? false : K extends '' ? true : K extends `${string}.${string}` ? K extends `${string}.` ? true : K extends `.${infer R}` ? R extends `${string}.${string}` ? false : true : false : true;
3692
+ type ListInvalid<V> = V extends string ? KeyInvalid<ParameterKey<V>> : V extends readonly (infer E)[] ? true extends ListInvalid<E> ? true : false : false;
3693
+ /** Whether a literal value passes the selected config parameter parser. */
3694
+ type ConfigParameterLiteral<V, P extends ConfigParameterParser> = P extends 'clone-config-parameters' ? (ListInvalid<V> extends true ? false : true) : true;
3202
3695
 
3203
3696
  type IntegerProducts = {
3204
3697
  '2': {
@@ -5044,8 +5537,8 @@ type UrlBytes = {
5044
5537
  };
5045
5538
  type ReservedControl = '\u0000' | '\u0001' | '\u0002' | '\u0003' | '\u0004' | '\u0005' | '\u0006' | '\u0007' | '\b' | '\t' | '\n' | '\u000b' | '\f' | '\r' | '\u000e' | '\u000f' | '\u0010' | '\u0011' | '\u0012' | '\u0013' | '\u0014' | '\u0015' | '\u0016' | '\u0017' | '\u0018' | '\u0019' | '\u001a' | '\u001b' | '\u001c' | '\u001d' | '\u001e' | '\u001f' | ' ';
5046
5539
 
5047
- type Digit$2 = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';
5048
- type HexDigit = Digit$2 | 'a' | 'b' | 'c' | 'd' | 'e' | 'f';
5540
+ type Digit$4 = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';
5541
+ type HexDigit$1 = Digit$4 | 'a' | 'b' | 'c' | 'd' | 'e' | 'f';
5049
5542
  type DigitIndex = {
5050
5543
  '0': 0;
5051
5544
  '1': 1;
@@ -5067,42 +5560,42 @@ type DigitIndex = {
5067
5560
  type Base = 2 | 8 | 10 | 16;
5068
5561
  type Strip$2<S extends string> = S extends `0${infer R}` ? Strip$2<R> : S extends '' ? '0' : S;
5069
5562
  type Reverse$1<S extends string, R extends string = ''> = S extends `${infer H}${infer T}` ? Reverse$1<T, `${H}${R}`> : R;
5070
- type Multiply<S extends string, B extends Base, C extends string, R extends string = ''> = S extends `${infer H extends Digit$2}${infer T}` ? IntegerProducts[`${B}`][H][C extends `${infer N extends number}` ? N : never] extends readonly [
5563
+ type Multiply<S extends string, B extends Base, C extends string, R extends string = ''> = S extends `${infer H extends Digit$4}${infer T}` ? IntegerProducts[`${B}`][H][C extends `${infer N extends number}` ? N : never] extends readonly [
5071
5564
  infer Carry extends string,
5072
5565
  infer D extends string
5073
5566
  ] ? Multiply<T, B, Carry, `${D}${R}`> : never : Strip$2<`${C}${R}`>;
5074
- type AddDigit<S extends string, B extends Base, D extends HexDigit> = Multiply<Reverse$1<S>, B, `${DigitIndex[D]}`>;
5075
- type Permitted<B extends Base> = B extends 2 ? '0' | '1' : B extends 8 ? Exclude<Digit$2, '8' | '9'> : B extends 10 ? Digit$2 : HexDigit;
5567
+ type AddDigit<S extends string, B extends Base, D extends HexDigit$1> = Multiply<Reverse$1<S>, B, `${DigitIndex[D]}`>;
5568
+ type Permitted<B extends Base> = B extends 2 ? '0' | '1' : B extends 8 ? Exclude<Digit$4, '8' | '9'> : B extends 10 ? Digit$4 : HexDigit$1;
5076
5569
  type Unit$1<S extends string> = S extends 'k' ? '0000000000' : S extends 'm' ? '00000000000000000000' : S extends 'g' ? '000000000000000000000000000000' : '';
5077
5570
  type Scale<S extends string, U extends string> = U extends `0${infer R}` ? Scale<AddDigit<S, 2, '0'>, R> : S;
5078
- type Ascii$1 = UrlBytes[Extract<keyof UrlBytes, `${'0' | '1' | '2' | '3' | '4' | '5' | '6' | '7'}${HexDigit}`>];
5571
+ type Ascii$1 = UrlBytes[Extract<keyof UrlBytes, `${'0' | '1' | '2' | '3' | '4' | '5' | '6' | '7'}${HexDigit$1}`>];
5079
5572
  type SignificantOverflow<S extends string> = SignificantTailOverflow<ZeroNormalized<S>, []>;
5080
- type SignificantTailOverflow<S extends string, Steps extends unknown[]> = S extends `${infer H}${infer R}` ? H extends HexDigit | Uppercase<HexDigit> ? Steps['length'] extends 64 ? true : SignificantTailOverflow<R, [...Steps, 0]> : false : false;
5081
- type Digits$1<S extends string, B extends Base> = S extends `${infer R}${'k' | 'K' | 'm' | 'M' | 'g' | 'G'}` ? CheckedDigits<R, B> extends 'invalid' ? 'invalid' : ConvertDigits<ZeroNormalized<S>, B> : CheckedDigits<S, B> extends 'invalid' ? 'invalid' : ConvertDigits<ZeroNormalized<S>, B>;
5573
+ type SignificantTailOverflow<S extends string, Steps extends unknown[]> = S extends `${infer H}${infer R}` ? H extends HexDigit$1 | Uppercase<HexDigit$1> ? Steps['length'] extends 64 ? true : SignificantTailOverflow<R, [...Steps, 0]> : false : false;
5574
+ type Digits$3<S extends string, B extends Base> = S extends `${infer R}${'k' | 'K' | 'm' | 'M' | 'g' | 'G'}` ? CheckedDigits<R, B> extends 'invalid' ? 'invalid' : ConvertDigits<ZeroNormalized<S>, B> : CheckedDigits<S, B> extends 'invalid' ? 'invalid' : ConvertDigits<ZeroNormalized<S>, B>;
5082
5575
  type ZeroNormalized<S extends string, Steps extends unknown[] = []> = Steps['length'] extends 128 ? string : S extends `0000000000000000${infer R}` ? R extends '' | 'k' | 'K' | 'm' | 'M' | 'g' | 'G' ? `0${R}` : ZeroNormalized<R, [...Steps, 0]> : S extends `0${infer R}` ? R extends '' | 'k' | 'K' | 'm' | 'M' | 'g' | 'G' ? S : ZeroNormalized<R, [...Steps, 0]> : S;
5083
5576
  type CheckedDigits<S extends string, B extends Base> = S extends `${infer H}${string}` ? {} extends Record<H, unknown> ? 'valid' : KnownDigits<S, B> : KnownDigits<S, B>;
5084
5577
  type KnownDigits<S extends string, B extends Base> = S extends `${string}${Exclude<Ascii$1, Permitted<B> | Uppercase<Permitted<B>>>}${string}` ? 'invalid' : SignificantOverflow<S> extends true ? 'invalid' : 'valid';
5085
5578
  type ConvertDigits<S extends string, B extends Base, A extends string = '0', Seen extends boolean = false, Steps extends unknown[] = []> = string extends S ? 'dynamic' : Steps['length'] extends 128 ? 'dynamic' : S extends '' ? Seen extends true ? A : 'invalid' : S extends 'k' | 'K' | 'm' | 'M' | 'g' | 'G' ? Seen extends true ? Scale<A, Unit$1<Lowercase<S>>> : 'invalid' : S extends `${infer H}${infer R}` ? Lowercase<H> extends Permitted<B> ? ConvertDigits<R, B, AddDigit<A, B, Lowercase<H>>, true, [...Steps, 0]> : `${number}` extends H ? 'dynamic' : `${bigint}` extends H ? 'dynamic' : 'invalid' : 'dynamic';
5086
- type Magnitude$3<S extends string> = S extends `0${'x' | 'X'}${infer R}` ? Digits$1<R, 16> : S extends `0${'b' | 'B'}${infer R}` ? Digits$1<R, 2> : S extends `0${string}` ? Digits$1<S, 8> : Digits$1<S, 10>;
5579
+ type Magnitude$3<S extends string> = S extends `0${'x' | 'X'}${infer R}` ? Digits$3<R, 16> : S extends `0${'b' | 'B'}${infer R}` ? Digits$3<R, 2> : S extends `0${string}` ? Digits$3<S, 8> : Digits$3<S, 10>;
5087
5580
  type CWhitespace = ' ' | '\t' | '\r' | '\n' | '\v' | '\f';
5088
5581
  type TrimBlock<S extends string, Steps extends unknown[] = []> = Steps['length'] extends 16 ? S : S extends `${CWhitespace}${infer R}` ? TrimBlock<R, [...Steps, 0]> : S;
5089
5582
  type Trim$2<S extends string, Steps extends unknown[] = []> = Steps['length'] extends 128 ? string : TrimBlock<S> extends infer R extends string ? R extends S ? R : Trim$2<R, [...Steps, 0]> : S;
5090
5583
  type Shorter<A extends string, B extends string> = A extends `${string}${infer LeftRest}` ? B extends `${string}${infer RightRest}` ? Shorter<LeftRest, RightRest> : false : B extends '' ? 'equal' : true;
5091
- type SmallerDigit<A extends Digit$2, B extends Digit$2> = '0123456789' extends `${string}${A}${string}${B}${string}` ? true : false;
5092
- type Lexical$2<A extends string, B extends string> = A extends `${infer H extends Digit$2}${infer R}` ? B extends `${infer J extends Digit$2}${infer T}` ? H extends J ? Lexical$2<R, T> : SmallerDigit<H, J> : false : true;
5584
+ type SmallerDigit<A extends Digit$4, B extends Digit$4> = '0123456789' extends `${string}${A}${string}${B}${string}` ? true : false;
5585
+ type Lexical$2<A extends string, B extends string> = A extends `${infer H extends Digit$4}${infer R}` ? B extends `${infer J extends Digit$4}${infer T}` ? H extends J ? Lexical$2<R, T> : SmallerDigit<H, J> : false : true;
5093
5586
  type AtMost$1<A extends string, B extends string> = Shorter<A, B> extends 'equal' ? Lexical$2<A, B> : Shorter<A, B>;
5094
5587
  type Bounded$1<S extends string, Negative extends boolean, P extends GitIntegerParser> = S extends 'invalid' | 'dynamic' ? S : AtMost$1<S, IntegerLimits[`${P['bits']}`][P['signed'] extends true ? Negative extends true ? 'negative' : 'signed' : 'unsigned']> extends true ? Negative extends true ? S extends '0' ? '0' : `-${S}` : S : 'invalid';
5095
5588
  type Signed$2<S extends string, P extends GitIntegerParser> = string extends S ? 'dynamic' : S extends `-${infer R}` ? P['signed'] extends false ? 'invalid' : Bounded$1<Magnitude$3<R>, true, P> : Bounded$1<Magnitude$3<S extends `+${infer R}` ? R : S>, false, P>;
5096
5589
  type ModernParsed<V, P extends GitIntegerParser> = V extends string | number | bigint ? string extends V ? 'dynamic' : number extends V ? 'dynamic' : bigint extends V ? 'dynamic' : V extends number ? P extends {
5097
5590
  numberRepresentation: 'argv';
5098
5591
  } ? Signed$2<Trim$2<`${V}`>, P> : AtMost$1<`${V}` extends `-${infer R}` ? R : `${V}`, '9007199254740991'> extends true ? Signed$2<Trim$2<`${V}`>, P> : 'invalid' : Signed$2<Trim$2<`${V}`>, P> : V extends undefined ? 'dynamic' : 'invalid';
5099
- type LegacyDigits<S extends string, A extends string = '', Steps extends unknown[] = []> = string extends S ? 'dynamic' : S extends object ? 'dynamic' : {} extends Record<S, unknown> ? 'dynamic' : Steps['length'] extends 128 ? 'dynamic' : S extends '' ? A extends '' ? 'invalid' : Strip$2<A> : S extends `${infer H extends Digit$2}${infer Rest}` ? LegacyDigits<Rest, `${A}${H}`, [...Steps, 0]> : 'invalid';
5592
+ type LegacyDigits<S extends string, A extends string = '', Steps extends unknown[] = []> = string extends S ? 'dynamic' : S extends object ? 'dynamic' : {} extends Record<S, unknown> ? 'dynamic' : Steps['length'] extends 128 ? 'dynamic' : S extends '' ? A extends '' ? 'invalid' : Strip$2<A> : S extends `${infer H extends Digit$4}${infer Rest}` ? LegacyDigits<Rest, `${A}${H}`, [...Steps, 0]> : 'invalid';
5100
5593
  type LegacyNormalized<S extends string, Negative extends boolean, P extends GitIntegerParser> = S extends 'invalid' | 'dynamic' ? S : Negative extends true ? S extends '0' ? '0' : P['signed'] extends false ? 'dynamic' : Bounded$1<S, true, P> extends infer V ? V extends 'invalid' ? 'dynamic' : V : never : Bounded$1<S, false, P> extends infer V ? V extends 'invalid' ? 'dynamic' : V : never;
5101
5594
  type LegacySigned<S extends string, P extends GitIntegerParser> = string extends S ? 'dynamic' : S extends `-${infer R}` ? LegacyNormalized<LegacyDigits<R>, true, P> : LegacyNormalized<LegacyDigits<S extends `+${infer R}` ? R : S>, false, P>;
5102
5595
  type LegacyParsed<V, P extends GitIntegerParser> = V extends string | number | bigint ? string extends V ? 'dynamic' : number extends V ? 'dynamic' : bigint extends V ? 'dynamic' : V extends object ? 'dynamic' : V extends number ? AtMost$1<`${V}` extends `-${infer R}` ? R : `${V}`, '9007199254740991'> extends true ? LegacySigned<Trim$2<`${V}`>, P> : 'invalid' : LegacySigned<Trim$2<`${V}`>, P> : V extends undefined ? 'dynamic' : 'invalid';
5103
5596
  type DigitTuple<N extends number, A extends unknown[] = []> = A['length'] extends N ? A : DigitTuple<N, [...A, 0]>;
5104
- type SubDigit<A extends Digit$2, B extends Digit$2, Borrow extends 0 | 1, Right extends unknown[] = [...DigitTuple<DigitIndex[B]>, ...DigitTuple<Borrow>]> = DigitTuple<DigitIndex[A]> extends [...Right, ...infer Rest] ? [`${Rest['length']}` & Digit$2, 0] : [...DigitTuple<10>, ...DigitTuple<DigitIndex[A]>] extends [...Right, ...infer Rest] ? [`${Rest['length']}` & Digit$2, 1] : never;
5105
- type SubDigits<A extends string, B extends string, Borrow extends 0 | 1 = 0, Out extends string = ''> = A extends `${infer H extends Digit$2}${infer Rest}` ? B extends `${infer J extends Digit$2}${infer Tail}` ? SubDigit<H, J, Borrow> extends [infer D extends Digit$2, infer Next extends 0 | 1] ? SubDigits<Rest, Tail, Next, `${D}${Out}`> : never : SubDigit<H, '0', Borrow> extends [infer D extends Digit$2, infer Next extends 0 | 1] ? SubDigits<Rest, '', Next, `${D}${Out}`> : never : Strip$2<Out>;
5597
+ type SubDigit<A extends Digit$4, B extends Digit$4, Borrow extends 0 | 1, Right extends unknown[] = [...DigitTuple<DigitIndex[B]>, ...DigitTuple<Borrow>]> = DigitTuple<DigitIndex[A]> extends [...Right, ...infer Rest] ? [`${Rest['length']}` & Digit$4, 0] : [...DigitTuple<10>, ...DigitTuple<DigitIndex[A]>] extends [...Right, ...infer Rest] ? [`${Rest['length']}` & Digit$4, 1] : never;
5598
+ type SubDigits<A extends string, B extends string, Borrow extends 0 | 1 = 0, Out extends string = ''> = A extends `${infer H extends Digit$4}${infer Rest}` ? B extends `${infer J extends Digit$4}${infer Tail}` ? SubDigit<H, J, Borrow> extends [infer D extends Digit$4, infer Next extends 0 | 1] ? SubDigits<Rest, Tail, Next, `${D}${Out}`> : never : SubDigit<H, '0', Borrow> extends [infer D extends Digit$4, infer Next extends 0 | 1] ? SubDigits<Rest, '', Next, `${D}${Out}`> : never : Strip$2<Out>;
5106
5599
  type NegateUintmax<S extends string> = S extends '0' ? '0' : S extends '1' ? '18446744073709551615' : SubDigits<'61615590737044764481', Reverse$1<S>>;
5107
5600
  type NegativeMagnitude<B extends string, U extends string, P extends GitIntegerParser, M = B extends `${string}${'k' | 'K' | 'm' | 'M' | 'g' | 'G'}` ? 'invalid' : Magnitude$3<B>> = M extends 'invalid' | 'dynamic' ? M : M extends string ? AtMost$1<M, '18446744073709551615'> extends true ? Bounded$1<Scale<NegateUintmax<M>, U>, false, P> : 'invalid' : 'invalid';
5108
5601
  type SignedMagnitude<S extends string, P extends GitIntegerParser> = S extends 'k' | 'K' | 'm' | 'M' | 'g' | 'G' ? '0' : Trim$2<S> extends infer T extends string ? string extends T ? 'dynamic' : T extends `-${infer R}` ? R extends `${infer B}${'k' | 'K'}` ? NegativeMagnitude<B, Unit$1<'k'>, P> : R extends `${infer B}${'m' | 'M'}` ? NegativeMagnitude<B, Unit$1<'m'>, P> : R extends `${infer B}${'g' | 'G'}` ? NegativeMagnitude<B, Unit$1<'g'>, P> : NegativeMagnitude<R, '', P> : ModernParsed<S, P> : 'invalid';
@@ -5113,17 +5606,17 @@ type NonDecimalParsed<V, P extends GitIntegerParser> = P extends {
5113
5606
  negativeMagnitudes: true;
5114
5607
  signed: false;
5115
5608
  } ? MagnitudeParsed<V, P> : ModernParsed<V, P>;
5116
- type Parsed$3<V, P extends GitIntegerParser> = P extends {
5609
+ type Parsed$5<V, P extends GitIntegerParser> = P extends {
5117
5610
  integerProfile: 'decimal-cast';
5118
5611
  bits: 32;
5119
5612
  } ? P extends {
5120
5613
  nativeWidth: string;
5121
5614
  } ? NonDecimalParsed<V, P> : LegacyParsed<V, P> : NonDecimalParsed<V, P>;
5122
- type GitIntegerLiteral<V, P extends GitIntegerParser> = Extract<Parsed$3<V, P>, 'invalid'> extends never ? true : false;
5615
+ type GitIntegerLiteral<V, P extends GitIntegerParser> = Extract<Parsed$5<V, P>, 'invalid'> extends never ? true : false;
5123
5616
  type State<S extends string> = S extends 'dynamic' ? number | bigint : S extends 'invalid' ? never : AtMost$1<S extends `-${infer R}` ? R : S, '9007199254740991'> extends true ? S extends `${infer N extends number}` ? N : never : S extends `${infer N extends bigint}` ? N : never;
5124
- type GitIntegerValue<V, P extends GitIntegerParser> = State<Parsed$3<V, P>>;
5617
+ type GitIntegerValue<V, P extends GitIntegerParser> = State<Parsed$5<V, P>>;
5125
5618
 
5126
- type Digit$1 = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';
5619
+ type Digit$3 = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';
5127
5620
  type Reverse<S extends string, A extends string = ''> = S extends `${infer H}${infer R}` ? Reverse<R, `${H}${A}`> : A;
5128
5621
  type Strip$1<S extends string> = S extends `0${infer R}` ? Strip$1<R> : S extends '' ? '0' : S;
5129
5622
  type Parts<S extends string> = S extends `${infer W}.${infer F}` ? {
@@ -5152,8 +5645,8 @@ type Expand<S extends string> = S extends `${infer C}e${infer E}` ? Parts<C> ext
5152
5645
  fraction: F;
5153
5646
  } : 'dynamic';
5154
5647
  type LengthOrder<A extends string, B extends string> = A extends `${infer _H}${infer R}` ? B extends `${infer _J}${infer T}` ? LengthOrder<R, T> : 1 : B extends '' ? 0 : -1;
5155
- type DigitOrder<A extends Digit$1, B extends Digit$1> = A extends B ? 0 : '0123456789' extends `${string}${A}${string}${B}${string}` ? -1 : 1;
5156
- type Lexical$1<A extends string, B extends string> = A extends `${infer H extends Digit$1}${infer R}` ? B extends `${infer J extends Digit$1}${infer T}` ? DigitOrder<H, J> extends infer O ? O extends 0 ? Lexical$1<R, T> : O : never : Lexical$1<A, '0'> : B extends '' ? 0 : Lexical$1<'0', B>;
5648
+ type DigitOrder$1<A extends Digit$3, B extends Digit$3> = A extends B ? 0 : '0123456789' extends `${string}${A}${string}${B}${string}` ? -1 : 1;
5649
+ type Lexical$1<A extends string, B extends string> = A extends `${infer H extends Digit$3}${infer R}` ? B extends `${infer J extends Digit$3}${infer T}` ? DigitOrder$1<H, J> extends infer O ? O extends 0 ? Lexical$1<R, T> : O : never : Lexical$1<A, '0'> : B extends '' ? 0 : Lexical$1<'0', B>;
5157
5650
  type Magnitude$2<A extends string, B extends string> = Expand<A> extends infer X ? Expand<B> extends infer Y ? X extends {
5158
5651
  whole: infer W extends string;
5159
5652
  fraction: infer F extends string;
@@ -5161,7 +5654,7 @@ type Magnitude$2<A extends string, B extends string> = Expand<A> extends infer X
5161
5654
  whole: infer V extends string;
5162
5655
  fraction: infer G extends string;
5163
5656
  } ? LengthOrder<W, V> extends infer L ? L extends 0 ? Lexical$1<W, V> extends infer O ? O extends 0 ? Lexical$1<F, G> : O : never : L : never : 'dynamic' : 'dynamic' : never : never;
5164
- type KnownNumberText<S extends string, N extends unknown[] = []> = S extends 'Infinity' | '-Infinity' ? true : N['length'] extends 64 ? false : S extends '' ? true : S extends `${infer H}${infer R}` ? H extends Digit$1 | '.' | 'e' | '+' | '-' ? KnownNumberText<R, [...N, 0]> : false : false;
5657
+ type KnownNumberText<S extends string, N extends unknown[] = []> = S extends 'Infinity' | '-Infinity' ? true : N['length'] extends 64 ? false : S extends '' ? true : S extends `${infer H}${infer R}` ? H extends Digit$3 | '.' | 'e' | '+' | '-' ? KnownNumberText<R, [...N, 0]> : false : false;
5165
5658
  type KnownNumber<V extends number> = number extends V ? false : KnownNumberText<`${V}`>;
5166
5659
  type Opposite<O> = O extends -1 ? 1 : O extends 1 ? -1 : O;
5167
5660
  type NumberLiteralOrder<A extends number, B extends number> = KnownNumber<A> extends false ? 'dynamic' : KnownNumber<B> extends false ? 'dynamic' : `${A}` extends 'Infinity' ? `${B}` extends 'Infinity' ? 0 : 1 : `${A}` extends '-Infinity' ? `${B}` extends '-Infinity' ? 0 : -1 : `${B}` extends 'Infinity' ? -1 : `${B}` extends '-Infinity' ? 1 : A extends B ? 0 : A extends 0 ? `${B}` extends `-${string}` ? 1 : -1 : B extends 0 ? `${A}` extends `-${string}` ? -1 : 1 : `${A}` extends `-${infer X}` ? `${B}` extends `-${infer Y}` ? Opposite<Magnitude$2<X, Y>> : -1 : `${B}` extends `-${string}` ? 1 : Magnitude$2<`${A}`, `${B}`>;
@@ -5174,19 +5667,19 @@ type NumberAtMost<V, M extends number> = V extends number ? NumberLiteralOrder<V
5174
5667
  /** Mirrors Number.isSafeInteger, preserving absent values and optional booleans. */
5175
5668
  type SafeIntegerAtLeast<V, M extends number, AllowBoolean extends boolean> = V extends undefined ? V : V extends boolean ? AllowBoolean extends true ? V : never : V extends number ? KnownNumber<V> extends false ? V : `${V}` extends `${bigint}` ? NumberLiteralOrder<V, -9007199254740991> extends -1 ? never : NumberLiteralOrder<V, 9007199254740991> extends 1 ? never : NumberAtLeast<V, M> : never : never;
5176
5669
 
5177
- type SubtractDigits$1<A extends string, B extends string, Borrow extends '0' | '1' = '0', Result extends string = ''> = A extends `${infer H extends Digit$2}${infer R}` ? B extends `${infer J extends Digit$2}${infer T}` ? IntegerDifferences[H][J][Borrow extends '0' ? 0 : 1] extends [
5670
+ type SubtractDigits$1<A extends string, B extends string, Borrow extends '0' | '1' = '0', Result extends string = ''> = A extends `${infer H extends Digit$4}${infer R}` ? B extends `${infer J extends Digit$4}${infer T}` ? IntegerDifferences[H][J][Borrow extends '0' ? 0 : 1] extends [
5178
5671
  infer Carry extends '0' | '1',
5179
5672
  infer D extends string
5180
5673
  ] ? SubtractDigits$1<R, T, Carry, `${D}${Result}`> : never : SubtractDigits$1<A, '0', Borrow, Result> : Strip$2<Result>;
5181
5674
  type Subtract$1<A extends string, B extends string> = SubtractDigits$1<Reverse$1<A>, Reverse$1<B>>;
5182
5675
  type Reduce<S extends string> = AtMost$1<S, '4294967295'> extends true ? S : Reduce<Subtract$1<S, '4294967296'>>;
5183
- type Modulo<S extends string, Acc extends string = '0'> = S extends `${infer H extends Digit$2}${infer R}` ? Modulo<R, Reduce<AddDigit<Acc, 10, H>>> : Acc;
5676
+ type Modulo<S extends string, Acc extends string = '0'> = S extends `${infer H extends Digit$4}${infer R}` ? Modulo<R, Reduce<AddDigit<Acc, 10, H>>> : Acc;
5184
5677
  type Unsigned$1<M extends string, Negative extends boolean> = Modulo<M> extends infer U extends string ? Negative extends true ? U extends '0' ? '0' : Subtract$1<'4294967296', U> : U : never;
5185
5678
  type Narrow<M extends string, Negative extends boolean, IsSigned extends boolean> = Unsigned$1<M, Negative> extends infer U extends string ? IsSigned extends true ? AtMost$1<U, '2147483647'> extends true ? U : `-${Subtract$1<'4294967296', U>}` : U : never;
5186
5679
  type Clamp<M extends string, Negative extends boolean, Bits extends 32 | 64> = AtMost$1<M, Bits extends 32 ? Negative extends true ? '2147483648' : '2147483647' : Negative extends true ? '9223372036854775808' : '9223372036854775807'> extends true ? M : Negative extends true ? Bits extends 32 ? '2147483648' : '9223372036854775808' : Bits extends 32 ? '2147483647' : '9223372036854775807';
5187
5680
  /** Selected C unsigned long conversion, including overflow saturation before negation. */
5188
5681
  type UnsignedLong<M extends string, Negative extends boolean, Bits extends 32 | 64, NegateOverflow extends boolean> = AtMost$1<M, Bits extends 32 ? '4294967295' : '18446744073709551615'> extends true ? Negative extends true ? M extends '0' ? '0' : Subtract$1<Bits extends 32 ? '4294967296' : '18446744073709551616', M> : M : Negative extends true ? NegateOverflow extends true ? '1' : Bits extends 32 ? '4294967295' : '18446744073709551615' : Bits extends 32 ? '4294967295' : '18446744073709551615';
5189
- type Decimal$1<S extends string, Steps extends unknown[] = []> = string extends S ? 'dynamic' : Steps['length'] extends 128 ? 'dynamic' : S extends '' ? true : S extends `${infer H}${infer R}` ? H extends Digit$2 ? Decimal$1<R, [...Steps, 0]> : `${number}` extends H ? 'dynamic' : `${bigint}` extends H ? 'dynamic' : false : 'dynamic';
5682
+ type Decimal$1<S extends string, Steps extends unknown[] = []> = string extends S ? 'dynamic' : Steps['length'] extends 128 ? 'dynamic' : S extends '' ? true : S extends `${infer H}${infer R}` ? H extends Digit$4 ? Decimal$1<R, [...Steps, 0]> : `${number}` extends H ? 'dynamic' : `${bigint}` extends H ? 'dynamic' : false : 'dynamic';
5190
5683
  type After<S extends string, P extends GitDecimalParser> = P extends {
5191
5684
  clampNegativeToZero: true;
5192
5685
  } ? S extends `-${string}` ? '0' : S : P extends {
@@ -5204,23 +5697,23 @@ type Convert<M extends string, Negative extends boolean, P extends GitDecimalPar
5204
5697
  type Converted<M extends string, Negative extends boolean, P extends GitDecimalParser> = P['conversion'] extends 'checked' ? AtMost$1<M, P['signed'] extends true ? Negative extends true ? '2147483648' : '2147483647' : '4294967295'> extends true ? P['signed'] extends false ? Negative extends true ? M extends '0' ? After<'0', P> : 'invalid' : After<M, P> : After<Negative extends true ? (M extends '0' ? '0' : `-${M}`) : M, P> : 'invalid' : After<Narrow<Clamp<M, Negative, P['longBits']>, Negative, P['signed']>, P>;
5205
5698
  type Magnitude$1<S extends string, Negative extends boolean, P extends GitDecimalParser> = S extends '' ? 'invalid' : Decimal$1<S> extends true ? Convert<Strip$2<S>, Negative, P> : Decimal$1<S> extends false ? 'invalid' : 'dynamic';
5206
5699
  /** atoi accepts a decimal prefix and returns zero when there is no conversion. */
5207
- type DecimalPrefix<S extends string, Result extends string = '', Steps extends unknown[] = []> = string extends S ? 'dynamic' : Steps['length'] extends 128 ? 'dynamic' : S extends `${infer H}${infer R}` ? H extends Digit$2 ? DecimalPrefix<R, `${Result}${H}`, [...Steps, 0]> : Result extends '' ? '0' : Result : Result extends '' ? '0' : Result;
5700
+ type DecimalPrefix<S extends string, Result extends string = '', Steps extends unknown[] = []> = string extends S ? 'dynamic' : Steps['length'] extends 128 ? 'dynamic' : S extends `${infer H}${infer R}` ? H extends Digit$4 ? DecimalPrefix<R, `${Result}${H}`, [...Steps, 0]> : Result extends '' ? '0' : Result : Result extends '' ? '0' : Result;
5208
5701
  /** Stop as soon as a decimal prefix certainly saturates strtol; skip long zero runs. */
5209
5702
  type PrefixCast<S extends string, Negative extends boolean, P extends GitDecimalParser, Acc extends string = '0', Steps extends unknown[] = []> = AtMost$1<Acc, P['longBits'] extends 32 ? Negative extends true ? '2147483648' : '2147483647' : Negative extends true ? '9223372036854775808' : '9223372036854775807'> extends false ? Converted<Acc, Negative, P> : string extends S ? 'dynamic' : Steps['length'] extends 128 ? 'dynamic' : Acc extends '0' ? S extends `0000000000000000${infer Rest}` ? PrefixCast<Rest, Negative, P, Acc, [...Steps, 0]> : PrefixCastDigit<S, Negative, P, Acc, Steps> : PrefixCastDigit<S, Negative, P, Acc, Steps>;
5210
- type PrefixCastDigit<S extends string, Negative extends boolean, P extends GitDecimalParser, Acc extends string, Steps extends unknown[]> = S extends `${infer H}${infer R}` ? H extends Digit$2 ? PrefixCast<R, Negative, P, Strip$2<`${Acc}${H}`>, [...Steps, 0]> : `${number}` extends H ? 'dynamic' : `${bigint}` extends H ? 'dynamic' : Converted<Acc, Negative, P> : Converted<Acc, Negative, P>;
5703
+ type PrefixCastDigit<S extends string, Negative extends boolean, P extends GitDecimalParser, Acc extends string, Steps extends unknown[]> = S extends `${infer H}${infer R}` ? H extends Digit$4 ? PrefixCast<R, Negative, P, Strip$2<`${Acc}${H}`>, [...Steps, 0]> : `${number}` extends H ? 'dynamic' : `${bigint}` extends H ? 'dynamic' : Converted<Acc, Negative, P> : Converted<Acc, Negative, P>;
5211
5704
  type SignedDigits<S extends string, Negative extends boolean, P extends GitDecimalParser> = P['conversion'] extends 'prefix-cast' ? PrefixCast<S, Negative, P> : P['conversion'] extends 'atoi' ? DecimalPrefix<S> extends infer M extends string ? M extends 'dynamic' ? 'dynamic' : Converted<Strip$2<M>, Negative, P> : never : Magnitude$1<S, Negative, P>;
5212
5705
  type Signed$1<S extends string, P extends GitDecimalParser> = string extends S ? 'dynamic' : S extends `-${infer R}` ? P extends {
5213
5706
  rejectMinus: true;
5214
5707
  } ? 'invalid' : SignedDigits<R, true, P> : SignedDigits<S extends `+${infer R}` ? R : S, false, P>;
5215
- type Parsed$2<V, P extends GitDecimalParser> = V extends true ? P extends {
5708
+ type Parsed$4<V, P extends GitDecimalParser> = V extends true ? P extends {
5216
5709
  default: string;
5217
5710
  } ? 'default' : 'invalid' : V extends undefined ? 'dynamic' : V extends string | number | bigint ? V extends `${string}\0${string}` ? 'invalid' : V extends object ? 'dynamic' : string extends V ? 'dynamic' : `${number}` extends V ? 'dynamic' : `${bigint}` extends V ? 'dynamic' : number extends V ? 'dynamic' : bigint extends V ? 'dynamic' : V extends '' ? P extends {
5218
5711
  empty: true;
5219
5712
  } ? After<'0', P> : 'invalid' : V extends number ? P extends {
5220
5713
  conversion: 'prefix-cast';
5221
5714
  } ? Signed$1<Trim$2<`${V}`>, P> : NumberLiteralOrder<V, 9007199254740991> extends 1 ? 'invalid' : NumberLiteralOrder<V, -9007199254740991> extends -1 ? 'invalid' : Signed$1<Trim$2<`${V}`>, P> : Signed$1<Trim$2<`${V}`>, P> : 'invalid';
5222
- type GitDecimalLiteral<V, P extends GitDecimalParser> = Extract<Parsed$2<V, P>, 'invalid'> extends never ? true : false;
5223
- type GitDecimalValue<V, P extends GitDecimalParser> = Parsed$2<V, P> extends infer S extends string ? S extends 'default' ? P extends {
5715
+ type GitDecimalLiteral<V, P extends GitDecimalParser> = Extract<Parsed$4<V, P>, 'invalid'> extends never ? true : false;
5716
+ type GitDecimalValue<V, P extends GitDecimalParser> = Parsed$4<V, P> extends infer S extends string ? S extends 'default' ? P extends {
5224
5717
  default: 'previous';
5225
5718
  } ? undefined : true : State<S> : never;
5226
5719
 
@@ -5232,13 +5725,13 @@ type DepthParser<Bits extends 32 | 64> = {
5232
5725
  conversion: 'atoi';
5233
5726
  positive: true;
5234
5727
  };
5235
- type White = ' ' | '\t' | '\r' | '\n' | '\v' | '\f';
5236
- type Trim$1<S extends string, Steps extends readonly unknown[] = []> = Steps['length'] extends 128 ? string : S extends `${White}${infer Rest}` ? Trim$1<Rest, readonly [...Steps, 0]> : S;
5728
+ type White$1 = ' ' | '\t' | '\r' | '\n' | '\v' | '\f';
5729
+ type Trim$1<S extends string, Steps extends readonly unknown[] = []> = Steps['length'] extends 128 ? string : S extends `${White$1}${infer Rest}` ? Trim$1<Rest, readonly [...Steps, 0]> : S;
5237
5730
  type SymbolicPrefix<S extends string, Steps extends readonly unknown[] = []> = string extends S ? true : Steps['length'] extends 128 ? true : S extends `${infer Head}${infer Rest}` ? `${number}` extends Head ? true : `${bigint}` extends Head ? true : Head extends '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' ? SymbolicPrefix<Rest, readonly [...Steps, 0]> : false : false;
5238
5731
  type Deferred<V> = V extends string ? Trim$1<V> extends `${'+' | '-'}${infer Rest}` ? SymbolicPrefix<Rest> : SymbolicPrefix<Trim$1<V>> : false;
5239
- type Profile$1<V, Bits extends 32 | 64> = false extends (V extends unknown ? V extends `${string}\0${string}` ? false : Deferred<V> extends true ? true : GitDecimalLiteral<V, DepthParser<Bits>> : never) ? false : true;
5732
+ type Profile$2<V, Bits extends 32 | 64> = false extends (V extends unknown ? V extends `${string}\0${string}` ? false : Deferred<V> extends true ? true : GitDecimalLiteral<V, DepthParser<Bits>> : never) ? false : true;
5240
5733
  /** One complete observed atoi profile must accept every known member of the input. */
5241
- type DepthInitialLiteral<V, Bits extends 32 | 64 = 32 | 64> = true extends (32 extends Bits ? Profile$1<V, 32> : false) | (64 extends Bits ? Profile$1<V, 64> : false) ? true : false;
5734
+ type DepthInitialLiteral<V, Bits extends 32 | 64 = 32 | 64> = true extends (32 extends Bits ? Profile$2<V, 32> : false) | (64 extends Bits ? Profile$2<V, 64> : false) ? true : false;
5242
5735
 
5243
5736
  type AsciiUpper = 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z';
5244
5737
  type AsciiLower<S extends string, Result extends string = ''> = string extends S ? string : S extends object ? string : S extends `${infer H}${infer R}` ? AsciiLower<R, `${Result}${H extends AsciiUpper ? Lowercase<H> : H}`> : `${Result}${S}`;
@@ -5248,19 +5741,19 @@ type ParsedInteger<V, Source extends GitBooleanSource> = GitIntegerLiteral<V, ty
5248
5741
  type ParsedBoolean<V, Source extends GitBooleanSource> = V extends boolean ? V : V extends string ? DynamicText<V> extends true ? 'dynamic' : AsciiLower<V> extends (typeof BOOLEAN_GRAMMAR.true)[number] ? true : AsciiLower<V> extends (typeof BOOLEAN_GRAMMAR.false)[number] ? false : Source extends 'legacy-units' ? AsciiLower<V> extends 'k' | 'm' | 'g' ? false : ParsedInteger<V, Source> : ParsedInteger<V, Source> : 'invalid';
5249
5742
  type GitBooleanLiteral<V, Source extends GitBooleanSource = 'modern'> = Extract<ParsedBoolean<V, Source>, 'invalid'> extends never ? true : false;
5250
5743
  type GitBooleanValue<V, Source extends GitBooleanSource = 'modern'> = ParsedBoolean<V, Source> extends infer B ? B extends 'dynamic' ? boolean : B extends boolean ? B : never : never;
5251
- type Profile<P extends GitBooleanCallback> = (typeof BOOLEAN_CALLBACKS)[P];
5252
- type Names<P extends GitBooleanCallback> = Profile<P>['names'];
5744
+ type Profile$1<P extends GitBooleanCallback> = (typeof BOOLEAN_CALLBACKS)[P];
5745
+ type Names<P extends GitBooleanCallback> = Profile$1<P>['names'];
5253
5746
  type Transition<Previous, From, To> = Previous extends From ? To : Previous;
5254
- type ParsedName<V, P extends GitBooleanCallback, Source extends GitBooleanSource> = V extends string ? Source extends 'legacy-units' ? P extends 'pull-rebase' ? V extends 'preserve' | 'p' ? 'preserve' : ParsedName<V, P, 'symmetric'> : ParsedName<V, P, 'symmetric'> : (Profile<P> extends {
5747
+ type ParsedName<V, P extends GitBooleanCallback, Source extends GitBooleanSource> = V extends string ? Source extends 'legacy-units' ? P extends 'pull-rebase' ? V extends 'preserve' | 'p' ? 'preserve' : ParsedName<V, P, 'symmetric'> : ParsedName<V, P, 'symmetric'> : (Profile$1<P> extends {
5255
5748
  caseInsensitive: true;
5256
5749
  } ? AsciiLower<V> : V) extends infer Name ? Name extends keyof Names<P> ? Names<P>[Name] : 'invalid' : 'invalid' : 'invalid';
5257
- type ParsedCallback<V, P extends GitBooleanCallback, Previous, Source extends GitBooleanSource> = V extends unknown ? Profile<P> extends {
5750
+ type ParsedCallback<V, P extends GitBooleanCallback, Previous, Source extends GitBooleanSource> = V extends unknown ? Profile$1<P> extends {
5258
5751
  transitions: infer T;
5259
5752
  } ? V extends keyof T ? Source extends 'legacy-units' ? 'invalid' : T[V] extends {
5260
5753
  from: infer From;
5261
5754
  to: infer To;
5262
5755
  } ? Transition<Previous, From, To> : never : ParsedCallbackValue<V, P, Source> : ParsedCallbackValue<V, P, Source> : never;
5263
- type ParsedCallbackValue<V, P extends GitBooleanCallback, Source extends GitBooleanSource> = ParsedBoolean<V, Source> extends infer B ? B extends 'dynamic' ? V : B extends boolean ? B extends true ? Profile<P>['allowTrue'] extends true ? true : 'invalid' : false : ParsedName<V, P, Source> : never;
5756
+ type ParsedCallbackValue<V, P extends GitBooleanCallback, Source extends GitBooleanSource> = ParsedBoolean<V, Source> extends infer B ? B extends 'dynamic' ? V : B extends boolean ? B extends true ? Profile$1<P>['allowTrue'] extends true ? true : 'invalid' : false : ParsedName<V, P, Source> : never;
5264
5757
  type GitBooleanCallbackLiteral<V, P extends GitBooleanCallback, Source extends GitBooleanSource = 'modern'> = Extract<ParsedCallback<V, P, undefined, Source>, 'invalid'> extends never ? true : false;
5265
5758
  type GitBooleanCallbackValue<V, P extends GitBooleanCallback, Previous = undefined, Source extends GitBooleanSource = 'modern'> = Exclude<ParsedCallback<V, P, Previous, Source>, 'invalid'>;
5266
5759
 
@@ -5291,29 +5784,29 @@ type Limits = {
5291
5784
  };
5292
5785
  };
5293
5786
  type Radix = keyof Limits;
5294
- type Digit = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';
5295
- type Hex$1 = Digit | 'a' | 'b' | 'c' | 'd' | 'e' | 'f';
5296
- type Allowed<B extends Radix> = B extends '2' ? '0' | '1' : B extends '8' ? Exclude<Digit, '8' | '9'> : B extends '10' ? Digit : Hex$1 | Uppercase<Hex$1>;
5787
+ type Digit$2 = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';
5788
+ type Hex$1 = Digit$2 | 'a' | 'b' | 'c' | 'd' | 'e' | 'f';
5789
+ type Allowed<B extends Radix> = B extends '2' ? '0' | '1' : B extends '8' ? Exclude<Digit$2, '8' | '9'> : B extends '10' ? Digit$2 : Hex$1 | Uppercase<Hex$1>;
5297
5790
  type Trim<S extends string, N extends unknown[] = []> = N['length'] extends 128 ? string : S extends `${' ' | '\t' | '\r' | '\n' | '\v' | '\f'}${infer R}` ? Trim<R, [...N, 0]> : S;
5298
- type Digits<S extends string, B extends Radix, A extends string = '', N extends unknown[] = []> = string extends S ? 'dynamic' : N['length'] extends 128 ? 'dynamic' : S extends '' ? A extends '' ? 'invalid' : A : S extends `${infer H}${infer R}` ? `${number}` extends H ? 'dynamic' : `${bigint}` extends H ? 'dynamic' : H extends Allowed<B> ? Digits<R, B, `${A}${Lowercase<H>}`, [...N, 0]> : 'invalid' : 'dynamic';
5791
+ type Digits$2<S extends string, B extends Radix, A extends string = '', N extends unknown[] = []> = string extends S ? 'dynamic' : N['length'] extends 128 ? 'dynamic' : S extends '' ? A extends '' ? 'invalid' : A : S extends `${infer H}${infer R}` ? `${number}` extends H ? 'dynamic' : `${bigint}` extends H ? 'dynamic' : H extends Allowed<B> ? Digits$2<R, B, `${A}${Lowercase<H>}`, [...N, 0]> : 'invalid' : 'dynamic';
5299
5792
  type Strip<S extends string> = S extends `0${infer R}` ? Strip<R> : S extends '' ? '0' : S;
5300
5793
  type LengthCompare<A extends string, B extends string> = A extends `${infer _H}${infer R}` ? B extends `${infer _J}${infer T}` ? LengthCompare<R, T> : false : B extends '' ? 'equal' : true;
5301
5794
  type Lexical<A extends string, B extends string> = A extends `${infer H}${infer R}` ? B extends `${infer J}${infer T}` ? H extends J ? Lexical<R, T> : '0123456789abcdef' extends `${string}${H}${string}${J}${string}` ? true : false : false : true;
5302
5795
  type AtMost<A extends string, B extends string> = LengthCompare<A, B> extends 'equal' ? Lexical<A, B> : LengthCompare<A, B>;
5303
- type Bounded<S extends string, B extends Radix, U extends keyof Limits[B], Negative extends boolean> = Digits<S, B> extends infer D extends string ? D extends 'invalid' | 'dynamic' ? D : Strip<D> extends infer M extends string ? AtMost<M, Limits[B][U] extends readonly string[] ? Limits[B][U][Negative extends true ? 1 : 0] : never> extends true ? M extends '0' ? false : true : 'invalid' : never : never;
5796
+ type Bounded<S extends string, B extends Radix, U extends keyof Limits[B], Negative extends boolean> = Digits$2<S, B> extends infer D extends string ? D extends 'invalid' | 'dynamic' ? D : Strip<D> extends infer M extends string ? AtMost<M, Limits[B][U] extends readonly string[] ? Limits[B][U][Negative extends true ? 1 : 0] : never> extends true ? M extends '0' ? false : true : 'invalid' : never : never;
5304
5797
  type Magnitude<S extends string, U extends keyof Limits['10'], Negative extends boolean> = S extends `0${'x' | 'X'}${infer R}` ? Bounded<R, '16', U, Negative> : S extends `0${'b' | 'B'}${infer R}` ? Bounded<R, '2', U, Negative> : S extends `0${string}` ? Bounded<S, '8', U, Negative> : Bounded<S, '10', U, Negative>;
5305
5798
  type Unit<S extends string, Negative extends boolean> = S extends `${infer R}${'k' | 'K'}` ? Magnitude<R, 'k', Negative> : S extends `${infer R}${'m' | 'M'}` ? Magnitude<R, 'm', Negative> : S extends `${infer R}${'g' | 'G'}` ? Magnitude<R, 'g', Negative> : Magnitude<S, '', Negative>;
5306
5799
  type Integer<S extends string> = string extends S ? 'dynamic' : S extends `-${infer R}` ? Unit<R, true> : Unit<S extends `+${infer R}` ? R : S, false>;
5307
5800
  /** Known literals mirror matches(gitEnabled); unknown strings defer to runtime. */
5308
5801
  type GitEnabledLiteral<V> = V extends true ? true : V extends string ? string extends V ? 'dynamic' : V extends 'on-demand' ? true : Lowercase<V> extends 'true' | 'yes' | 'on' ? true : Lowercase<V> extends '' | 'false' | 'no' | 'off' ? false : Integer<Trim<V>> extends infer B ? B extends 'invalid' ? false : B : never : false;
5309
5802
 
5310
- type SubtractDigits<A extends string, B extends string, Borrow extends '0' | '1' = '0', Result extends string = ''> = A extends `${infer H extends Digit$2}${infer R}` ? B extends `${infer J extends Digit$2}${infer T}` ? IntegerDifferences[H][J][Borrow extends '0' ? 0 : 1] extends [
5803
+ type SubtractDigits<A extends string, B extends string, Borrow extends '0' | '1' = '0', Result extends string = ''> = A extends `${infer H extends Digit$4}${infer R}` ? B extends `${infer J extends Digit$4}${infer T}` ? IntegerDifferences[H][J][Borrow extends '0' ? 0 : 1] extends [
5311
5804
  infer Carry extends '0' | '1',
5312
5805
  infer D extends string
5313
5806
  ] ? SubtractDigits<R, T, Carry, `${D}${Result}`> : never : SubtractDigits<A, '0', Borrow, Result> : Strip$2<Result>;
5314
5807
  type Subtract<A extends string, B extends string> = SubtractDigits<Reverse$1<A>, Reverse$1<B>>;
5315
5808
  type Unsigned<M extends string, Negative extends boolean> = Negative extends true ? M extends '0' ? '0' : Subtract<'18446744073709551616', M> : M;
5316
- type Decimal<S extends string, Acc extends string = '', Steps extends unknown[] = []> = string extends S ? 'dynamic' : Steps['length'] extends 128 ? 'dynamic' : S extends `${infer H}${infer R}` ? H extends Digit$2 ? Decimal<R, `${Acc}${H}`, [...Steps, 0]> : 'invalid' : Acc extends '' ? 'invalid' : Strip$2<Acc>;
5809
+ type Decimal<S extends string, Acc extends string = '', Steps extends unknown[] = []> = string extends S ? 'dynamic' : Steps['length'] extends 128 ? 'dynamic' : S extends `${infer H}${infer R}` ? H extends Digit$4 ? Decimal<R, `${Acc}${H}`, [...Steps, 0]> : 'invalid' : Acc extends '' ? 'invalid' : Strip$2<Acc>;
5317
5810
  type Checked<S extends string, Negative extends boolean> = Decimal<S> extends infer M extends string ? M extends 'invalid' | 'dynamic' ? M : AtMost$1<M, '18446744073709551615'> extends true ? Unsigned<M, Negative> : 'invalid' : never;
5318
5811
  type Signed<S extends string> = S extends `-${infer R}` ? Checked<R, true> : Checked<S extends `+${infer R}` ? R : S, false>;
5319
5812
  type LegacyParser<P extends GitTimestampParser> = {
@@ -5325,37 +5818,314 @@ type LegacyParser<P extends GitTimestampParser> = {
5325
5818
  longBits: P['longBits'];
5326
5819
  };
5327
5820
  type Legacy<V extends string, P extends GitTimestampParser> = GitDecimalLiteral<V, LegacyParser<P>> extends true ? GitDecimalValue<V, LegacyParser<P>> extends infer N extends number | bigint ? number extends N ? 'dynamic' : bigint extends N ? 'dynamic' : `${N}` extends `-${infer M}` ? Unsigned<M, true> : `${N}` : never : 'invalid';
5328
- type Parsed$1<V, P extends GitTimestampParser> = V extends undefined ? 'dynamic' : V extends string | number | bigint ? V extends `${string}\0${string}` ? 'invalid' : string extends V ? 'dynamic' : number extends V ? 'dynamic' : bigint extends V ? 'dynamic' : P['conversion'] extends 'atoi' ? Legacy<`${V}`, P> : Signed<Trim$2<`${V}`>> : 'invalid';
5821
+ type Parsed$3<V, P extends GitTimestampParser> = V extends undefined ? 'dynamic' : V extends string | number | bigint ? V extends `${string}\0${string}` ? 'invalid' : string extends V ? 'dynamic' : number extends V ? 'dynamic' : bigint extends V ? 'dynamic' : P['conversion'] extends 'atoi' ? Legacy<`${V}`, P> : Signed<Trim$2<`${V}`>> : 'invalid';
5329
5822
  /** Known invalid input-union arms remain invalid; budget-exceeding literals defer to runtime. */
5330
- type GitTimestampLiteral<V, P extends GitTimestampParser> = Extract<Parsed$1<V, P>, 'invalid'> extends never ? true : false;
5823
+ type GitTimestampLiteral<V, P extends GitTimestampParser> = Extract<Parsed$3<V, P>, 'invalid'> extends never ? true : false;
5331
5824
  /** Timestamp states keep exact uintmax values instead of rounding through JavaScript numbers. */
5332
- type GitTimestampValue<V, P extends GitTimestampParser> = Parsed$1<V, P> extends infer S extends string ? State<S> : never;
5825
+ type GitTimestampValue<V, P extends GitTimestampParser> = Parsed$3<V, P> extends infer S extends string ? State<S> : never;
5333
5826
 
5334
5827
  type GitNumericParser = GitIntegerParser | GitDecimalParser | GitTimestampParser;
5335
5828
  type GitNumericLiteral<V, P extends GitNumericParser> = P extends GitTimestampParser ? GitTimestampLiteral<V, P> : P extends GitDecimalParser ? GitDecimalLiteral<V, P> : P extends GitIntegerParser ? GitIntegerLiteral<V, P> : never;
5336
5829
  type GitNumericValue<V, P extends GitNumericParser> = P extends GitTimestampParser ? GitTimestampValue<V, P> : P extends GitDecimalParser ? GitDecimalValue<V, P> : P extends GitIntegerParser ? GitIntegerValue<V, P> : never;
5337
5830
 
5831
+ type White = ' ' | '\t' | '\n' | '\v' | '\f' | '\r';
5832
+ type Digit$1 = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';
5833
+ type None$1 = {
5834
+ none: true;
5835
+ };
5836
+ type Past = {
5837
+ past: true;
5838
+ };
5839
+ type SkipWhite<S extends string> = S extends `${White}${infer R}` ? SkipWhite<R> : S;
5840
+ type Digits$1<S extends string, Negative extends boolean, Nonzero extends boolean = false, Text extends string = ''> = S extends `${infer C}${infer R}` ? C extends Digit$1 ? Digits$1<R, Negative, C extends '0' ? Nonzero : true, `${Text}${C}`> : Text extends '' ? None$1 : {
5841
+ rest: S;
5842
+ positive: Negative extends true ? false : Nonzero;
5843
+ digits: Text;
5844
+ negative: Negative;
5845
+ } : Text extends '' ? None$1 : {
5846
+ rest: '';
5847
+ positive: Negative extends true ? false : Nonzero;
5848
+ digits: Text;
5849
+ negative: Negative;
5850
+ };
5851
+ type StripZeros<S extends string> = S extends `0${infer R}` ? StripZeros<R> : S;
5852
+ type Length<S extends string, N extends readonly unknown[] = []> = S extends `${string}${infer R}` ? Length<R, readonly [...N, 0]> : N['length'];
5853
+ type DigitOrder = '0123456789';
5854
+ /** Whether digit A is at least digit B. */
5855
+ type DigitAtLeast<A extends string, B extends string> = DigitOrder extends `${string}${B}${string}${A}${string}` ? true : A extends B ? true : false;
5856
+ /** Whether equal-length digit strings compare A >= B. */
5857
+ type AtLeast<A extends string, B extends string> = A extends `${infer X}${infer RestA}` ? B extends `${infer Y}${infer RestB}` ? X extends Y ? AtLeast<RestA, RestB> : DigitAtLeast<X, Y> : true : true;
5858
+ /** strtol saturates a nonnegative value at LONG_MAX of the pinned LP64 profile. */
5859
+ type Saturated<D extends string> = Length<StripZeros<D>> extends infer L extends number ? L extends 19 ? AtLeast<StripZeros<D>, '9223372036854775807'> : `${L}` extends `${0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}` | `1${0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8}` ? false : true : true;
5860
+ type Strtol<S extends string> = SkipWhite<S> extends `-${infer R}` ? Digits$1<R, true> : SkipWhite<S> extends `+${infer R}` ? Digits$1<R, false> : Digits$1<SkipWhite<S>, false>;
5861
+ type ScanRegex<S extends string> = S extends `/${infer R}` ? {
5862
+ rest: R;
5863
+ } : S extends `\\${infer _}${infer R}` ? ScanRegex<R> : S extends '\\' ? Past : S extends `${infer _}${infer R}` ? ScanRegex<R> : None$1;
5864
+ type ScanSlash<S extends string> = S extends `/${infer T}` ? ScanRegex<T> extends infer Scanned ? Scanned extends {
5865
+ rest: string;
5866
+ } | Past ? Scanned : {
5867
+ rest: S;
5868
+ } : never : {
5869
+ rest: S;
5870
+ };
5871
+ type ScanLocation<S extends string, First extends boolean> = Strtol<S> extends {
5872
+ rest: infer R extends string;
5873
+ } ? {
5874
+ rest: R;
5875
+ } : First extends true ? S extends `^${infer R}` ? ScanSlash<R> : ScanSlash<S> : ScanSlash<S>;
5876
+ type ScanName<S extends string, Seen extends boolean = false> = S extends `:${string}` ? Seen extends true ? {
5877
+ rest: S;
5878
+ } : None$1 : S extends `\\${infer _}${infer R}` ? ScanName<R, true> : S extends `${infer _}${infer R}` ? ScanName<R, true> : Seen extends true ? {
5879
+ rest: '';
5880
+ } : None$1;
5881
+ type FileFollows<R> = R extends {
5882
+ rest: `:${infer F}`;
5883
+ } ? (F extends '' ? false : true) : false;
5884
+ type FirstNumber<S extends string> = Strtol<S> extends {
5885
+ positive: false;
5886
+ } ? false : true;
5887
+ type FirstSaturated<S extends string> = Strtol<S> extends {
5888
+ negative: false;
5889
+ digits: infer D extends string;
5890
+ } ? Saturated<D> : false;
5891
+ type SecondNumber<S extends string, Absolute extends boolean> = Absolute extends true ? FirstNumber<S> : S extends `${'+' | '-'}${infer D}` ? Digits$1<D, false> extends {
5892
+ positive: false;
5893
+ } ? false : true : FirstNumber<S>;
5894
+ type Numeric<S extends string> = ScanLocation<S, true> extends {
5895
+ rest: infer R extends string;
5896
+ } ? R extends `,${infer Second}` ? FirstNumber<S> extends true ? SecondNumber<Second, FirstSaturated<S>> extends true ? FileFollows<ScanLocation<Second, false>> : false : false : FirstNumber<S> extends true ? FileFollows<{
5897
+ rest: R;
5898
+ }> : false : false;
5899
+ type Parsed$2<S extends string> = string extends S ? true : {} extends Record<S, unknown> ? true : S extends `:${infer P}` | `^:${infer P}` ? FileFollows<ScanName<P>> : Numeric<S>;
5900
+ /** Reject every known invalid -L literal; dynamic text is checked at runtime. */
5901
+ type LogLineRangeLiteral<V> = [V] extends [string] ? false extends (V extends string ? Parsed$2<V> : false) ? false : true : false;
5902
+
5338
5903
  type Reserved = ReservedControl | '~' | '`' | '!' | '@' | '#' | '$' | '^' | '&' | '*' | '(' | ')' | '[' | ']' | '{' | '}' | '\\' | ';' | "'" | '"' | ',' | '<' | '>' | '?';
5339
5904
  type Hex = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'a' | 'b' | 'c' | 'd' | 'e' | 'f';
5340
5905
  type Ascii = UrlBytes[Extract<keyof UrlBytes, `${'0' | '1' | '2' | '3' | '4' | '5' | '6' | '7'}${Hex}`>];
5341
5906
  /** Signed C char rejects high bytes before percent decoding; large/opaque words defer. */
5342
5907
  type AsciiWord<S extends string, Steps extends unknown[] = []> = S extends object ? true : string extends S ? true : Steps['length'] extends 128 ? true : S extends '' ? true : S extends `${infer H}${infer R}` ? H extends Ascii ? AsciiWord<R, [...Steps, 0]> : false : true;
5343
5908
  type Decode<S extends string, Out extends string = '', Steps extends unknown[] = []> = string extends S ? string : Steps['length'] extends 128 ? string : S extends '' ? Out : S extends `%${infer A}${infer B}${infer R}` ? Lowercase<`${A}${B}`> extends keyof UrlBytes ? Decode<R, `${Out}${UrlBytes[Lowercase<`${A}${B}`>]}`, [...Steps, 0]> : Decode<S extends `%${infer Rest}` ? Rest : never, `${Out}%`, [...Steps, 0]> : S extends `${infer H}${infer R}` ? Decode<R, `${Out}${H}`, [...Steps, 0]> : string;
5344
- type Child<S extends string, Depth extends unknown[], Negative extends boolean, UnsignedChar extends boolean> = S extends '' ? true : S extends `${string}${Reserved}${string}` ? false : UnsignedChar extends false ? AsciiWord<S> extends false ? false : Parsed<S extends `${string}%${string}` ? Decode<S> : S, false, Negative, UnsignedChar, [
5909
+ type Child<S extends string, Depth extends unknown[], Negative extends boolean, UnsignedChar extends boolean> = S extends '' ? true : S extends `${string}${Reserved}${string}` ? false : UnsignedChar extends false ? AsciiWord<S> extends false ? false : Parsed$1<S extends `${string}%${string}` ? Decode<S> : S, false, Negative, UnsignedChar, [
5345
5910
  ...Depth,
5346
5911
  0
5347
- ]> : Parsed<S extends `${string}%${string}` ? Decode<S> : S, false, Negative, UnsignedChar, [
5912
+ ]> : Parsed$1<S extends `${string}%${string}` ? Decode<S> : S, false, Negative, UnsignedChar, [
5348
5913
  ...Depth,
5349
5914
  0
5350
5915
  ]>;
5351
5916
  type Combined<S extends string, Depth extends unknown[], Negative extends boolean, UnsignedChar extends boolean, Steps extends unknown[] = []> = string extends S ? true : Steps['length'] extends 128 ? true : S extends `${infer L}+${infer R}` ? Child<L, Depth, Negative, UnsignedChar> extends true ? Combined<R, Depth, Negative, UnsignedChar, [...Steps, 0]> : false : Child<S, Depth, Negative, UnsignedChar>;
5352
- type Parsed<S extends string, Auto extends boolean, Negative extends boolean, UnsignedChar extends boolean, Depth extends unknown[] = []> = S extends object ? true : string extends S ? true : Depth['length'] extends 32 ? true : S extends 'blob:none' | `sparse:oid=${string}` | `object:type=${'commit' | 'tree' | 'blob' | 'tag'}` ? true : S extends 'auto' ? Auto : S extends `blob:limit=${infer N}` | `tree:${infer N}` ? GitIntegerLiteral<N, {
5917
+ type Parsed$1<S extends string, Auto extends boolean, Negative extends boolean, UnsignedChar extends boolean, Depth extends unknown[] = []> = S extends object ? true : string extends S ? true : Depth['length'] extends 32 ? true : S extends 'blob:none' | `sparse:oid=${string}` | `object:type=${'commit' | 'tree' | 'blob' | 'tag'}` ? true : S extends 'auto' ? Auto : S extends `blob:limit=${infer N}` | `tree:${infer N}` ? GitIntegerLiteral<N, {
5353
5918
  kind: 'integer';
5354
5919
  signed: false;
5355
5920
  bits: 64;
5356
5921
  negativeMagnitudes: Negative;
5357
5922
  }> : S extends `combine:${infer R}` ? R extends '' ? false : Combined<R, Depth, Negative, UnsignedChar> : false;
5358
- type ObjectFilterLiteral<S extends string, Auto extends boolean = false, Negative extends boolean = false, UnsignedChar extends boolean = true> = false extends (S extends `${string}\0${string}` ? false : Parsed<S, Auto, Negative, UnsignedChar>) ? false : true;
5923
+ type ObjectFilterLiteral<S extends string, Auto extends boolean = false, Negative extends boolean = false, UnsignedChar extends boolean = true> = false extends (S extends `${string}\0${string}` ? false : Parsed$1<S, Auto, Negative, UnsignedChar>) ? false : true;
5924
+
5925
+ /** Characters check_refname_format always refuses; ':' and '*' depend on the refspec shape. */
5926
+ type RefnameCharacter = ' ' | '~' | '^' | '?' | '[' | '\\' | '\t' | '\n' | '\x7f';
5927
+ /** Certain refusals of check_refname_format for the text after `refs/<x>/`; others stay runtime. */
5928
+ type RefnameTailInvalid<V extends string> = V extends '' | `.${string}` | `/${string}` | `${string}/` | `${string}.` | `${string}//${string}` | `${string}/.${string}` | `${string}..${string}` | `${string}@{${string}` | `${string}.lock` | `${string}.lock/${string}` | `${string}${RefnameCharacter}${string}` ? true : false;
5929
+ /**
5930
+ * A literal tag name whose expanded refspec parse_refspec refuses. A name with ':' splits the
5931
+ * refspec differently per command and stays runtime, as do wide strings.
5932
+ */
5933
+ type TagNameInvalid<W> = W extends string ? string extends W ? false : W extends `${string}:${string}` ? false : RefnameTailInvalid<W> : false;
5934
+ /** A word that set_refspecs cannot accept under --delete; wide strings stay unknown. */
5935
+ type DeleteWordInvalid<W> = W extends string ? string extends W ? false : W extends '' | '@' | `${string}:${string}` | `${string}*${string}` ? true : RefnameTailInvalid<W> : false;
5936
+ /**
5937
+ * Walk refspec words: `tag` consumes the next word. A word that may be `tag` (a wide string or
5938
+ * a union that includes it) and unknown lengths stay accepted for the runtime check.
5939
+ */
5940
+ type Words<W extends readonly unknown[], D extends boolean> = W extends readonly [
5941
+ infer H,
5942
+ ...infer R
5943
+ ] ? [H] extends ['tag'] ? R extends readonly [infer T, ...infer Rest] ? TagNameInvalid<T> extends true ? false : Words<Rest, D> : R extends readonly [] ? false : true : 'tag' extends H ? true : D extends true ? DeleteWordInvalid<H> extends true ? false : Words<R, D> : Words<R, D> : true;
5944
+ type Skip<W extends readonly unknown[], N extends number> = N extends 1 ? W extends readonly [unknown, ...infer R] ? R : W extends readonly [] ? W : readonly unknown[] : W;
5945
+ type AsWords<V> = V extends string ? readonly [V] : V extends readonly unknown[] ? V : never;
5946
+ type HasNewline<V> = V extends string ? string extends V ? false : V extends `${string}\n${string}` ? true : false : V extends readonly (infer E)[] ? true extends HasNewline<E> ? true : false : false;
5947
+ type RemoteNameCharacter = ' ' | '~' | '^' | ':' | '?' | '[' | '\\' | '*' | '\t' | '\n' | '\x7f';
5948
+ /** Certain refusals of valid_remote_name for a literal name; other control bytes stay runtime. */
5949
+ type RemoteNameInvalid<V> = V extends string ? string extends V ? false : V extends '' | `.${string}` | `/${string}` | `${string}/` | `${string}//${string}` | `${string}/.${string}` | `${string}..${string}` | `${string}@{${string}` | `${string}.lock` | `${string}.lock/${string}` | `${string}${RemoteNameCharacter}${string}` ? true : false : false;
5950
+ /** Whether a literal value passes the selected push parser. */
5951
+ type PushRefspecLiteral<V, P extends PushRefspecParser> = P extends 'remote-name' ? RemoteNameInvalid<V> extends true ? false : true : P extends 'push-option-text' ? HasNewline<V> extends true ? false : true : [AsWords<V>] extends [never] ? true : Words<Skip<AsWords<V>, P extends 'refspec-operands' | 'push-delete-operands' | 'fetch-refspec-operands' ? 1 : 0>, P extends 'push-delete-operands' | 'push-delete-refspecs' ? true : false> extends true ? true : false;
5952
+
5953
+ /** Type-level mirror of refname.ts:branchNameSyntax for literal branch names. */
5954
+ type ControlCharacter = '\x00' | '\x01' | '\x02' | '\x03' | '\x04' | '\x05' | '\x06' | '\x07' | '\x08' | '\x09' | '\x0a' | '\x0b' | '\x0c' | '\x0d' | '\x0e' | '\x0f' | '\x10' | '\x11' | '\x12' | '\x13' | '\x14' | '\x15' | '\x16' | '\x17' | '\x18' | '\x19' | '\x1a' | '\x1b' | '\x1c' | '\x1d' | '\x1e' | '\x1f' | '\x7f';
5955
+ type ForbiddenRefnameText = ControlCharacter | ' ' | '*' | ':' | '?' | '[' | '\\' | '^' | '~' | '..' | '/.' | '//' | '.lock/';
5956
+ type Digit = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';
5957
+ type Digits<S extends string> = S extends '' ? true : S extends `${Digit}${infer R}` ? Digits<R> : false;
5958
+ /** strtol text that is a positive decimal: leading spaces, an optional '+', then digits. */
5959
+ type PositiveDecimal<S extends string> = S extends `${' ' | '\t' | '\n' | '\v' | '\f' | '\r'}${infer R}` ? PositiveDecimal<R> : S extends `+${infer R}` ? PositiveDigits<R> : PositiveDigits<S>;
5960
+ type PositiveDigits<S extends string> = S extends `0${infer R}` ? PositiveDigits<R> : S extends `${Exclude<Digit, '0'>}${infer R}` ? Digits<R> : false;
5961
+ /** The original text after the first @{upstream}, @{u} or @{push} mark, matched case-insensitively. */
5962
+ type AfterMark<S extends string> = S extends `@{${infer Body}}${infer R}` ? Lowercase<Body> extends 'u' | 'upstream' | 'push' ? R : S extends `${infer _C}${infer Rest}` ? AfterMark<Rest> : never : S extends `${infer _C}${infer Rest}` ? AfterMark<Rest> : never;
5963
+ /** The literal text after the last rewritable mark. */
5964
+ type LastTail<S extends string> = [AfterMark<S>] extends [never] ? S : LastTail<AfterMark<S>>;
5965
+ /** The literal tail after the rewritable parts, or never when nothing can be rewritten. */
5966
+ type InterpretedTail<V extends string> = V extends `@{-${infer N}}${infer R}` ? PositiveDecimal<N> extends true ? LastTail<R> : [AfterMark<V>] extends [never] ? never : LastTail<V> : [AfterMark<V>] extends [never] ? never : LastTail<V>;
5967
+ type RefnameFormat<R extends string> = R extends `${string}${ForbiddenRefnameText}${string}` ? false : R extends `${string}${'/' | '.' | '.lock'}` ? false : R extends `${string}@{${string}` ? false : true;
5968
+ /** `true` unless a literal name is refused by check_branch_ref in every repository. */
5969
+ type BranchNameLiteral<V> = V extends string ? string extends V ? true : V extends `-${string}` | 'HEAD' ? false : V extends `${string}@{${string}` ? [InterpretedTail<V>] extends [never] ? false : V extends `${string}:${string}` ? false : RefnameFormat<`refs/heads/x${InterpretedTail<V>}`> : RefnameFormat<`refs/heads/${V}`> : false;
5970
+ /** check_refname_format(REFNAME_ALLOW_ONELEVEL) for literal refs; no interpretation. */
5971
+ type RefnameOnelevelLiteral<V> = V extends string ? string extends V ? true : V extends '' | '@' | `${'.' | '/'}${string}` ? false : RefnameFormat<V> : false;
5972
+
5973
+ type HexDigit = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'a' | 'b' | 'c' | 'd' | 'e' | 'f';
5974
+ type AsciiByte = UrlBytes[Extract<keyof UrlBytes, `${'0' | '1' | '2' | '3' | '4' | '5' | '6' | '7'}${HexDigit}`>];
5975
+ type Profile<P extends StringCallbackParser> = (typeof STRING_CALLBACKS)[P];
5976
+ type Dynamic<S extends string, N extends readonly unknown[] = []> = {} extends Record<S, unknown> ? true : `${number}` extends S ? true : `${bigint}` extends S ? true : N['length'] extends 128 ? true : S extends `${infer _C}${infer R}` ? Dynamic<R, readonly [...N, 0]> : S extends '' ? false : true;
5977
+ type Pair<S extends string, Sep extends string, Optional extends boolean, Seen extends boolean = false, N extends readonly unknown[] = []> = string extends S ? true : N['length'] extends 128 ? true : S extends `${Sep}${infer Rest}` ? Seen extends false ? false : Rest extends '' ? false : true : S extends '' ? Optional extends true ? Seen : false : S extends `${infer C}${infer Rest}` ? string extends C ? true : Pair<Rest, Sep, Optional, true, readonly [...N, 0]> : true;
5978
+ type TokenProjection<P, T extends string, Value> = P extends {
5979
+ projection: {
5980
+ values: infer M;
5981
+ };
5982
+ } ? T extends keyof M ? M[T] : Value : Value;
5983
+ type TokenList<S extends string, P, Value, Token extends string = '', N extends readonly unknown[] = []> = N['length'] extends 128 ? {
5984
+ valid: true;
5985
+ value: string;
5986
+ } : P extends {
5987
+ separators: readonly (infer Sep)[];
5988
+ exact: readonly (infer E)[];
5989
+ } ? S extends `${infer C}${infer Rest}` ? C extends Sep ? Token extends '' ? TokenList<Rest, P, Value, '', readonly [...N, 0]> : Token extends E ? TokenList<Rest, P, TokenProjection<P, Token, Value>, '', readonly [...N, 0]> : {
5990
+ valid: false;
5991
+ } : TokenList<Rest, P, Value, `${Token}${C}`, readonly [...N, 0]> : Token extends '' ? {
5992
+ valid: true;
5993
+ value: Value;
5994
+ } : Token extends E ? {
5995
+ valid: true;
5996
+ value: TokenProjection<P, Token, Value>;
5997
+ } : {
5998
+ valid: false;
5999
+ } : {
6000
+ valid: false;
6001
+ };
6002
+ type Projected<V, P extends StringCallbackParser> = Profile<P> extends {
6003
+ kind: 'token-list';
6004
+ projection: {
6005
+ initial: infer Initial;
6006
+ };
6007
+ } ? V extends string ? V extends object ? {
6008
+ valid: true;
6009
+ value: string;
6010
+ } : Dynamic<V> extends true ? {
6011
+ valid: true;
6012
+ value: string;
6013
+ } : TokenList<V, Profile<P>, Initial> : {
6014
+ valid: false;
6015
+ } : {
6016
+ valid: true;
6017
+ value: V;
6018
+ };
6019
+ type StringCallbackValue<V, P extends StringCallbackParser> = Projected<V, P> extends {
6020
+ value: infer Value;
6021
+ } ? Value : V;
6022
+ type ByteCharacter<S extends string> = S extends `${infer First}${infer Rest}` ? Dynamic<First> extends true ? true : First extends AsciiByte ? Rest extends '' ? true : Rest extends `${infer Second}${infer _Tail}` ? Dynamic<Second> : true : false : true;
6023
+ type AsciiWhitespace = ' ' | '\t' | '\n' | '\r' | '\v' | '\f';
6024
+ type TrimAsciiLeft<S extends string> = S extends `${AsciiWhitespace}${infer Rest}` ? TrimAsciiLeft<Rest> : S;
6025
+ type TrimAsciiRight<S extends string> = S extends `${infer Rest}${AsciiWhitespace}` ? TrimAsciiRight<Rest> : S;
6026
+ type ResetState = {
6027
+ ordinary: boolean;
6028
+ exclusive: boolean;
6029
+ invalid: boolean;
6030
+ };
6031
+ type ResetToken<P, Token extends string, State extends ResetState> = P extends {
6032
+ reset: infer Reset;
6033
+ ordinary: readonly (infer Ordinary)[];
6034
+ exclusive: readonly (infer Exclusive)[];
6035
+ } ? TrimAsciiRight<TrimAsciiLeft<Token>> extends infer Text ? Text extends Reset ? {
6036
+ ordinary: false;
6037
+ exclusive: false;
6038
+ invalid: false;
6039
+ } : Text extends Ordinary ? {
6040
+ ordinary: true;
6041
+ exclusive: State['exclusive'];
6042
+ invalid: State['invalid'];
6043
+ } : Text extends Exclusive ? {
6044
+ ordinary: State['ordinary'];
6045
+ exclusive: true;
6046
+ invalid: State['invalid'];
6047
+ } : {
6048
+ ordinary: State['ordinary'];
6049
+ exclusive: State['exclusive'];
6050
+ invalid: true;
6051
+ } : never : {
6052
+ ordinary: false;
6053
+ exclusive: false;
6054
+ invalid: true;
6055
+ };
6056
+ type ResetStateValid<State extends ResetState> = State['invalid'] extends true ? false : State['ordinary'] extends true ? State['exclusive'] extends true ? false : true : true;
6057
+ type ResetTokenList<S extends string, P, Token extends string = '', State extends ResetState = {
6058
+ ordinary: false;
6059
+ exclusive: false;
6060
+ invalid: false;
6061
+ }, N extends readonly unknown[] = []> = N['length'] extends 128 ? true : P extends {
6062
+ separator: infer Separator;
6063
+ } ? S extends `${infer C}${infer Rest}` ? C extends Separator ? ResetTokenList<Rest, P, '', ResetToken<P, Token, State>, readonly [...N, 0]> : ResetTokenList<Rest, P, `${Token}${C}`, State, readonly [...N, 0]> : ResetStateValid<ResetToken<P, Token, State>> : false;
6064
+ type TrailingTokenList<S extends string, Separator extends string, Exact extends string, N extends readonly unknown[] = []> = N['length'] extends 128 ? true : S extends `${infer Token}${Separator}${infer Rest}` ? Token extends Exact ? TrailingTokenList<Rest, Separator, Exact, readonly [...N, 0]> : false : S extends '' | Exact ? true : false;
6065
+ type DirstatDigits<S extends string> = S extends '' ? true : S extends `${ScoreDigit}${infer Rest}` ? DirstatDigits<Rest> : false;
6066
+ type DirstatToken<S extends string, Exact extends string> = S extends Exact ? true : S extends `${ScoreDigit}${string}` ? S extends `${infer Whole}.${infer Fraction}` ? false extends DirstatDigits<Whole> | DirstatDigits<Fraction> ? false : true : DirstatDigits<S> : false;
6067
+ type DirstatTokens<S extends string, Separator extends string, Exact extends string> = S extends `${infer Token}${Separator}${infer Rest}` ? DirstatToken<Token, Exact> extends true ? DirstatTokens<Rest, Separator, Exact> : false : DirstatToken<S, Exact>;
6068
+ type CharacterMembers<S extends string> = S extends `${infer C}${infer Rest}` ? C | CharacterMembers<Rest> : never;
6069
+ type CharacterSetLoop<S extends string, Allowed extends string, N extends readonly unknown[] = []> = N['length'] extends 128 ? true : S extends `${infer C}${infer Rest}` ? C extends Allowed ? CharacterSetLoop<Rest, Allowed, readonly [...N, 0]> : false : true;
6070
+ type CharacterSetText<S extends string, Characters extends string> = S extends `${string}${Exclude<AsciiByte, CharacterMembers<Characters>>}${string}` ? false : Dynamic<S> extends true ? true : CharacterSetLoop<S, CharacterMembers<Characters>>;
6071
+ /** Free text with a required non-blank character and forbidden first or inner characters. */
6072
+ type TextValue<S extends string, Blank extends string, First extends string, Forbidden extends string> = S extends `${CharacterMembers<First>}${string}` ? false : S extends `${string}${CharacterMembers<Forbidden>}${string}` ? false : S extends '' ? false : Dynamic<S> extends true ? true : CharacterSetLoop<S, CharacterMembers<Blank>> extends true ? false : true;
6073
+ type ScoreDigit = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';
6074
+ type ScoreForbiddenAscii = Exclude<AsciiByte, ScoreDigit | '.' | '%'>;
6075
+ type ScoreLoop<S extends string, Dot extends boolean = false, N extends readonly unknown[] = []> = N['length'] extends 128 ? true : S extends '' | '%' ? true : S extends `.${infer Rest}` ? Dot extends true ? false : ScoreLoop<Rest, true, readonly [...N, 0]> : S extends `${infer C}${infer Rest}` ? C extends ScoreDigit ? ScoreLoop<Rest, Dot, readonly [...N, 0]> : false : true;
6076
+ type ScoreHasFollowingPercentText<S extends string> = S extends `${string}%${infer After}` ? After extends '' ? false : After extends `${infer First}${infer _Rest}` ? Dynamic<First> extends false ? true : false : false : false;
6077
+ type ScorePart<S extends string> = S extends `${string}${ScoreForbiddenAscii}${string}` ? false : S extends `${string}.${string}.${string}` | `${string}%${string}%${string}` ? false : ScoreHasFollowingPercentText<S> extends true ? false : Dynamic<S> extends true ? true : ScoreLoop<S>;
6078
+ type ScoreText<S extends string, Parts extends 1 | 2> = Parts extends 2 ? S extends `${infer Left}/${infer Right}` ? false extends ScorePart<Left> | ScorePart<Right> ? false : true : ScorePart<S> : ScorePart<S>;
6079
+ type AsciiLetter = 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z' | 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z';
6080
+ /** Whether a literal is a nonempty run of ASCII letters; long or dynamic text is deferred. */
6081
+ type Letters<S extends string, N extends readonly unknown[] = []> = N['length'] extends 128 ? 'deferred' : S extends `${infer C}${infer R}` ? C extends AsciiLetter ? R extends '' ? true : Letters<R, [...N, unknown]> : false : false;
6082
+ /** A letters-only head before the first separator must be an allowed suboption name. */
6083
+ type AlphaPrefix<S extends string, Sep extends string, Allowed extends string> = Dynamic<S> extends true ? true : S extends `${infer Head}${Sep}${string}` ? Letters<Head> extends false ? true : Letters<Head> extends 'deferred' ? true : Head extends Allowed ? true : false : true;
6084
+ type Parsed<V, P extends StringCallbackParser> = V extends string ? V extends object ? true : Profile<P> extends {
6085
+ kind: 'byte-character';
6086
+ } ? ByteCharacter<V> : Profile<P> extends {
6087
+ kind: 'token-list';
6088
+ } ? Projected<V, P> extends {
6089
+ valid: infer Valid;
6090
+ } ? Valid : false : Profile<P> extends {
6091
+ kind: 'choice';
6092
+ exact: readonly (infer E)[];
6093
+ prefixes: readonly (infer Prefix extends string)[];
6094
+ } ? V extends E | `${Prefix}${string}` | (Profile<P> extends {
6095
+ allowEmpty: true;
6096
+ } ? '' : never) ? true : Dynamic<V> : Profile<P> extends {
6097
+ kind: 'text';
6098
+ blank: infer Blank extends string;
6099
+ forbiddenFirst: infer First extends string;
6100
+ forbidden: infer Forbidden extends string;
6101
+ } ? TextValue<V, Blank, First, Forbidden> : Profile<P> extends {
6102
+ kind: 'first-separator';
6103
+ separator: infer Sep extends string;
6104
+ allowUnseparated: infer Optional extends boolean;
6105
+ } ? Pair<V, Sep, Optional> : Profile<P> extends {
6106
+ kind: 'alpha-prefix';
6107
+ separator: infer Sep extends string;
6108
+ allowed: readonly (infer Allowed extends string)[];
6109
+ } ? AlphaPrefix<V, Sep, Allowed> : Profile<P> extends {
6110
+ kind: 'rename-score';
6111
+ parts: infer Parts extends 1 | 2;
6112
+ } ? ScoreText<V, Parts> : Profile<P> extends {
6113
+ kind: 'character-set';
6114
+ characters: infer Characters extends string;
6115
+ } ? CharacterSetText<V, Characters> : Profile<P> extends {
6116
+ kind: 'resetting-token-list';
6117
+ } ? Dynamic<V> extends true ? true : ResetTokenList<V, Profile<P>> : Profile<P> extends {
6118
+ kind: 'trailing-token-list';
6119
+ separator: infer Separator extends string;
6120
+ exact: readonly (infer Exact extends string)[];
6121
+ } ? Dynamic<V> extends true ? true : TrailingTokenList<V, Separator, Exact> : Profile<P> extends {
6122
+ kind: 'dirstat-params';
6123
+ separator: infer Separator extends string;
6124
+ exact: readonly (infer Exact extends string)[];
6125
+ } ? Dynamic<V> extends true ? true : V extends '' ? true : DirstatTokens<V, Separator, Exact> : false : V extends true ? Profile<P> extends {
6126
+ kind: 'rename-score' | 'dirstat-params';
6127
+ } ? true : false : false;
6128
+ type StringCallbackLiteral<V, P extends StringCallbackParser> = false extends Parsed<V, P> ? false : true;
5359
6129
 
5360
6130
  type MaybeGitDisabled<V> = V extends unknown ? GitEnabledLiteral<V> extends true ? never : V : never;
5361
6131
  type MaybeGitEnabled<V> = V extends unknown ? GitEnabledLiteral<V> extends false ? never : V : never;
@@ -5530,7 +6300,15 @@ type Unless<T, W> = W extends Predicate ? Reject<T, W> : W extends readonly Pred
5530
6300
  type Apply<T, R extends Constraint> = R extends {
5531
6301
  guard: infer G extends readonly Predicate[];
5532
6302
  } ? NotEvery<T, G> | ApplyBody<T, R> : ApplyBody<T, R>;
5533
- type ScalarValue<V, P, Negative extends boolean = false> = V extends undefined ? V : P extends 'blame-line-range' ? BlameLineRangeLiteral<V> extends true ? V : never : P extends GitBooleanCallback ? GitBooleanCallbackLiteral<V, P> extends true ? V : never : P extends GitNumericParser ? GitNumericLiteral<V, P> extends true ? V : never : P extends 'depth-initial' ? DepthInitialLiteral<V> extends true ? V : never : P extends 'object-filter' | 'object-filter-auto' ? V extends undefined ? V : V extends string ? ObjectFilterLiteral<V, P extends 'object-filter-auto' ? true : false, Negative> extends true ? V : never : never : V;
6303
+ type SkipRemotes<V extends string> = V extends `remotes/${infer R}` ? R : V;
6304
+ type SkipRefs<V extends string> = V extends `refs/${infer R}` ? SkipRemotes<R> : SkipRemotes<V>;
6305
+ type TrackStartPointCheck<V extends string> = string extends V ? true : SkipRefs<V> extends `${infer _Remote}/${infer Branch}` ? Branch extends '' ? false : BranchNameLiteral<Branch> : false;
6306
+ /**
6307
+ * --track without -c/-C/--orphan needs a start point with a nonempty valid branch name after its
6308
+ * first '/'.
6309
+ */
6310
+ type TrackStartPointLiteral<V> = [V] extends [string] ? false extends (V extends string ? TrackStartPointCheck<V> : false) ? false : true : false;
6311
+ type ScalarValue<V, P, Negative extends boolean = false> = V extends undefined ? V : P extends 'blame-line-range' ? BlameLineRangeLiteral<V> extends true ? V : never : P extends 'log-line-range' ? LogLineRangeLiteral<V> extends true ? V : never : P extends 'track-start-point' ? TrackStartPointLiteral<V> extends true ? V : never : P extends GitBooleanCallback ? GitBooleanCallbackLiteral<V, P> extends true ? V : never : P extends GitNumericParser ? GitNumericLiteral<V, P> extends true ? V : never : P extends 'depth-initial' ? DepthInitialLiteral<V> extends true ? V : never : P extends 'branch-name' ? BranchNameLiteral<V> extends true ? V : never : P extends 'refname-onelevel' ? RefnameOnelevelLiteral<V> extends true ? V : never : P extends 'commit-author' ? CommitAuthorLiteral<V> extends true ? V : never : P extends 'object-filter' | 'object-filter-auto' ? V extends undefined ? V : V extends string ? ObjectFilterLiteral<V, P extends 'object-filter-auto' ? true : false, Negative> extends true ? V : never : never : P extends StringCallbackParser ? StringCallbackLiteral<V, P> extends true ? V : never : P extends PushRefspecParser ? PushRefspecLiteral<V, P> extends true ? V : never : P extends ConfigParameterParser ? ConfigParameterLiteral<V, P> extends true ? V : never : V;
5534
6312
  type ScalarList<V, P> = V extends undefined ? V : V extends readonly unknown[] ? {
5535
6313
  [I in keyof V]: ScalarValue<Exclude<V[I], undefined>, P>;
5536
6314
  } : never;
@@ -5598,6 +6376,9 @@ type ApplyBody<T, R extends Constraint> = R extends {
5598
6376
  kind: 'forbid';
5599
6377
  when: infer P extends readonly Predicate[];
5600
6378
  } ? NotEvery<T, P> : R extends {
6379
+ kind: 'elements';
6380
+ maxOutside: number;
6381
+ } ? unknown : R extends {
5601
6382
  kind: 'elements';
5602
6383
  key: infer K extends keyof T;
5603
6384
  allowed: infer V extends readonly unknown[];
@@ -5880,6 +6661,13 @@ interface RepoBase {
5880
6661
  * Execute a raw git command in this repository context
5881
6662
  *
5882
6663
  * Wraps: `git <argv...>`
6664
+ *
6665
+ * `argv` is passed to Git unchanged and is not checked, so build it only from trusted values.
6666
+ * A word from untrusted input can become an option such as `--upload-pack=<command>`.
6667
+ * Send untrusted data through `opts.stdin`, or use the high-level API or strict `command()`,
6668
+ * which refuse operands that Git would parse as options. `stdin` is only safe for commands that
6669
+ * read it as data (such as `hash-object --stdin`); commands that read it as instructions (such
6670
+ * as `fast-import` or `update-ref --stdin`) must not receive untrusted input.
5883
6671
  */
5884
6672
  raw(argv: string[], opts?: CommandExecOpts): Promise<RawResult>;
5885
6673
  /**
@@ -6086,7 +6874,10 @@ type StatusOpts = CheckedOptions<{
6086
6874
  ignoreSubmodules?: 'none' | 'untracked' | 'dirty' | 'all';
6087
6875
  /** Do not detect renames */
6088
6876
  noRenames?: boolean;
6089
- /** Detect renames (optionally with similarity threshold) */
6877
+ /**
6878
+ * Detect renames. A number is the similarity threshold as a whole percentage from 1 to
6879
+ * 100 (`50` means 50%), emitted as `--find-renames=<n>%`.
6880
+ */
6090
6881
  findRenames?: boolean | number;
6091
6882
  }, 'status'>;
6092
6883
  /**
@@ -6393,7 +7184,13 @@ type BranchCreateOpts = {
6393
7184
  force?: boolean;
6394
7185
  /** Set up tracking */
6395
7186
  track?: boolean;
6396
- /** Set up upstream configuration for the new branch */
7187
+ /**
7188
+ * Set the upstream of the new branch after creating it. Git treats --set-upstream-to as a
7189
+ * separate action, so this runs `git branch --set-upstream-to` as a second command. If that
7190
+ * fails (for example because the upstream is not a branch), the branch has already been
7191
+ * created, or with `force` an existing branch has already been reset. Cannot be combined
7192
+ * with `recurseSubmodules`.
7193
+ */
6397
7194
  setUpstreamTo?: string;
6398
7195
  /** Create the branch's reflog */
6399
7196
  createReflog?: boolean;
@@ -6845,7 +7642,10 @@ type StashPushOpts = CheckedOptions<{
6845
7642
  * Options for git stash pop/apply
6846
7643
  */
6847
7644
  type StashApplyOpts = {
6848
- /** Stash index to apply */
7645
+ /**
7646
+ * Stash entry number (`stash@{<index>}`): an integer from 0 to 99999999, because Git reads
7647
+ * larger numbers as timestamps.
7648
+ */
6849
7649
  index?: number;
6850
7650
  /** Try to reinstate index */
6851
7651
  reinstateIndex?: boolean;
@@ -7026,7 +7826,9 @@ type MvOpts = {
7026
7826
  * Options for git rebase
7027
7827
  */
7028
7828
  type RebaseOpts = CheckedOptions<{
7029
- /** Upstream branch */
7829
+ /**
7830
+ * Upstream branch. With `root`, Git takes this operand as the branch to rebase instead.
7831
+ */
7030
7832
  upstream?: string;
7031
7833
  /** Onto target */
7032
7834
  onto?: string;
@@ -7066,8 +7868,8 @@ type RebaseOpts = CheckedOptions<{
7066
7868
  apply?: boolean;
7067
7869
  /** Automatically update rerere state */
7068
7870
  rerereAutoupdate?: boolean;
7069
- /** How to handle empty commits */
7070
- empty?: 'drop' | 'keep' | 'ask';
7871
+ /** How to handle commits that become empty ('ask' is Git's deprecated synonym of 'stop') */
7872
+ empty?: 'drop' | 'keep' | 'stop' | 'ask';
7071
7873
  /** Automatically squash fixup commits */
7072
7874
  autosquash?: boolean;
7073
7875
  /** Update refs that point to rebased commits */
@@ -8963,8 +9765,8 @@ interface WorktreeRepo extends RepoBase {
8963
9765
  *
8964
9766
  * @example
8965
9767
  * ```typescript
8966
- * await repo.reset('HEAD~1', { hard: true });
8967
- * await repo.reset({ soft: true });
9768
+ * await repo.reset('HEAD~1', { mode: 'hard' });
9769
+ * await repo.reset(undefined, { mode: 'soft' });
8968
9770
  * ```
8969
9771
  */
8970
9772
  reset(target?: string, opts?: ResetOpts & ExecOpts): Promise<void>;
@@ -9681,6 +10483,13 @@ interface Git {
9681
10483
  * Execute a raw git command (repository-agnostic)
9682
10484
  *
9683
10485
  * Wraps: `git <argv...>`
10486
+ *
10487
+ * `argv` is passed to Git unchanged and is not checked, so build it only from trusted values.
10488
+ * A word from untrusted input can become an option such as `--upload-pack=<command>`.
10489
+ * Send untrusted data through `opts.stdin`, or use the high-level API or strict `command()`,
10490
+ * which refuse operands that Git would parse as options. `stdin` is only safe for commands that
10491
+ * read it as data (such as `hash-object --stdin`); commands that read it as instructions (such
10492
+ * as `fast-import` or `update-ref --stdin`) must not receive untrusted input.
9684
10493
  */
9685
10494
  raw(argv: string[], opts?: CommandExecOpts): Promise<RawResult>;
9686
10495
  /**
@@ -9703,4 +10512,4 @@ interface Git {
9703
10512
  lfs: GlobalLfsOperations;
9704
10513
  }
9705
10514
 
9706
- export { type GitTimestampParser as $, type AuditConfig as A, type BareRepo as B, type Capabilities as C, type Digit$2 as D, type EnvInheritance as E, type FastImportUnsignedParser as F, type Git as G, type GitNumericParser as H, type InitOpts as I, type Constrained as J, type GitNumericLiteral as K, type LsRemoteOpts as L, type GitBooleanCallback as M, type NumberLiteralOrder as N, type GitBooleanCallbackLiteral as O, type Predicate as P, type ObjectFilterLiteral as Q, type RawResult as R, type SafeIntegerAtLeast as S, type Trim$2 as T, type UrlBytes as U, type AsciiUpper as V, type WorktreeRepo as W, type AsciiLower as X, type GitNumericValue as Y, type GitBooleanCallbackValue as Z, type ConstraintRequirement as _, type CompanionExecutable as a, type DiffResult as a$, type GitDecimalCallback as a0, type LegacyGitDecimal as a1, type GitIntegerParser as a2, type GitOutputMode as a3, detectErrorCategory as a4, GIT_LOG_FORMAT as a5, type GitProgressInfo as a6, type LfsProgressInfo as a7, type LsRemoteRef as a8, type LsTreeObjectType$1 as a9, type GlobalLfsUninstallOpts as aA, type GlobalConfigListOpts as aB, type RepoBase as aC, type RepoLsRemoteOpts as aD, type RepoLsRemoteResult as aE, type LsTreeEntry as aF, type LsTreeOpts as aG, type StatusEntry as aH, type StatusPorcelain as aI, type StatusOpts as aJ, type Commit as aK, type LogOpts as aL, type FetchOpts as aM, type ForceWithLeaseOpts as aN, type PushOpts as aO, type AddOpts as aP, type BranchInfo as aQ, type BranchOpts as aR, type BranchCreateOpts as aS, type BranchDeleteOpts as aT, type CheckoutBranchOpts as aU, type CheckoutPathOpts as aV, type CheckoutOpts as aW, type CommitOpts as aX, type CommitResult as aY, type DiffOpts as aZ, type DiffEntry as a_, type ParsedCommit as aa, type ParsedLsTreeEntry as ab, type ParsedWorktree as ac, type PorcelainV2Entry as ad, parseGitLog as ae, parseGitProgress as af, parseJson as ag, parseKeyValue as ah, parseLfsProgress as ai, parseLines as aj, parseLsRemote as ak, parseLsTree as al, parsePorcelainV2 as am, parseRecords as an, parseWorktreeList as ao, type CloneConfigSchema as ap, type CloneHttpVariable as aq, type CloneConfigKey as ar, type CloneConfig as as, isCloneConfigKey as at, cloneConfigArgs as au, type EnvAllowlistAdjustment as av, type EnvInheritancePredicate as aw, DEFAULT_ENV_ALLOWLIST as ax, resolveInheritedEnv as ay, type GlobalLfsInstallOpts as az, type ExecutionContext as b, type LfsPreDownloadResult as b$, type MergeOpts as b0, type MergeResult as b1, type PullOpts as b2, type ResetOpts as b3, type RmOpts as b4, type StashEntry as b5, type StashPushOpts as b6, type StashApplyOpts as b7, type SwitchOpts as b8, type TagInfo as b9, type SubmoduleSyncOpts as bA, type SubmoduleSetBranchOpts as bB, type SubmoduleInfo as bC, type LfsStatus as bD, type LfsPullOpts as bE, type LfsPushOpts as bF, type LfsStatusOpts as bG, type LfsPruneOpts as bH, type LfsFetchOpts as bI, type RepoLfsInstallOpts as bJ, type RepoLfsUninstallOpts as bK, type LfsFileEntry as bL, type LfsLsFilesOpts as bM, type LfsTrackEntry as bN, type LfsTrackOpts as bO, type LfsLockEntry as bP, type LfsLockOpts as bQ, type LfsUnlockOpts as bR, type LfsLocksOpts as bS, type LfsCheckoutOpts as bT, type LfsMigrateInfoOpts as bU, type LfsMigrateImportOpts as bV, type LfsMigrateExportOpts as bW, type LfsEnvInfo as bX, type LfsPreUploadOpts as bY, type LfsPreUploadResult as bZ, type LfsPreDownloadOpts as b_, type TagListOpts as ba, type TagCreateOpts as bb, type CherryPickOpts as bc, type CleanOpts as bd, type MvOpts as be, type RebaseOpts as bf, type RestoreOpts as bg, type RevertOpts as bh, type ShowOpts as bi, type RevParsePathQuery as bj, type RevParseBooleanQuery as bk, type RevParseListOpts as bl, type RevParseListQuery as bm, type RevParseRefBaseOpts as bn, type RevParseRefOpts as bo, type RevParseQuietRefOpts as bp, type RevParseAnyRefOpts as bq, type RevParseOtherQuery as br, type RevParsePathFormat as bs, type RevParsePathOpts as bt, type SubmoduleOpts as bu, type SubmoduleAddOpts as bv, type SubmoduleDeinitOpts as bw, type SubmoduleStatusOpts as bx, type SubmoduleSummaryOpts as by, type SubmoduleForeachOpts as bz, type ExecOpts as c, type Worktree as c0, type WorktreeAddOpts as c1, type WorktreeRemoveOpts as c2, type WorktreePruneOpts as c3, type WorktreeMoveOpts as c4, type WorktreeRepairOpts as c5, type WorktreeLockOpts as c6, type WorktreeOperations as c7, type LfsOperations as c8, type LfsExtraOperations as c9, type GitErrorKind as cA, type GitErrorCategory as cB, GitArgumentError as cC, type Runtime as cD, type LfsMode as cE, type OutputContract as cF, type CommandSpec as cG, type CredentialRequest as cH, type Credential as cI, type CredentialConfig as cJ, type AuditEventStart as cK, type AuditEventEnd as cL, type AuditEvent as cM, type TraceEvent as cN, type BranchOperations as ca, type StashOperations as cb, type TagOperations as cc, type RemoteInfo as cd, type RemoteAddOpts as ce, type RemoteSetHeadOpts as cf, type RemoteShowOpts as cg, type RemotePruneOpts as ch, type RemoteUpdateOpts as ci, type RemoteSetBranchesOpts as cj, type RemoteUrlOpts as ck, type RemoteOperations as cl, type ConfigEntry as cm, type ConfigGetOpts as cn, type ConfigSetOpts as co, type ConfigListOpts as cp, type ConfigSchema as cq, type ConfigKey as cr, type ConfigOperations as cs, type SubmoduleOperations as ct, type NonEmptyString as cu, nonEmpty as cv, isNonEmpty as cw, type GitProgress as cx, type LfsProgress as cy, type GitOutput as cz, GitError as d, type GitOpenOptions as e, type CloneOpts as f, type LsRemoteResult as g, type CommandExecOpts as h, type GlobalConfigOperations as i, type GlobalLfsOperations as j, type CompoundDecimalParser as k, COMPOUND_DECIMALS as l, type GitDecimalParser as m, type GitDecimalLiteral as n, type GitDecimalValue as o, type AtMost$1 as p, type AddDigit as q, type GitIntegerValue as r, type StringCallbackParser as s, STRING_CALLBACKS as t, type GitScalarParser as u, type Evidence as v, type Constraint as w, type GitBooleanSource as x, type GitDecimalCallbacks as y, type GitIntegerProfile as z };
10515
+ export { type ConstraintRequirement as $, type AuditConfig as A, type BareRepo as B, type Capabilities as C, type Digit$4 as D, type EnvInheritance as E, type FastImportUnsignedParser as F, type Git as G, type GitNumericLiteral as H, type InitOpts as I, type GitBooleanCallback as J, type GitBooleanCallbackLiteral as K, type LsRemoteOpts as L, type AsciiUpper as M, type NumberLiteralOrder as N, type ObjectFilterLiteral as O, type Predicate as P, type StringCallbackParser as Q, type RawResult as R, type SafeIntegerAtLeast as S, type Trim$2 as T, type UrlBytes as U, type StringCallbackLiteral as V, type WorktreeRepo as W, type AsciiLower as X, type GitNumericValue as Y, type GitBooleanCallbackValue as Z, type StringCallbackValue as _, type CompanionExecutable as a, type DiffEntry as a$, type GitTimestampParser as a0, type GitDecimalCallback as a1, type LegacyGitDecimal as a2, type GitIntegerParser as a3, type GitOutputMode as a4, detectErrorCategory as a5, GIT_LOG_FORMAT as a6, type GitProgressInfo as a7, type LfsProgressInfo as a8, type LsRemoteRef as a9, type GlobalLfsInstallOpts as aA, type GlobalLfsUninstallOpts as aB, type GlobalConfigListOpts as aC, type RepoBase as aD, type RepoLsRemoteOpts as aE, type RepoLsRemoteResult as aF, type LsTreeEntry as aG, type LsTreeOpts as aH, type StatusEntry as aI, type StatusPorcelain as aJ, type StatusOpts as aK, type Commit as aL, type LogOpts as aM, type FetchOpts as aN, type ForceWithLeaseOpts as aO, type PushOpts as aP, type AddOpts as aQ, type BranchInfo as aR, type BranchOpts as aS, type BranchCreateOpts as aT, type BranchDeleteOpts as aU, type CheckoutBranchOpts as aV, type CheckoutPathOpts as aW, type CheckoutOpts as aX, type CommitOpts as aY, type CommitResult as aZ, type DiffOpts as a_, type LsTreeObjectType$1 as aa, type ParsedCommit as ab, type ParsedLsTreeEntry as ac, type ParsedWorktree as ad, type PorcelainV2Entry as ae, parseGitLog as af, parseGitProgress as ag, parseJson as ah, parseKeyValue as ai, parseLfsProgress as aj, parseLines as ak, parseLsRemote as al, parseLsTree as am, parsePorcelainV2 as an, parseRecords as ao, parseWorktreeList as ap, type CloneConfigSchema as aq, type CloneHttpVariable as ar, type CloneConfigKey as as, type CloneConfig as at, isCloneConfigKey as au, cloneConfigArgs as av, type EnvAllowlistAdjustment as aw, type EnvInheritancePredicate as ax, DEFAULT_ENV_ALLOWLIST as ay, resolveInheritedEnv as az, type ExecutionContext as b, type LfsPreDownloadOpts as b$, type DiffResult as b0, type MergeOpts as b1, type MergeResult as b2, type PullOpts as b3, type ResetOpts as b4, type RmOpts as b5, type StashEntry as b6, type StashPushOpts as b7, type StashApplyOpts as b8, type SwitchOpts as b9, type SubmoduleForeachOpts as bA, type SubmoduleSyncOpts as bB, type SubmoduleSetBranchOpts as bC, type SubmoduleInfo as bD, type LfsStatus as bE, type LfsPullOpts as bF, type LfsPushOpts as bG, type LfsStatusOpts as bH, type LfsPruneOpts as bI, type LfsFetchOpts as bJ, type RepoLfsInstallOpts as bK, type RepoLfsUninstallOpts as bL, type LfsFileEntry as bM, type LfsLsFilesOpts as bN, type LfsTrackEntry as bO, type LfsTrackOpts as bP, type LfsLockEntry as bQ, type LfsLockOpts as bR, type LfsUnlockOpts as bS, type LfsLocksOpts as bT, type LfsCheckoutOpts as bU, type LfsMigrateInfoOpts as bV, type LfsMigrateImportOpts as bW, type LfsMigrateExportOpts as bX, type LfsEnvInfo as bY, type LfsPreUploadOpts as bZ, type LfsPreUploadResult as b_, type TagInfo as ba, type TagListOpts as bb, type TagCreateOpts as bc, type CherryPickOpts as bd, type CleanOpts as be, type MvOpts as bf, type RebaseOpts as bg, type RestoreOpts as bh, type RevertOpts as bi, type ShowOpts as bj, type RevParsePathQuery as bk, type RevParseBooleanQuery as bl, type RevParseListOpts as bm, type RevParseListQuery as bn, type RevParseRefBaseOpts as bo, type RevParseRefOpts as bp, type RevParseQuietRefOpts as bq, type RevParseAnyRefOpts as br, type RevParseOtherQuery as bs, type RevParsePathFormat as bt, type RevParsePathOpts as bu, type SubmoduleOpts as bv, type SubmoduleAddOpts as bw, type SubmoduleDeinitOpts as bx, type SubmoduleStatusOpts as by, type SubmoduleSummaryOpts as bz, type ExecOpts as c, type LfsPreDownloadResult as c0, type Worktree as c1, type WorktreeAddOpts as c2, type WorktreeRemoveOpts as c3, type WorktreePruneOpts as c4, type WorktreeMoveOpts as c5, type WorktreeRepairOpts as c6, type WorktreeLockOpts as c7, type WorktreeOperations as c8, type LfsOperations as c9, type GitOutput as cA, type GitErrorKind as cB, type GitErrorCategory as cC, GitArgumentError as cD, type Runtime as cE, type LfsMode as cF, type OutputContract as cG, type CommandSpec as cH, type CredentialRequest as cI, type Credential as cJ, type CredentialConfig as cK, type AuditEventStart as cL, type AuditEventEnd as cM, type AuditEvent as cN, type TraceEvent as cO, type LfsExtraOperations as ca, type BranchOperations as cb, type StashOperations as cc, type TagOperations as cd, type RemoteInfo as ce, type RemoteAddOpts as cf, type RemoteSetHeadOpts as cg, type RemoteShowOpts as ch, type RemotePruneOpts as ci, type RemoteUpdateOpts as cj, type RemoteSetBranchesOpts as ck, type RemoteUrlOpts as cl, type RemoteOperations as cm, type ConfigEntry as cn, type ConfigGetOpts as co, type ConfigSetOpts as cp, type ConfigListOpts as cq, type ConfigSchema as cr, type ConfigKey as cs, type ConfigOperations as ct, type SubmoduleOperations as cu, type NonEmptyString as cv, nonEmpty as cw, isNonEmpty as cx, type GitProgress as cy, type LfsProgress as cz, GitError as d, type GitOpenOptions as e, type CloneOpts as f, type LsRemoteResult as g, type CommandExecOpts as h, type GlobalConfigOperations as i, type GlobalLfsOperations as j, type CompoundDecimalParser as k, COMPOUND_DECIMALS as l, type GitDecimalParser as m, type GitDecimalLiteral as n, type GitDecimalValue as o, type AtMost$1 as p, type AddDigit as q, type GitIntegerValue as r, type GitScalarParser as s, type Evidence as t, type Constraint as u, type GitBooleanSource as v, type GitDecimalCallbacks as w, type GitIntegerProfile as x, type GitNumericParser as y, type Constrained as z };