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.
- package/README.md +100 -0
- package/dist/adapters/bun/index.cjs +19 -8
- package/dist/adapters/bun/index.d.cts +3 -2
- package/dist/adapters/bun/index.d.ts +3 -2
- package/dist/adapters/bun/index.js +14 -3
- package/dist/adapters/deno/index.cjs +23 -8
- package/dist/adapters/deno/index.d.cts +3 -2
- package/dist/adapters/deno/index.d.ts +3 -2
- package/dist/adapters/deno/index.js +17 -2
- package/dist/adapters/node/index.cjs +4 -4
- package/dist/adapters/node/index.d.cts +3 -2
- package/dist/adapters/node/index.d.ts +3 -2
- package/dist/adapters/node/index.js +3 -3
- package/dist/{chunk-MFY7MGIJ.cjs → chunk-6HDMSFY7.cjs} +1388 -129
- package/dist/{chunk-YIWTIIXH.js → chunk-ADC26634.js} +467 -27
- package/dist/{chunk-X3F6MDXQ.cjs → chunk-JDCCYWIX.cjs} +18 -7
- package/dist/{chunk-IAJF67MB.js → chunk-S3EFBFVP.js} +13 -2
- package/dist/{chunk-5NI3KM5Z.js → chunk-UAKOSACD.js} +1329 -70
- package/dist/{chunk-NBX6BNQF.cjs → chunk-UHZWPYTF.cjs} +1421 -981
- package/dist/{client.d-Cs32YZX6.d.ts → client.d-Cg5wWJnY.d.cts} +20 -2
- package/dist/{client.d-PRQCR2_T.d.cts → client.d-DCiFA_CK.d.ts} +20 -2
- package/dist/{git.d-DrhCzWEn.d.cts → git.d-DqAvRXEf.d.cts} +926 -117
- package/dist/index.cjs +4 -4
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/strict/command-data.cjs +3 -0
- package/dist/strict/index.cjs +235 -206
- package/dist/strict/index.d.cts +66309 -124868
- package/dist/strict/index.js +32 -3
- package/package.json +1 -1
|
@@ -1153,6 +1153,103 @@ function parseBooleanCallback(parser, value, previous, source = "modern", binary
|
|
|
1153
1153
|
return Object.hasOwn(profile.names, name) ? { valid: true, value: profile.names[name] } : { valid: false };
|
|
1154
1154
|
}
|
|
1155
1155
|
|
|
1156
|
+
// src/constraints/log-line-range.ts
|
|
1157
|
+
var WHITE = " \n\v\f\r";
|
|
1158
|
+
var LONG_MAX = 9223372036854775807n;
|
|
1159
|
+
function strtol(text, start) {
|
|
1160
|
+
let index = start;
|
|
1161
|
+
while (index < text.length && WHITE.includes(text[index])) {
|
|
1162
|
+
index++;
|
|
1163
|
+
}
|
|
1164
|
+
let negative = false;
|
|
1165
|
+
if (text[index] === "+" || text[index] === "-") {
|
|
1166
|
+
negative = text[index] === "-";
|
|
1167
|
+
index++;
|
|
1168
|
+
}
|
|
1169
|
+
const digits = index;
|
|
1170
|
+
let nonzero = false;
|
|
1171
|
+
while (index < text.length && text[index] >= "0" && text[index] <= "9") {
|
|
1172
|
+
nonzero ||= text[index] !== "0";
|
|
1173
|
+
index++;
|
|
1174
|
+
}
|
|
1175
|
+
if (index === digits) {
|
|
1176
|
+
return void 0;
|
|
1177
|
+
}
|
|
1178
|
+
const saturated = !negative && BigInt(text.slice(digits, index)) >= LONG_MAX;
|
|
1179
|
+
return { end: index, positive: nonzero && !negative, saturated };
|
|
1180
|
+
}
|
|
1181
|
+
function scanLocation(text, start, first) {
|
|
1182
|
+
if (strtol(text, start)) {
|
|
1183
|
+
return strtol(text, start).end;
|
|
1184
|
+
}
|
|
1185
|
+
let spec = start;
|
|
1186
|
+
if (first && text[spec] === "^") {
|
|
1187
|
+
spec++;
|
|
1188
|
+
}
|
|
1189
|
+
if (text[spec] !== "/") {
|
|
1190
|
+
return spec;
|
|
1191
|
+
}
|
|
1192
|
+
let term = spec + 1;
|
|
1193
|
+
while (term < text.length && text[term] !== "/") {
|
|
1194
|
+
if (text[term] === "\\") {
|
|
1195
|
+
term++;
|
|
1196
|
+
if (term >= text.length) {
|
|
1197
|
+
return void 0;
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
term++;
|
|
1201
|
+
}
|
|
1202
|
+
return text[term] === "/" ? term + 1 : spec;
|
|
1203
|
+
}
|
|
1204
|
+
function skipRange(text) {
|
|
1205
|
+
if (text[0] === ":" || text[0] === "^" && text[1] === ":") {
|
|
1206
|
+
const colon = text[0] === "^" ? 1 : 0;
|
|
1207
|
+
let term = colon + 1;
|
|
1208
|
+
while (term < text.length && text[term] !== ":") {
|
|
1209
|
+
if (text[term] === "\\" && term + 1 < text.length) {
|
|
1210
|
+
term++;
|
|
1211
|
+
}
|
|
1212
|
+
term++;
|
|
1213
|
+
}
|
|
1214
|
+
return term === colon + 1 ? null : term;
|
|
1215
|
+
}
|
|
1216
|
+
const first = scanLocation(text, 0, true);
|
|
1217
|
+
if (first === void 0 || text[first] !== ",") {
|
|
1218
|
+
return first;
|
|
1219
|
+
}
|
|
1220
|
+
return scanLocation(text, first + 1, false);
|
|
1221
|
+
}
|
|
1222
|
+
function validNumbers(range) {
|
|
1223
|
+
if (range.startsWith(":") || range.startsWith("^:")) {
|
|
1224
|
+
return true;
|
|
1225
|
+
}
|
|
1226
|
+
const first = strtol(range, 0);
|
|
1227
|
+
if (first && !first.positive) {
|
|
1228
|
+
return false;
|
|
1229
|
+
}
|
|
1230
|
+
const comma = first ? first.end : scanLocation(range, 0, true) ?? range.length;
|
|
1231
|
+
if (range[comma] !== ",") {
|
|
1232
|
+
return true;
|
|
1233
|
+
}
|
|
1234
|
+
const second = range.slice(comma + 1);
|
|
1235
|
+
if ((second.startsWith("+") || second.startsWith("-")) && !first?.saturated) {
|
|
1236
|
+
const length = strtol(second, 1);
|
|
1237
|
+
return !length || /[1-9]/.test(second.slice(1, length.end));
|
|
1238
|
+
}
|
|
1239
|
+
const end = strtol(second, 0);
|
|
1240
|
+
return !end || end.positive;
|
|
1241
|
+
}
|
|
1242
|
+
function validLogLineRange(value) {
|
|
1243
|
+
if (typeof value !== "string") {
|
|
1244
|
+
return false;
|
|
1245
|
+
}
|
|
1246
|
+
const name = skipRange(value);
|
|
1247
|
+
if (name === null || name === void 0 || value[name] !== ":" || name + 1 >= value.length) {
|
|
1248
|
+
return false;
|
|
1249
|
+
}
|
|
1250
|
+
return validNumbers(value.slice(0, name));
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1156
1253
|
// src/constraints/string-callbacks.generated.ts
|
|
1157
1254
|
var STRING_CALLBACKS = {
|
|
1158
1255
|
"anonymize-map": {
|
|
@@ -1265,6 +1362,38 @@ var STRING_CALLBACKS = {
|
|
|
1265
1362
|
allowBare: true,
|
|
1266
1363
|
exact: ["changes", "lines", "files", "noncumulative", "cumulative"],
|
|
1267
1364
|
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."
|
|
1365
|
+
},
|
|
1366
|
+
"commit-fixup": {
|
|
1367
|
+
kind: "alpha-prefix",
|
|
1368
|
+
separator: ":",
|
|
1369
|
+
allowed: ["amend", "reword"],
|
|
1370
|
+
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"
|
|
1371
|
+
},
|
|
1372
|
+
"rebase-apply-context": {
|
|
1373
|
+
kind: "character-set",
|
|
1374
|
+
characters: "0123456789",
|
|
1375
|
+
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."
|
|
1376
|
+
},
|
|
1377
|
+
"rebase-whitespace": {
|
|
1378
|
+
kind: "choice",
|
|
1379
|
+
exact: ["nowarn", "warn", "error", "error-all", "fix", "strip"],
|
|
1380
|
+
prefixes: [],
|
|
1381
|
+
allowEmpty: true,
|
|
1382
|
+
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."
|
|
1383
|
+
},
|
|
1384
|
+
"rebase-trailer": {
|
|
1385
|
+
kind: "text",
|
|
1386
|
+
blank: "",
|
|
1387
|
+
forbiddenFirst: "=",
|
|
1388
|
+
forbidden: "",
|
|
1389
|
+
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."
|
|
1390
|
+
},
|
|
1391
|
+
"rebase-exec": {
|
|
1392
|
+
kind: "text",
|
|
1393
|
+
blank: " \r\f\v",
|
|
1394
|
+
forbiddenFirst: "",
|
|
1395
|
+
forbidden: "\n",
|
|
1396
|
+
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."
|
|
1268
1397
|
}
|
|
1269
1398
|
};
|
|
1270
1399
|
|
|
@@ -1335,7 +1464,7 @@ function parseStringCallback(parser, value) {
|
|
|
1335
1464
|
invalid = true;
|
|
1336
1465
|
}
|
|
1337
1466
|
}
|
|
1338
|
-
return { valid: !invalid
|
|
1467
|
+
return { valid: !(invalid || ordinary && exclusive), value };
|
|
1339
1468
|
}
|
|
1340
1469
|
if (profile.kind === "character-set") {
|
|
1341
1470
|
return {
|
|
@@ -1368,9 +1497,21 @@ function parseStringCallback(parser, value) {
|
|
|
1368
1497
|
if (profile.kind === "byte-character") {
|
|
1369
1498
|
return { valid: value === "" || value.length === 1 && value.charCodeAt(0) < 128, value };
|
|
1370
1499
|
}
|
|
1500
|
+
if (profile.kind === "alpha-prefix") {
|
|
1501
|
+
const name = /^[A-Za-z]+/.exec(value)?.[0];
|
|
1502
|
+
const named = name !== void 0 && value[name.length] === profile.separator;
|
|
1503
|
+
return { valid: !named || profile.allowed.includes(name), value };
|
|
1504
|
+
}
|
|
1371
1505
|
if (profile.kind === "choice") {
|
|
1372
1506
|
return {
|
|
1373
|
-
valid: profile.exact.includes(value) || profile.prefixes.some((prefix) => value.startsWith(prefix)),
|
|
1507
|
+
valid: profile.exact.includes(value) || profile.prefixes.some((prefix) => value.startsWith(prefix)) || value === "" && "allowEmpty" in profile && profile.allowEmpty === true,
|
|
1508
|
+
value
|
|
1509
|
+
};
|
|
1510
|
+
}
|
|
1511
|
+
if (profile.kind === "text") {
|
|
1512
|
+
const first = value[0];
|
|
1513
|
+
return {
|
|
1514
|
+
valid: [...value].some((character) => !profile.blank.includes(character)) && !(first !== void 0 && profile.forbiddenFirst.includes(first)) && ![...value].some((character) => profile.forbidden.includes(character)),
|
|
1374
1515
|
value
|
|
1375
1516
|
};
|
|
1376
1517
|
}
|
|
@@ -1412,6 +1553,315 @@ function nativeSizeTBits(architecture) {
|
|
|
1412
1553
|
return ["ia32", "arm", "mips", "mipsel", "ppc", "s390"].includes(architecture) ? 32 : 64;
|
|
1413
1554
|
}
|
|
1414
1555
|
|
|
1556
|
+
// src/constraints/commit-ident.ts
|
|
1557
|
+
var GIT_SPACE = /[ \t\n\r]+$/;
|
|
1558
|
+
function crud(code) {
|
|
1559
|
+
return code <= 32 || code === 44 || code === 58 || code === 59 || code === 60 || code === 62 || code === 34 || code === 92 || code === 39;
|
|
1560
|
+
}
|
|
1561
|
+
function validCommitAuthor(value) {
|
|
1562
|
+
if (typeof value !== "string") {
|
|
1563
|
+
return false;
|
|
1564
|
+
}
|
|
1565
|
+
if (!value.includes(">")) {
|
|
1566
|
+
return true;
|
|
1567
|
+
}
|
|
1568
|
+
const open = value.indexOf("<");
|
|
1569
|
+
if (open < 0 || value.indexOf(">", open + 1) < 0) {
|
|
1570
|
+
return false;
|
|
1571
|
+
}
|
|
1572
|
+
const name = value.slice(0, open).replace(GIT_SPACE, "");
|
|
1573
|
+
return [...name].some((character) => !crud(character.charCodeAt(0)));
|
|
1574
|
+
}
|
|
1575
|
+
var DIGIT = /[0-9]/;
|
|
1576
|
+
var ASCII_WORDS = /[A-Za-z]+/g;
|
|
1577
|
+
var MONTHS = [
|
|
1578
|
+
"january",
|
|
1579
|
+
"february",
|
|
1580
|
+
"march",
|
|
1581
|
+
"april",
|
|
1582
|
+
"may",
|
|
1583
|
+
"june",
|
|
1584
|
+
"july",
|
|
1585
|
+
"august",
|
|
1586
|
+
"september",
|
|
1587
|
+
"october",
|
|
1588
|
+
"november",
|
|
1589
|
+
"december"
|
|
1590
|
+
];
|
|
1591
|
+
var NUMBERS = /* @__PURE__ */ new Set([
|
|
1592
|
+
"one",
|
|
1593
|
+
"two",
|
|
1594
|
+
"three",
|
|
1595
|
+
"four",
|
|
1596
|
+
"five",
|
|
1597
|
+
"six",
|
|
1598
|
+
"seven",
|
|
1599
|
+
"eight",
|
|
1600
|
+
"nine",
|
|
1601
|
+
"ten",
|
|
1602
|
+
"last"
|
|
1603
|
+
]);
|
|
1604
|
+
var WORDS = /* @__PURE__ */ new Set([
|
|
1605
|
+
...NUMBERS,
|
|
1606
|
+
"yesterday",
|
|
1607
|
+
"noon",
|
|
1608
|
+
"midnight",
|
|
1609
|
+
"tea",
|
|
1610
|
+
"pm",
|
|
1611
|
+
"am",
|
|
1612
|
+
"now",
|
|
1613
|
+
"today"
|
|
1614
|
+
]);
|
|
1615
|
+
function validCommitDate(value) {
|
|
1616
|
+
if (typeof value !== "string") {
|
|
1617
|
+
return false;
|
|
1618
|
+
}
|
|
1619
|
+
if (DIGIT.test(value)) {
|
|
1620
|
+
return true;
|
|
1621
|
+
}
|
|
1622
|
+
const words = (value.match(ASCII_WORDS) ?? []).map((word) => word.toLowerCase());
|
|
1623
|
+
const touches = (lower) => WORDS.has(lower) || lower.length >= 3 && MONTHS.some((month) => month.startsWith(lower));
|
|
1624
|
+
const never = words.lastIndexOf("never");
|
|
1625
|
+
return never < 0 ? words.some(touches) : words.slice(never + 1).some(touches);
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
// src/constraints/refname.ts
|
|
1629
|
+
function forbiddenRefnameByte(code) {
|
|
1630
|
+
return code < 32 || code === 32 || code === 127 || code === 42 || code === 58 || code === 63 || code === 91 || code === 92 || code === 94 || code === 126;
|
|
1631
|
+
}
|
|
1632
|
+
function validRefnameFormat(refname, allowOnelevel = false, pattern = false) {
|
|
1633
|
+
if (refname === "@" || refname.includes("\0")) {
|
|
1634
|
+
return false;
|
|
1635
|
+
}
|
|
1636
|
+
let allowStar = pattern;
|
|
1637
|
+
const components = refname.split("/");
|
|
1638
|
+
if (components.length < 2 && !allowOnelevel) {
|
|
1639
|
+
return false;
|
|
1640
|
+
}
|
|
1641
|
+
for (const component of components) {
|
|
1642
|
+
if (component === "" || component.startsWith(".") || component.endsWith(".lock") || component.includes("..") || component.includes("@{")) {
|
|
1643
|
+
return false;
|
|
1644
|
+
}
|
|
1645
|
+
for (let index = 0; index < component.length; index += 1) {
|
|
1646
|
+
const code = component.charCodeAt(index);
|
|
1647
|
+
if (code === 42 && allowStar) {
|
|
1648
|
+
allowStar = false;
|
|
1649
|
+
} else if (forbiddenRefnameByte(code)) {
|
|
1650
|
+
return false;
|
|
1651
|
+
}
|
|
1652
|
+
}
|
|
1653
|
+
}
|
|
1654
|
+
return !refname.endsWith(".");
|
|
1655
|
+
}
|
|
1656
|
+
var NTH_PRIOR = /^@\{-[ \t\n\v\f\r]*\+?0*[1-9][0-9]*\}/;
|
|
1657
|
+
var BRANCH_MARK = /@\{(?:upstream|u|push)\}/gi;
|
|
1658
|
+
function branchNameSyntax(name) {
|
|
1659
|
+
if (name.startsWith("-")) {
|
|
1660
|
+
return false;
|
|
1661
|
+
}
|
|
1662
|
+
if (name.includes("@{")) {
|
|
1663
|
+
let end = NTH_PRIOR.exec(name)?.[0].length ?? 0;
|
|
1664
|
+
for (const mark of name.matchAll(BRANCH_MARK)) {
|
|
1665
|
+
end = Math.max(end, mark.index + mark[0].length);
|
|
1666
|
+
}
|
|
1667
|
+
if (end > 0) {
|
|
1668
|
+
return !name.includes(":") && validRefnameFormat(`refs/heads/x${name.slice(end)}`) ? "repository" : false;
|
|
1669
|
+
}
|
|
1670
|
+
}
|
|
1671
|
+
return name !== "HEAD" && validRefnameFormat(`refs/heads/${name}`);
|
|
1672
|
+
}
|
|
1673
|
+
function validNewBranchName(value) {
|
|
1674
|
+
return typeof value === "string" && branchNameSyntax(value) !== false;
|
|
1675
|
+
}
|
|
1676
|
+
|
|
1677
|
+
// src/constraints/push-refspecs.ts
|
|
1678
|
+
var FULL_OBJECT_NAME = /^(?:[0-9a-f]{40}|[0-9a-f]{64})$/i;
|
|
1679
|
+
function validRefspec(refspec, fetch) {
|
|
1680
|
+
let lhs = refspec;
|
|
1681
|
+
let negative = false;
|
|
1682
|
+
if (lhs.startsWith("+")) {
|
|
1683
|
+
lhs = lhs.slice(1);
|
|
1684
|
+
} else if (lhs.startsWith("^")) {
|
|
1685
|
+
negative = true;
|
|
1686
|
+
lhs = lhs.slice(1);
|
|
1687
|
+
}
|
|
1688
|
+
const colon = lhs.lastIndexOf(":");
|
|
1689
|
+
if (negative && colon >= 0) {
|
|
1690
|
+
return false;
|
|
1691
|
+
}
|
|
1692
|
+
if (!fetch && lhs === ":") {
|
|
1693
|
+
return true;
|
|
1694
|
+
}
|
|
1695
|
+
const dst = colon >= 0 ? lhs.slice(colon + 1) : void 0;
|
|
1696
|
+
const left = colon >= 0 ? lhs.slice(0, colon) : lhs;
|
|
1697
|
+
let glob = dst !== void 0 && dst.includes("*");
|
|
1698
|
+
if (left.includes("*")) {
|
|
1699
|
+
if (dst !== void 0 && !glob || dst === void 0 && !negative && fetch) {
|
|
1700
|
+
return false;
|
|
1701
|
+
}
|
|
1702
|
+
glob = true;
|
|
1703
|
+
} else if (glob) {
|
|
1704
|
+
return false;
|
|
1705
|
+
}
|
|
1706
|
+
const src = left === "@" ? "HEAD" : left;
|
|
1707
|
+
const valid = (name) => validRefnameFormat(name, true, glob);
|
|
1708
|
+
if (negative) {
|
|
1709
|
+
return src !== "" && (FULL_OBJECT_NAME.test(src) || valid(src));
|
|
1710
|
+
}
|
|
1711
|
+
if (fetch) {
|
|
1712
|
+
return (src === "" || valid(src)) && (dst === void 0 || dst === "" || valid(dst));
|
|
1713
|
+
}
|
|
1714
|
+
if (src !== "" && glob && !valid(src)) {
|
|
1715
|
+
return false;
|
|
1716
|
+
}
|
|
1717
|
+
if (dst === void 0) {
|
|
1718
|
+
return valid(src);
|
|
1719
|
+
}
|
|
1720
|
+
return dst !== "" && valid(dst);
|
|
1721
|
+
}
|
|
1722
|
+
function validRefspecWords(value, skip, mode) {
|
|
1723
|
+
const words = typeof value === "string" ? [value] : value;
|
|
1724
|
+
if (!Array.isArray(words)) {
|
|
1725
|
+
return false;
|
|
1726
|
+
}
|
|
1727
|
+
for (let index = skip; index < words.length; index++) {
|
|
1728
|
+
const word = words[index];
|
|
1729
|
+
if (word === "tag") {
|
|
1730
|
+
index++;
|
|
1731
|
+
if (index >= words.length) {
|
|
1732
|
+
return false;
|
|
1733
|
+
}
|
|
1734
|
+
const tag = words[index];
|
|
1735
|
+
if (typeof tag !== "string") {
|
|
1736
|
+
continue;
|
|
1737
|
+
}
|
|
1738
|
+
const refspec = mode === "fetch" ? `refs/tags/${tag}:refs/tags/${tag}` : `${mode === "delete" ? ":" : ""}refs/tags/${tag}`;
|
|
1739
|
+
if (!validRefspec(refspec, mode === "fetch")) {
|
|
1740
|
+
return false;
|
|
1741
|
+
}
|
|
1742
|
+
} else if (mode === "delete") {
|
|
1743
|
+
if (typeof word !== "string" || word === "" || word.includes(":") || !validRefspec(`:${word}`, false)) {
|
|
1744
|
+
return false;
|
|
1745
|
+
}
|
|
1746
|
+
} else if (typeof word === "string" && !validRefspec(word, mode === "fetch")) {
|
|
1747
|
+
return false;
|
|
1748
|
+
}
|
|
1749
|
+
}
|
|
1750
|
+
return true;
|
|
1751
|
+
}
|
|
1752
|
+
function validPushOptionText(value) {
|
|
1753
|
+
const items = typeof value === "string" ? [value] : value;
|
|
1754
|
+
return Array.isArray(items) && items.every((item) => typeof item !== "string" || !item.includes("\n"));
|
|
1755
|
+
}
|
|
1756
|
+
function validRemoteName(value) {
|
|
1757
|
+
return typeof value === "string" && validRefnameFormat(`refs/remotes/${value}/test`);
|
|
1758
|
+
}
|
|
1759
|
+
function parsePushRefspecs(parser, value) {
|
|
1760
|
+
switch (parser) {
|
|
1761
|
+
case "refspec-operands":
|
|
1762
|
+
return validRefspecWords(value, 1, "push");
|
|
1763
|
+
case "push-delete-operands":
|
|
1764
|
+
return validRefspecWords(value, 1, "delete");
|
|
1765
|
+
case "refspec-words":
|
|
1766
|
+
return validRefspecWords(value, 0, "push");
|
|
1767
|
+
case "push-delete-refspecs":
|
|
1768
|
+
return validRefspecWords(value, 0, "delete");
|
|
1769
|
+
case "fetch-refspec-operands":
|
|
1770
|
+
return validRefspecWords(value, 1, "fetch");
|
|
1771
|
+
case "fetch-refspec-words":
|
|
1772
|
+
return validRefspecWords(value, 0, "fetch");
|
|
1773
|
+
case "push-option-text":
|
|
1774
|
+
return validPushOptionText(value);
|
|
1775
|
+
case "remote-name":
|
|
1776
|
+
return validRemoteName(value);
|
|
1777
|
+
}
|
|
1778
|
+
}
|
|
1779
|
+
var PARSERS = [
|
|
1780
|
+
"refspec-operands",
|
|
1781
|
+
"push-delete-operands",
|
|
1782
|
+
"refspec-words",
|
|
1783
|
+
"push-delete-refspecs",
|
|
1784
|
+
"fetch-refspec-operands",
|
|
1785
|
+
"fetch-refspec-words",
|
|
1786
|
+
"push-option-text",
|
|
1787
|
+
"remote-name"
|
|
1788
|
+
];
|
|
1789
|
+
function isPushRefspecParser(parser) {
|
|
1790
|
+
return typeof parser === "string" && PARSERS.includes(parser);
|
|
1791
|
+
}
|
|
1792
|
+
|
|
1793
|
+
// src/constraints/config-parameters.ts
|
|
1794
|
+
var KEY_CHARACTER = /^[A-Za-z0-9-]$/;
|
|
1795
|
+
var ALPHA = /^[A-Za-z]$/;
|
|
1796
|
+
function canonicalConfigKey(key) {
|
|
1797
|
+
const lastDot = key.lastIndexOf(".");
|
|
1798
|
+
if (lastDot <= 0 || lastDot === key.length - 1) {
|
|
1799
|
+
return void 0;
|
|
1800
|
+
}
|
|
1801
|
+
const firstDot = key.indexOf(".");
|
|
1802
|
+
let canonical = "";
|
|
1803
|
+
for (const [index, character] of key.split("").entries()) {
|
|
1804
|
+
if (index < firstDot || index > lastDot) {
|
|
1805
|
+
if (!KEY_CHARACTER.test(character) || index === lastDot + 1 && !ALPHA.test(character)) {
|
|
1806
|
+
return void 0;
|
|
1807
|
+
}
|
|
1808
|
+
canonical += character.toLowerCase();
|
|
1809
|
+
} else if (character === "\n") {
|
|
1810
|
+
return void 0;
|
|
1811
|
+
} else {
|
|
1812
|
+
canonical += character;
|
|
1813
|
+
}
|
|
1814
|
+
}
|
|
1815
|
+
return canonical;
|
|
1816
|
+
}
|
|
1817
|
+
function splitParameter(parameter) {
|
|
1818
|
+
const equals = parameter.indexOf("=");
|
|
1819
|
+
return equals < 0 ? [parameter, void 0] : [parameter.slice(0, equals), parameter.slice(equals + 1)];
|
|
1820
|
+
}
|
|
1821
|
+
var asList = (value) => typeof value === "string" ? [value] : Array.isArray(value) ? value : void 0;
|
|
1822
|
+
function validCloneConfigParameters(value) {
|
|
1823
|
+
const parameters = asList(value);
|
|
1824
|
+
return parameters?.every((parameter) => {
|
|
1825
|
+
if (typeof parameter !== "string") {
|
|
1826
|
+
return false;
|
|
1827
|
+
}
|
|
1828
|
+
const [key, text] = splitParameter(parameter);
|
|
1829
|
+
const canonical = key === "" ? void 0 : canonicalConfigKey(key);
|
|
1830
|
+
if (canonical === void 0) {
|
|
1831
|
+
return false;
|
|
1832
|
+
}
|
|
1833
|
+
if (canonical === "clone.defaultremotename") {
|
|
1834
|
+
return text !== void 0;
|
|
1835
|
+
}
|
|
1836
|
+
if (canonical === "clone.rejectshallow" || canonical === "clone.filtersubmodules") {
|
|
1837
|
+
return text === void 0 || gitBoolean(text) !== void 0;
|
|
1838
|
+
}
|
|
1839
|
+
return true;
|
|
1840
|
+
}) ?? false;
|
|
1841
|
+
}
|
|
1842
|
+
function validCloneConfigRemoteName(value) {
|
|
1843
|
+
const parameters = asList(value);
|
|
1844
|
+
if (parameters === void 0) {
|
|
1845
|
+
return false;
|
|
1846
|
+
}
|
|
1847
|
+
let name;
|
|
1848
|
+
for (const parameter of parameters) {
|
|
1849
|
+
if (typeof parameter === "string") {
|
|
1850
|
+
const [key, text] = splitParameter(parameter);
|
|
1851
|
+
if (canonicalConfigKey(key) === "clone.defaultremotename" && text !== void 0) {
|
|
1852
|
+
name = text;
|
|
1853
|
+
}
|
|
1854
|
+
}
|
|
1855
|
+
}
|
|
1856
|
+
return name === void 0 || validRemoteName(name);
|
|
1857
|
+
}
|
|
1858
|
+
function parseConfigParameters(parser, value) {
|
|
1859
|
+
return parser === "clone-config-parameters" ? validCloneConfigParameters(value) : validCloneConfigRemoteName(value);
|
|
1860
|
+
}
|
|
1861
|
+
function isConfigParameterParser(parser) {
|
|
1862
|
+
return parser === "clone-config-parameters" || parser === "clone-config-remote-name";
|
|
1863
|
+
}
|
|
1864
|
+
|
|
1415
1865
|
// src/constraints/git-timestamp.ts
|
|
1416
1866
|
var TIMESTAMP_CALLBACK_PROBE = DECIMAL_CALLBACK_PROBES["revision-age"];
|
|
1417
1867
|
var DECIMAL_TIMESTAMP = /^[ \t\r\n\v\f]*([+-]?)(\d+)$/;
|
|
@@ -1579,17 +2029,395 @@ function objectFilterCombineEmptyComponents(result) {
|
|
|
1579
2029
|
if (result.exitCode === 129 && (result.stdout + result.stderr).includes("usage:") && !/error:|fatal:/.test(result.stderr)) {
|
|
1580
2030
|
return true;
|
|
1581
2031
|
}
|
|
1582
|
-
return void 0;
|
|
2032
|
+
return void 0;
|
|
2033
|
+
}
|
|
2034
|
+
var OBJECT_FILTER_CHAR_PROBE = ["clone", "--filter=combine:sparse:oid=\xE9", "-h"];
|
|
2035
|
+
function objectFilterUnsignedChar(result) {
|
|
2036
|
+
if (result.exitCode === 128 && result.stderr.includes("must escape char in sub-filter-spec")) {
|
|
2037
|
+
return false;
|
|
2038
|
+
}
|
|
2039
|
+
if (result.exitCode === 129 && (result.stdout + result.stderr).includes("usage:") && !/error:|fatal:/.test(result.stderr)) {
|
|
2040
|
+
return true;
|
|
2041
|
+
}
|
|
2042
|
+
return void 0;
|
|
2043
|
+
}
|
|
2044
|
+
|
|
2045
|
+
// src/constraints/ref-format.ts
|
|
2046
|
+
var LIBC_SPACE = "[ \\t\\n\\v\\f\\r]*";
|
|
2047
|
+
var STRTOL_I = new RegExp(`^${LIBC_SPACE}([+-]?[0-9]+)$`);
|
|
2048
|
+
var STRTOUL_UI = new RegExp(`^${LIBC_SPACE}\\+?([0-9]+)$`);
|
|
2049
|
+
var STRTOL_PREFIX = new RegExp(`^${LIBC_SPACE}([+-]?[0-9]+)`);
|
|
2050
|
+
var GIT_SPACE2 = /[ \t\n\r]/;
|
|
2051
|
+
var PLACEHOLDER_END = /[,)]/;
|
|
2052
|
+
var HEX_COLOR = /^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;
|
|
2053
|
+
var INT_MIN = -2147483648n;
|
|
2054
|
+
var INT_MAX = 2147483647n;
|
|
2055
|
+
var UINT_MAX = 4294967295n;
|
|
2056
|
+
function strtolI(text) {
|
|
2057
|
+
const match = STRTOL_I.exec(text);
|
|
2058
|
+
if (!match) {
|
|
2059
|
+
return false;
|
|
2060
|
+
}
|
|
2061
|
+
const value = BigInt(match[1]);
|
|
2062
|
+
return value >= INT_MIN && value <= INT_MAX;
|
|
2063
|
+
}
|
|
2064
|
+
function strtoulUiValue(text) {
|
|
2065
|
+
if (text.includes("-")) {
|
|
2066
|
+
return void 0;
|
|
2067
|
+
}
|
|
2068
|
+
const match = STRTOUL_UI.exec(text);
|
|
2069
|
+
if (!match) {
|
|
2070
|
+
return void 0;
|
|
2071
|
+
}
|
|
2072
|
+
const value = BigInt(match[1]);
|
|
2073
|
+
return value <= UINT_MAX ? value : void 0;
|
|
2074
|
+
}
|
|
2075
|
+
function strtoulUi(text) {
|
|
2076
|
+
return strtoulUiValue(text) !== void 0;
|
|
2077
|
+
}
|
|
2078
|
+
function matchWord(word, name) {
|
|
2079
|
+
return word.length === name.length && asciiLower(word) === name;
|
|
2080
|
+
}
|
|
2081
|
+
var ANSI_COLORS = ["black", "red", "green", "yellow", "blue", "magenta", "cyan", "white"];
|
|
2082
|
+
var ATTRIBUTES = ["bold", "dim", "italic", "ul", "blink", "reverse", "strike"];
|
|
2083
|
+
function parseColor(word) {
|
|
2084
|
+
if (matchWord(word, "normal") || HEX_COLOR.test(word) || matchWord(word, "default")) {
|
|
2085
|
+
return true;
|
|
2086
|
+
}
|
|
2087
|
+
const name = asciiLower(word.slice(0, 6)) === "bright" ? word.slice(6) : word;
|
|
2088
|
+
if (ANSI_COLORS.some((color) => matchWord(name, color))) {
|
|
2089
|
+
return true;
|
|
2090
|
+
}
|
|
2091
|
+
const match = STRTOL_PREFIX.exec(word);
|
|
2092
|
+
if (!match || match[0].length !== word.length) {
|
|
2093
|
+
return false;
|
|
2094
|
+
}
|
|
2095
|
+
const value = BigInt(match[1]);
|
|
2096
|
+
return value >= -1n && value < 256n;
|
|
2097
|
+
}
|
|
2098
|
+
function parseAttribute(word) {
|
|
2099
|
+
let name = word;
|
|
2100
|
+
if (name.startsWith("no")) {
|
|
2101
|
+
name = name.slice(2);
|
|
2102
|
+
if (name.startsWith("-")) {
|
|
2103
|
+
name = name.slice(1);
|
|
2104
|
+
}
|
|
2105
|
+
}
|
|
2106
|
+
return ATTRIBUTES.includes(name);
|
|
2107
|
+
}
|
|
2108
|
+
function validGitColor(value) {
|
|
2109
|
+
let foreground = false;
|
|
2110
|
+
let background = false;
|
|
2111
|
+
for (const word of value.split(GIT_SPACE2)) {
|
|
2112
|
+
if (word === "" || matchWord(word, "reset")) {
|
|
2113
|
+
continue;
|
|
2114
|
+
}
|
|
2115
|
+
if (parseColor(word)) {
|
|
2116
|
+
if (!foreground) {
|
|
2117
|
+
foreground = true;
|
|
2118
|
+
} else if (!background) {
|
|
2119
|
+
background = true;
|
|
2120
|
+
} else {
|
|
2121
|
+
return false;
|
|
2122
|
+
}
|
|
2123
|
+
continue;
|
|
2124
|
+
}
|
|
2125
|
+
if (!parseAttribute(word)) {
|
|
2126
|
+
return false;
|
|
2127
|
+
}
|
|
2128
|
+
}
|
|
2129
|
+
return true;
|
|
2130
|
+
}
|
|
2131
|
+
var anyArg = () => true;
|
|
2132
|
+
var noArg = (arg) => arg === void 0;
|
|
2133
|
+
var requiredArg = (arg) => arg !== void 0;
|
|
2134
|
+
var oneOf = (...choices) => (arg) => arg === void 0 || choices.includes(arg);
|
|
2135
|
+
var refnameArg = (arg) => {
|
|
2136
|
+
if (arg === void 0 || arg === "short") {
|
|
2137
|
+
return true;
|
|
2138
|
+
}
|
|
2139
|
+
for (const prefix of ["lstrip=", "strip=", "rstrip="]) {
|
|
2140
|
+
if (arg.startsWith(prefix)) {
|
|
2141
|
+
return strtolI(arg.slice(prefix.length));
|
|
2142
|
+
}
|
|
2143
|
+
}
|
|
2144
|
+
return false;
|
|
2145
|
+
};
|
|
2146
|
+
var remoteRefArg = (arg) => arg === void 0 || arg.split(",").every(
|
|
2147
|
+
(item) => ["track", "trackshort", "nobracket", "remotename", "remoteref"].includes(item) || refnameArg(arg)
|
|
2148
|
+
);
|
|
2149
|
+
var oidArg = (arg) => {
|
|
2150
|
+
if (arg === void 0 || arg === "short") {
|
|
2151
|
+
return true;
|
|
2152
|
+
}
|
|
2153
|
+
if (!arg.startsWith("short=")) {
|
|
2154
|
+
return false;
|
|
2155
|
+
}
|
|
2156
|
+
const value = strtoulUiValue(arg.slice("short=".length));
|
|
2157
|
+
return value !== void 0 && value !== 0n;
|
|
2158
|
+
};
|
|
2159
|
+
var emailArg = (arg) => {
|
|
2160
|
+
if (arg === void 0) {
|
|
2161
|
+
return true;
|
|
2162
|
+
}
|
|
2163
|
+
let rest = arg;
|
|
2164
|
+
for (; ; ) {
|
|
2165
|
+
const option = ["trim", "localpart", "mailmap"].find((name) => rest.startsWith(name));
|
|
2166
|
+
if (option === void 0) {
|
|
2167
|
+
return false;
|
|
2168
|
+
}
|
|
2169
|
+
rest = rest.slice(option.length);
|
|
2170
|
+
if (rest === "") {
|
|
2171
|
+
return true;
|
|
2172
|
+
}
|
|
2173
|
+
if (!rest.startsWith(",")) {
|
|
2174
|
+
return false;
|
|
2175
|
+
}
|
|
2176
|
+
rest = rest.slice(1);
|
|
2177
|
+
}
|
|
2178
|
+
};
|
|
2179
|
+
function matchAtomArgValue(text, candidate) {
|
|
2180
|
+
if (!text.startsWith(candidate)) {
|
|
2181
|
+
return void 0;
|
|
2182
|
+
}
|
|
2183
|
+
const after = text.slice(candidate.length);
|
|
2184
|
+
if (after.startsWith("=")) {
|
|
2185
|
+
const comma = after.indexOf(",");
|
|
2186
|
+
const value = comma < 0 ? after.slice(1) : after.slice(1, comma);
|
|
2187
|
+
return { value, rest: comma < 0 ? "" : after.slice(comma + 1) };
|
|
2188
|
+
}
|
|
2189
|
+
if (after !== "" && !after.startsWith(",")) {
|
|
2190
|
+
return void 0;
|
|
2191
|
+
}
|
|
2192
|
+
return { value: void 0, rest: after.slice(1) };
|
|
2193
|
+
}
|
|
2194
|
+
var describeArg = (arg) => {
|
|
2195
|
+
let rest = arg ?? "";
|
|
2196
|
+
while (rest !== "") {
|
|
2197
|
+
const tags = matchAtomArgValue(rest, "tags");
|
|
2198
|
+
if (tags) {
|
|
2199
|
+
rest = tags.rest;
|
|
2200
|
+
if (tags.value === void 0 || gitBoolean(tags.value) !== void 0) {
|
|
2201
|
+
continue;
|
|
2202
|
+
}
|
|
2203
|
+
}
|
|
2204
|
+
const abbrev = matchAtomArgValue(rest, "abbrev");
|
|
2205
|
+
if (abbrev) {
|
|
2206
|
+
const value = abbrev.value ?? "";
|
|
2207
|
+
const match = STRTOL_PREFIX.exec(value);
|
|
2208
|
+
if (!match || match[0].length !== value.length || BigInt(match[1]) < 0n) {
|
|
2209
|
+
return false;
|
|
2210
|
+
}
|
|
2211
|
+
rest = abbrev.rest;
|
|
2212
|
+
continue;
|
|
2213
|
+
}
|
|
2214
|
+
const pattern = matchAtomArgValue(rest, "match") ?? matchAtomArgValue(rest, "exclude");
|
|
2215
|
+
if (!pattern?.value) {
|
|
2216
|
+
return false;
|
|
2217
|
+
}
|
|
2218
|
+
rest = pattern.rest;
|
|
2219
|
+
}
|
|
2220
|
+
return true;
|
|
2221
|
+
};
|
|
2222
|
+
function matchPlaceholder(text, candidate) {
|
|
2223
|
+
if (!text.startsWith(candidate)) {
|
|
2224
|
+
return void 0;
|
|
2225
|
+
}
|
|
2226
|
+
let after = text.slice(candidate.length);
|
|
2227
|
+
let value;
|
|
2228
|
+
if (after.startsWith("=")) {
|
|
2229
|
+
const end = after.slice(1).search(PLACEHOLDER_END);
|
|
2230
|
+
value = after.slice(1, end + 1);
|
|
2231
|
+
after = after.slice(end + 1);
|
|
2232
|
+
} else if (!(after.startsWith(",") || after.startsWith(")"))) {
|
|
2233
|
+
return void 0;
|
|
2234
|
+
}
|
|
2235
|
+
return { value, rest: after.startsWith(",") ? after.slice(1) : after };
|
|
2236
|
+
}
|
|
2237
|
+
function trailersOptions(arg) {
|
|
2238
|
+
let rest = `${arg})`;
|
|
2239
|
+
while (!rest.startsWith(")")) {
|
|
2240
|
+
const key = matchPlaceholder(rest, "key");
|
|
2241
|
+
if (key) {
|
|
2242
|
+
if (key.value === void 0) {
|
|
2243
|
+
return false;
|
|
2244
|
+
}
|
|
2245
|
+
rest = key.rest;
|
|
2246
|
+
continue;
|
|
2247
|
+
}
|
|
2248
|
+
const separator = matchPlaceholder(rest, "separator") ?? matchPlaceholder(rest, "key_value_separator");
|
|
2249
|
+
if (separator) {
|
|
2250
|
+
rest = separator.rest;
|
|
2251
|
+
continue;
|
|
2252
|
+
}
|
|
2253
|
+
let matched = false;
|
|
2254
|
+
for (const name of ["only", "unfold", "keyonly", "valueonly"]) {
|
|
2255
|
+
const flag = matchPlaceholder(rest, name);
|
|
2256
|
+
if (!flag) {
|
|
2257
|
+
continue;
|
|
2258
|
+
}
|
|
2259
|
+
rest = flag.rest;
|
|
2260
|
+
if (flag.value === void 0 || gitBoolean(flag.value) !== void 0) {
|
|
2261
|
+
matched = true;
|
|
2262
|
+
break;
|
|
2263
|
+
}
|
|
2264
|
+
}
|
|
2265
|
+
if (!matched) {
|
|
2266
|
+
return false;
|
|
2267
|
+
}
|
|
2268
|
+
}
|
|
2269
|
+
return true;
|
|
2270
|
+
}
|
|
2271
|
+
var trailersArg = (arg) => arg === void 0 || trailersOptions(arg);
|
|
2272
|
+
var contentsArg = (arg) => {
|
|
2273
|
+
if (arg === void 0 || ["body", "size", "signature", "subject", "trailers"].includes(arg)) {
|
|
2274
|
+
return true;
|
|
2275
|
+
}
|
|
2276
|
+
if (arg.startsWith("trailers:")) {
|
|
2277
|
+
return trailersOptions(arg.slice("trailers:".length));
|
|
2278
|
+
}
|
|
2279
|
+
if (arg.startsWith("lines=")) {
|
|
2280
|
+
return strtoulUi(arg.slice("lines=".length));
|
|
2281
|
+
}
|
|
2282
|
+
return false;
|
|
2283
|
+
};
|
|
2284
|
+
var ALIGN_POSITIONS = ["right", "middle", "left"];
|
|
2285
|
+
var alignArg = (arg) => {
|
|
2286
|
+
if (arg === void 0) {
|
|
2287
|
+
return false;
|
|
2288
|
+
}
|
|
2289
|
+
let width = UINT_MAX;
|
|
2290
|
+
for (const item of arg.split(",")) {
|
|
2291
|
+
if (item.startsWith("position=")) {
|
|
2292
|
+
if (!ALIGN_POSITIONS.includes(item.slice("position=".length))) {
|
|
2293
|
+
return false;
|
|
2294
|
+
}
|
|
2295
|
+
} else if (item.startsWith("width=")) {
|
|
2296
|
+
const value = strtoulUiValue(item.slice("width=".length));
|
|
2297
|
+
if (value === void 0) {
|
|
2298
|
+
return false;
|
|
2299
|
+
}
|
|
2300
|
+
width = value;
|
|
2301
|
+
} else {
|
|
2302
|
+
const value = strtoulUiValue(item);
|
|
2303
|
+
if (value !== void 0) {
|
|
2304
|
+
width = value;
|
|
2305
|
+
} else if (!ALIGN_POSITIONS.includes(item)) {
|
|
2306
|
+
return false;
|
|
2307
|
+
}
|
|
2308
|
+
}
|
|
2309
|
+
}
|
|
2310
|
+
return width !== UINT_MAX;
|
|
2311
|
+
};
|
|
2312
|
+
var colorArg = (arg) => arg !== void 0 && validGitColor(arg);
|
|
2313
|
+
var ifArg = (arg) => arg === void 0 || arg.startsWith("equals=") || arg.startsWith("notequals=");
|
|
2314
|
+
var nameArg = oneOf("mailmap");
|
|
2315
|
+
var ATOMS = /* @__PURE__ */ new Map([
|
|
2316
|
+
["refname", refnameArg],
|
|
2317
|
+
["objecttype", noArg],
|
|
2318
|
+
["objectsize", oneOf("disk")],
|
|
2319
|
+
["objectname", oidArg],
|
|
2320
|
+
["deltabase", noArg],
|
|
2321
|
+
["tree", oidArg],
|
|
2322
|
+
["parent", oidArg],
|
|
2323
|
+
["numparent", anyArg],
|
|
2324
|
+
["object", anyArg],
|
|
2325
|
+
["type", anyArg],
|
|
2326
|
+
["tag", anyArg],
|
|
2327
|
+
["author", anyArg],
|
|
2328
|
+
["authorname", nameArg],
|
|
2329
|
+
["authoremail", emailArg],
|
|
2330
|
+
["authordate", anyArg],
|
|
2331
|
+
["committer", anyArg],
|
|
2332
|
+
["committername", nameArg],
|
|
2333
|
+
["committeremail", emailArg],
|
|
2334
|
+
["committerdate", anyArg],
|
|
2335
|
+
["tagger", anyArg],
|
|
2336
|
+
["taggername", nameArg],
|
|
2337
|
+
["taggeremail", emailArg],
|
|
2338
|
+
["taggerdate", anyArg],
|
|
2339
|
+
["creator", anyArg],
|
|
2340
|
+
["creatordate", anyArg],
|
|
2341
|
+
["describe", describeArg],
|
|
2342
|
+
["subject", oneOf("sanitize")],
|
|
2343
|
+
["body", noArg],
|
|
2344
|
+
["trailers", trailersArg],
|
|
2345
|
+
["contents", contentsArg],
|
|
2346
|
+
[
|
|
2347
|
+
"signature",
|
|
2348
|
+
oneOf("signer", "grade", "key", "fingerprint", "primarykeyfingerprint", "trustlevel")
|
|
2349
|
+
],
|
|
2350
|
+
["raw", oneOf("size")],
|
|
2351
|
+
["upstream", remoteRefArg],
|
|
2352
|
+
["push", remoteRefArg],
|
|
2353
|
+
["symref", refnameArg],
|
|
2354
|
+
["flag", anyArg],
|
|
2355
|
+
["HEAD", noArg],
|
|
2356
|
+
["color", colorArg],
|
|
2357
|
+
["worktreepath", anyArg],
|
|
2358
|
+
["align", alignArg],
|
|
2359
|
+
["end", anyArg],
|
|
2360
|
+
["if", ifArg],
|
|
2361
|
+
["then", anyArg],
|
|
2362
|
+
["else", anyArg],
|
|
2363
|
+
["rest", noArg],
|
|
2364
|
+
// The committish is looked up in the repository, which Git decides.
|
|
2365
|
+
["ahead-behind", requiredArg],
|
|
2366
|
+
["is-base", requiredArg]
|
|
2367
|
+
]);
|
|
2368
|
+
function parseAtom(atom) {
|
|
2369
|
+
const start = atom.startsWith("*") ? 1 : 0;
|
|
2370
|
+
if (atom.length <= start) {
|
|
2371
|
+
return void 0;
|
|
2372
|
+
}
|
|
2373
|
+
const colon = atom.indexOf(":", start);
|
|
2374
|
+
const name = atom.slice(start, colon < 0 ? void 0 : colon);
|
|
2375
|
+
const parser = ATOMS.get(name);
|
|
2376
|
+
const arg = colon < 0 || colon === atom.length - 1 ? void 0 : atom.slice(colon + 1);
|
|
2377
|
+
return parser?.(arg) ? name : void 0;
|
|
2378
|
+
}
|
|
2379
|
+
function validRefFormat(value) {
|
|
2380
|
+
if (typeof value !== "string") {
|
|
2381
|
+
return false;
|
|
2382
|
+
}
|
|
2383
|
+
let index = 0;
|
|
2384
|
+
while (index < value.length) {
|
|
2385
|
+
if (value[index] !== "%") {
|
|
2386
|
+
index += 1;
|
|
2387
|
+
continue;
|
|
2388
|
+
}
|
|
2389
|
+
if (value[index + 1] === "%") {
|
|
2390
|
+
index += 2;
|
|
2391
|
+
continue;
|
|
2392
|
+
}
|
|
2393
|
+
if (value[index + 1] !== "(") {
|
|
2394
|
+
index += 1;
|
|
2395
|
+
continue;
|
|
2396
|
+
}
|
|
2397
|
+
const end = value.indexOf(")", index);
|
|
2398
|
+
if (end < 0) {
|
|
2399
|
+
return false;
|
|
2400
|
+
}
|
|
2401
|
+
const name = parseAtom(value.slice(index + 2, end));
|
|
2402
|
+
if (name === void 0 || name === "rest") {
|
|
2403
|
+
return false;
|
|
2404
|
+
}
|
|
2405
|
+
index = end + 1;
|
|
2406
|
+
}
|
|
2407
|
+
return true;
|
|
1583
2408
|
}
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
if (result.exitCode === 128 && result.stderr.includes("must escape char in sub-filter-spec")) {
|
|
2409
|
+
function validRefSortKey(value) {
|
|
2410
|
+
if (typeof value !== "string") {
|
|
1587
2411
|
return false;
|
|
1588
2412
|
}
|
|
1589
|
-
|
|
1590
|
-
|
|
2413
|
+
let key = value.startsWith("-") ? value.slice(1) : value;
|
|
2414
|
+
for (const prefix of ["version:", "v:"]) {
|
|
2415
|
+
if (key.startsWith(prefix)) {
|
|
2416
|
+
key = key.slice(prefix.length);
|
|
2417
|
+
break;
|
|
2418
|
+
}
|
|
1591
2419
|
}
|
|
1592
|
-
return void 0;
|
|
2420
|
+
return parseAtom(key) !== void 0;
|
|
1593
2421
|
}
|
|
1594
2422
|
|
|
1595
2423
|
// src/constraints/git-scalars.ts
|
|
@@ -1698,6 +2526,12 @@ function parseGitScalar(parser, value, previous, cLongBits = nativeCLongBits(pro
|
|
|
1698
2526
|
const parsed = pythonInteger(value);
|
|
1699
2527
|
return { valid: parsed !== void 0, value: parsed };
|
|
1700
2528
|
}
|
|
2529
|
+
if (isPushRefspecParser(parser)) {
|
|
2530
|
+
return { valid: parsePushRefspecs(parser, value), value };
|
|
2531
|
+
}
|
|
2532
|
+
if (isConfigParameterParser(parser)) {
|
|
2533
|
+
return { valid: parseConfigParameters(parser, value), value };
|
|
2534
|
+
}
|
|
1701
2535
|
if (parser === "depth-initial") {
|
|
1702
2536
|
return { valid: validInitialDepth(value, depthAtoiBits), value };
|
|
1703
2537
|
}
|
|
@@ -1715,9 +2549,37 @@ function parseGitScalar(parser, value, previous, cLongBits = nativeCLongBits(pro
|
|
|
1715
2549
|
value
|
|
1716
2550
|
};
|
|
1717
2551
|
}
|
|
2552
|
+
if (parser === "branch-name") {
|
|
2553
|
+
return { valid: value === void 0 || validNewBranchName(value), value };
|
|
2554
|
+
}
|
|
2555
|
+
if (parser === "ref-format") {
|
|
2556
|
+
return { valid: value === void 0 || validRefFormat(value), value };
|
|
2557
|
+
}
|
|
2558
|
+
if (parser === "ref-sort-key") {
|
|
2559
|
+
return { valid: validRefSortKey(value), value };
|
|
2560
|
+
}
|
|
2561
|
+
if (parser === "refname-onelevel") {
|
|
2562
|
+
return {
|
|
2563
|
+
valid: value === void 0 || typeof value === "string" && validRefnameFormat(value, true),
|
|
2564
|
+
value
|
|
2565
|
+
};
|
|
2566
|
+
}
|
|
2567
|
+
if (parser === "commit-author") {
|
|
2568
|
+
return { valid: value === void 0 || validCommitAuthor(value), value };
|
|
2569
|
+
}
|
|
2570
|
+
if (parser === "commit-date") {
|
|
2571
|
+
const valid = value === void 0 || (value instanceof Date ? !Number.isNaN(value.getTime()) : validCommitDate(value));
|
|
2572
|
+
return { valid, value };
|
|
2573
|
+
}
|
|
1718
2574
|
if (parser === "blame-line-range") {
|
|
1719
2575
|
return { valid: validBlameLineRange(value), value };
|
|
1720
2576
|
}
|
|
2577
|
+
if (parser === "log-line-range") {
|
|
2578
|
+
return { valid: validLogLineRange(value), value };
|
|
2579
|
+
}
|
|
2580
|
+
if (parser === "track-start-point") {
|
|
2581
|
+
return { valid: validTrackStartPoint(value), value };
|
|
2582
|
+
}
|
|
1721
2583
|
if (isStringCallback(parser)) {
|
|
1722
2584
|
return parseStringCallback(parser, value);
|
|
1723
2585
|
}
|
|
@@ -1786,6 +2648,17 @@ function parseGitScalar(parser, value, previous, cLongBits = nativeCLongBits(pro
|
|
|
1786
2648
|
const boolean = gitBoolean(value);
|
|
1787
2649
|
return boolean === void 0 ? { valid: false } : { valid: true, value: boolean };
|
|
1788
2650
|
}
|
|
2651
|
+
function validTrackStartPoint(value) {
|
|
2652
|
+
if (typeof value !== "string") {
|
|
2653
|
+
return false;
|
|
2654
|
+
}
|
|
2655
|
+
let rest = value.startsWith("refs/") ? value.slice(5) : value;
|
|
2656
|
+
if (rest.startsWith("remotes/")) {
|
|
2657
|
+
rest = rest.slice(8);
|
|
2658
|
+
}
|
|
2659
|
+
const slash = rest.indexOf("/");
|
|
2660
|
+
return slash >= 0 && slash + 1 < rest.length && branchNameSyntax(rest.slice(slash + 1)) !== false;
|
|
2661
|
+
}
|
|
1789
2662
|
|
|
1790
2663
|
// src/constraints/numeric-callbacks.generated.ts
|
|
1791
2664
|
var NUMERIC_CALLBACK_PARSERS = {
|
|
@@ -2486,6 +3359,23 @@ var COMMAND_CONSTRAINTS = {
|
|
|
2486
3359
|
reason: "Explicit submodule filtering requires a filter and recursive submodule initialization.",
|
|
2487
3360
|
source: git("builtin/clone.c")
|
|
2488
3361
|
},
|
|
3362
|
+
{
|
|
3363
|
+
id: "clone.recursive-references",
|
|
3364
|
+
kind: "forbid",
|
|
3365
|
+
when: [active("recurseSubmodules"), active("reference"), active("referenceIfAble")],
|
|
3366
|
+
origin: "git",
|
|
3367
|
+
reason: "Recursive clones cannot use both reference and referenceIfAble.",
|
|
3368
|
+
source: git("builtin/clone.c")
|
|
3369
|
+
},
|
|
3370
|
+
{
|
|
3371
|
+
id: "clone.origin-name",
|
|
3372
|
+
kind: "scalar",
|
|
3373
|
+
key: "origin",
|
|
3374
|
+
parser: "remote-name",
|
|
3375
|
+
origin: "git",
|
|
3376
|
+
reason: "The remote name must form a valid fetch refspec refs/heads/test:refs/remotes/<name>/test.",
|
|
3377
|
+
source: git("builtin/clone.c")
|
|
3378
|
+
},
|
|
2489
3379
|
{
|
|
2490
3380
|
id: "clone.depth",
|
|
2491
3381
|
kind: "integer",
|
|
@@ -2580,6 +3470,38 @@ var COMMAND_CONSTRAINTS = {
|
|
|
2580
3470
|
origin: "type-git",
|
|
2581
3471
|
reason: "Structured paths use NUL delimiters to preserve all filenames.",
|
|
2582
3472
|
source: contract
|
|
3473
|
+
},
|
|
3474
|
+
{
|
|
3475
|
+
id: "status.ignored-untracked",
|
|
3476
|
+
kind: "forbid",
|
|
3477
|
+
when: [
|
|
3478
|
+
{ key: "ignored", test: "equals", value: "matching" },
|
|
3479
|
+
{ key: "untracked", test: "equals", value: "no" }
|
|
3480
|
+
],
|
|
3481
|
+
origin: "git",
|
|
3482
|
+
reason: "Matching ignored files requires showing untracked files.",
|
|
3483
|
+
source: git("builtin/commit.c")
|
|
3484
|
+
},
|
|
3485
|
+
{
|
|
3486
|
+
id: "status.findRenames",
|
|
3487
|
+
kind: "integer",
|
|
3488
|
+
key: "findRenames",
|
|
3489
|
+
min: 1,
|
|
3490
|
+
allowBoolean: true,
|
|
3491
|
+
origin: "type-git",
|
|
3492
|
+
reason: "A rename threshold is a whole percentage.",
|
|
3493
|
+
source: contract
|
|
3494
|
+
},
|
|
3495
|
+
{
|
|
3496
|
+
id: "status.findRenames-range",
|
|
3497
|
+
kind: "range",
|
|
3498
|
+
key: "findRenames",
|
|
3499
|
+
min: 1,
|
|
3500
|
+
max: 100,
|
|
3501
|
+
origin: "type-git",
|
|
3502
|
+
// Git turns a zero score into its 50% default, so 0 would not mean 0%.
|
|
3503
|
+
reason: "A rename threshold is a percentage from 1 to 100.",
|
|
3504
|
+
source: contract
|
|
2583
3505
|
}
|
|
2584
3506
|
],
|
|
2585
3507
|
log: [
|
|
@@ -2686,6 +3608,24 @@ var COMMAND_CONSTRAINTS = {
|
|
|
2686
3608
|
reason: "Git rejects these simultaneous modes or operands.",
|
|
2687
3609
|
source: git("builtin/fetch.c")
|
|
2688
3610
|
},
|
|
3611
|
+
{
|
|
3612
|
+
id: "fetch.refspec-remote",
|
|
3613
|
+
kind: "requires",
|
|
3614
|
+
when: { key: "refspec", test: "nonempty" },
|
|
3615
|
+
required: [{ key: "remote", test: "nonempty" }],
|
|
3616
|
+
origin: "git",
|
|
3617
|
+
reason: "Git reads the first positional word as the repository, so refspecs need an explicit remote.",
|
|
3618
|
+
source: git("builtin/fetch.c")
|
|
3619
|
+
},
|
|
3620
|
+
{
|
|
3621
|
+
id: "fetch.tag-shorthand",
|
|
3622
|
+
kind: "scalar",
|
|
3623
|
+
key: "refspec",
|
|
3624
|
+
parser: "fetch-refspec-words",
|
|
3625
|
+
origin: "git",
|
|
3626
|
+
reason: "Refspec words must parse as refspecs, and a word 'tag' must be followed by a tag name that forms one.",
|
|
3627
|
+
source: git("builtin/fetch.c")
|
|
3628
|
+
},
|
|
2689
3629
|
{
|
|
2690
3630
|
id: "fetch.unsupported",
|
|
2691
3631
|
kind: "unsupported",
|
|
@@ -2821,6 +3761,44 @@ var COMMAND_CONSTRAINTS = {
|
|
|
2821
3761
|
origin: "git",
|
|
2822
3762
|
reason: "Deletion requires explicit refs.",
|
|
2823
3763
|
source: git("builtin/push.c")
|
|
3764
|
+
},
|
|
3765
|
+
{
|
|
3766
|
+
id: "push.refspec-remote",
|
|
3767
|
+
kind: "requires",
|
|
3768
|
+
when: { key: "refspec", test: "nonempty" },
|
|
3769
|
+
required: [{ key: "remote", test: "nonempty" }],
|
|
3770
|
+
origin: "git",
|
|
3771
|
+
reason: "Git reads the first positional word as the repository, so refspecs need an explicit remote.",
|
|
3772
|
+
source: git("builtin/push.c")
|
|
3773
|
+
},
|
|
3774
|
+
{
|
|
3775
|
+
id: "push.tag-shorthand",
|
|
3776
|
+
kind: "scalar",
|
|
3777
|
+
key: "refspec",
|
|
3778
|
+
parser: "refspec-words",
|
|
3779
|
+
guard: [{ key: "deleteRefs", test: "inactive" }],
|
|
3780
|
+
origin: "git",
|
|
3781
|
+
reason: "Refspec words must parse as refspecs, and a word 'tag' must be followed by a tag name that forms one.",
|
|
3782
|
+
source: git("builtin/push.c")
|
|
3783
|
+
},
|
|
3784
|
+
{
|
|
3785
|
+
id: "push.delete-names",
|
|
3786
|
+
kind: "scalar",
|
|
3787
|
+
key: "refspec",
|
|
3788
|
+
parser: "push-delete-refspecs",
|
|
3789
|
+
guard: [active("deleteRefs")],
|
|
3790
|
+
origin: "git",
|
|
3791
|
+
reason: "Deletion accepts only nonempty plain ref names without a colon that are valid ref names.",
|
|
3792
|
+
source: git("builtin/push.c")
|
|
3793
|
+
},
|
|
3794
|
+
{
|
|
3795
|
+
id: "push.option-newline",
|
|
3796
|
+
kind: "scalar",
|
|
3797
|
+
key: "pushOption",
|
|
3798
|
+
parser: "push-option-text",
|
|
3799
|
+
origin: "git",
|
|
3800
|
+
reason: "Push options must not contain newline characters.",
|
|
3801
|
+
source: git("builtin/push.c")
|
|
2824
3802
|
}
|
|
2825
3803
|
],
|
|
2826
3804
|
add: [
|
|
@@ -3046,8 +4024,8 @@ var COMMAND_CONSTRAINTS = {
|
|
|
3046
4024
|
present("ff"),
|
|
3047
4025
|
active("squash"),
|
|
3048
4026
|
active("noCommit"),
|
|
3049
|
-
|
|
3050
|
-
|
|
4027
|
+
{ key: "strategy", test: "nonempty" },
|
|
4028
|
+
{ key: "strategyOption", test: "nonempty" },
|
|
3051
4029
|
active("noVerify"),
|
|
3052
4030
|
active("noDiffstat"),
|
|
3053
4031
|
active("stat"),
|
|
@@ -3078,8 +4056,8 @@ var COMMAND_CONSTRAINTS = {
|
|
|
3078
4056
|
present("ff"),
|
|
3079
4057
|
active("squash"),
|
|
3080
4058
|
active("noCommit"),
|
|
3081
|
-
|
|
3082
|
-
|
|
4059
|
+
{ key: "strategy", test: "nonempty" },
|
|
4060
|
+
{ key: "strategyOption", test: "nonempty" },
|
|
3083
4061
|
active("noVerify"),
|
|
3084
4062
|
active("noDiffstat"),
|
|
3085
4063
|
active("stat"),
|
|
@@ -3110,8 +4088,8 @@ var COMMAND_CONSTRAINTS = {
|
|
|
3110
4088
|
present("ff"),
|
|
3111
4089
|
active("squash"),
|
|
3112
4090
|
active("noCommit"),
|
|
3113
|
-
|
|
3114
|
-
|
|
4091
|
+
{ key: "strategy", test: "nonempty" },
|
|
4092
|
+
{ key: "strategyOption", test: "nonempty" },
|
|
3115
4093
|
active("noVerify"),
|
|
3116
4094
|
active("noDiffstat"),
|
|
3117
4095
|
active("stat"),
|
|
@@ -3151,6 +4129,42 @@ var COMMAND_CONSTRAINTS = {
|
|
|
3151
4129
|
}
|
|
3152
4130
|
],
|
|
3153
4131
|
pull: [
|
|
4132
|
+
{
|
|
4133
|
+
id: "pull.branch-remote",
|
|
4134
|
+
kind: "requires",
|
|
4135
|
+
when: { key: "branch", test: "nonempty" },
|
|
4136
|
+
required: [{ key: "remote", test: "nonempty" }],
|
|
4137
|
+
origin: "git",
|
|
4138
|
+
reason: "Git reads the first positional word as the repository, so a branch needs an explicit remote.",
|
|
4139
|
+
source: git("builtin/pull.c")
|
|
4140
|
+
},
|
|
4141
|
+
{
|
|
4142
|
+
id: "pull.all-remote",
|
|
4143
|
+
kind: "forbid",
|
|
4144
|
+
when: [active("all"), { key: "remote", test: "nonempty" }],
|
|
4145
|
+
origin: "git",
|
|
4146
|
+
reason: "Fetching from all remotes cannot name a repository.",
|
|
4147
|
+
source: git("builtin/fetch.c")
|
|
4148
|
+
},
|
|
4149
|
+
{
|
|
4150
|
+
id: "pull.tag-shorthand",
|
|
4151
|
+
kind: "scalar",
|
|
4152
|
+
key: "branch",
|
|
4153
|
+
parser: "fetch-refspec-words",
|
|
4154
|
+
origin: "git",
|
|
4155
|
+
reason: "Refspec words must parse as refspecs, and a word 'tag' must be followed by a tag name that forms one.",
|
|
4156
|
+
source: git("builtin/fetch.c")
|
|
4157
|
+
},
|
|
4158
|
+
{
|
|
4159
|
+
id: "pull.cleanup",
|
|
4160
|
+
kind: "value",
|
|
4161
|
+
key: "cleanup",
|
|
4162
|
+
guard: [{ key: "cleanup", test: "nonempty" }],
|
|
4163
|
+
allowed: ["default", "verbatim", "whitespace", "strip", "scissors"],
|
|
4164
|
+
origin: "git",
|
|
4165
|
+
reason: "Pull validates the final cleanup value before fetching.",
|
|
4166
|
+
source: git("builtin/pull.c")
|
|
4167
|
+
},
|
|
3154
4168
|
{
|
|
3155
4169
|
id: "pull.depth-unshallow",
|
|
3156
4170
|
kind: "exclusive",
|
|
@@ -3245,6 +4259,47 @@ var COMMAND_CONSTRAINTS = {
|
|
|
3245
4259
|
origin: "git",
|
|
3246
4260
|
reason: "Git rejects these simultaneous modes or operands.",
|
|
3247
4261
|
source: git("builtin/checkout.c")
|
|
4262
|
+
},
|
|
4263
|
+
{
|
|
4264
|
+
id: "switch.discard-conflict",
|
|
4265
|
+
kind: "exclusive",
|
|
4266
|
+
keys: ["discard", "conflict"],
|
|
4267
|
+
origin: "git",
|
|
4268
|
+
reason: "A conflict style implies --merge, which Git rejects with --discard-changes.",
|
|
4269
|
+
source: git("builtin/checkout.c")
|
|
4270
|
+
},
|
|
4271
|
+
{
|
|
4272
|
+
id: "switch.force-conflict",
|
|
4273
|
+
kind: "exclusive",
|
|
4274
|
+
keys: ["force", "conflict"],
|
|
4275
|
+
origin: "git",
|
|
4276
|
+
reason: "A conflict style implies --merge, which Git rejects with --force.",
|
|
4277
|
+
source: git("builtin/checkout.c")
|
|
4278
|
+
},
|
|
4279
|
+
{
|
|
4280
|
+
id: "switch.detach-track",
|
|
4281
|
+
kind: "exclusive",
|
|
4282
|
+
keys: ["detach", "track"],
|
|
4283
|
+
origin: "git",
|
|
4284
|
+
reason: "Git rejects tracking with --detach.",
|
|
4285
|
+
source: git("builtin/checkout.c")
|
|
4286
|
+
},
|
|
4287
|
+
{
|
|
4288
|
+
id: "switch.orphan-track",
|
|
4289
|
+
kind: "exclusive",
|
|
4290
|
+
keys: ["orphan", "track"],
|
|
4291
|
+
origin: "git",
|
|
4292
|
+
reason: "Git rejects tracking with --orphan.",
|
|
4293
|
+
source: git("builtin/checkout.c")
|
|
4294
|
+
},
|
|
4295
|
+
{
|
|
4296
|
+
id: "switch.startPoint",
|
|
4297
|
+
kind: "requiresAny",
|
|
4298
|
+
when: { key: "startPoint", test: "nonempty" },
|
|
4299
|
+
choices: [active("create"), active("forceCreate")],
|
|
4300
|
+
origin: "git",
|
|
4301
|
+
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.",
|
|
4302
|
+
source: git("builtin/checkout.c")
|
|
3248
4303
|
}
|
|
3249
4304
|
],
|
|
3250
4305
|
cherryPick: [
|
|
@@ -3290,11 +4345,11 @@ var COMMAND_CONSTRAINTS = {
|
|
|
3290
4345
|
active("noCommit"),
|
|
3291
4346
|
active("signoff"),
|
|
3292
4347
|
active("mainline"),
|
|
3293
|
-
|
|
3294
|
-
|
|
4348
|
+
{ key: "strategy", test: "nonempty" },
|
|
4349
|
+
{ key: "strategyOption", test: "nonempty" },
|
|
3295
4350
|
active("appendCommitName"),
|
|
3296
4351
|
active("ff"),
|
|
3297
|
-
|
|
4352
|
+
{ key: "empty", test: "nonempty" },
|
|
3298
4353
|
present("rerereAutoupdate")
|
|
3299
4354
|
],
|
|
3300
4355
|
origin: "git",
|
|
@@ -3309,11 +4364,11 @@ var COMMAND_CONSTRAINTS = {
|
|
|
3309
4364
|
active("noCommit"),
|
|
3310
4365
|
active("signoff"),
|
|
3311
4366
|
active("mainline"),
|
|
3312
|
-
|
|
3313
|
-
|
|
4367
|
+
{ key: "strategy", test: "nonempty" },
|
|
4368
|
+
{ key: "strategyOption", test: "nonempty" },
|
|
3314
4369
|
active("appendCommitName"),
|
|
3315
4370
|
active("ff"),
|
|
3316
|
-
|
|
4371
|
+
{ key: "empty", test: "nonempty" },
|
|
3317
4372
|
present("rerereAutoupdate")
|
|
3318
4373
|
],
|
|
3319
4374
|
origin: "git",
|
|
@@ -3328,11 +4383,11 @@ var COMMAND_CONSTRAINTS = {
|
|
|
3328
4383
|
active("noCommit"),
|
|
3329
4384
|
active("signoff"),
|
|
3330
4385
|
active("mainline"),
|
|
3331
|
-
|
|
3332
|
-
|
|
4386
|
+
{ key: "strategy", test: "nonempty" },
|
|
4387
|
+
{ key: "strategyOption", test: "nonempty" },
|
|
3333
4388
|
active("appendCommitName"),
|
|
3334
4389
|
active("ff"),
|
|
3335
|
-
|
|
4390
|
+
{ key: "empty", test: "nonempty" },
|
|
3336
4391
|
present("rerereAutoupdate")
|
|
3337
4392
|
],
|
|
3338
4393
|
origin: "git",
|
|
@@ -3415,8 +4470,8 @@ var COMMAND_CONSTRAINTS = {
|
|
|
3415
4470
|
active("noCommit"),
|
|
3416
4471
|
active("signoff"),
|
|
3417
4472
|
active("mainline"),
|
|
3418
|
-
|
|
3419
|
-
|
|
4473
|
+
{ key: "strategy", test: "nonempty" },
|
|
4474
|
+
{ key: "strategyOption", test: "nonempty" },
|
|
3420
4475
|
present("rerereAutoupdate")
|
|
3421
4476
|
],
|
|
3422
4477
|
origin: "git",
|
|
@@ -3431,8 +4486,8 @@ var COMMAND_CONSTRAINTS = {
|
|
|
3431
4486
|
active("noCommit"),
|
|
3432
4487
|
active("signoff"),
|
|
3433
4488
|
active("mainline"),
|
|
3434
|
-
|
|
3435
|
-
|
|
4489
|
+
{ key: "strategy", test: "nonempty" },
|
|
4490
|
+
{ key: "strategyOption", test: "nonempty" },
|
|
3436
4491
|
present("rerereAutoupdate")
|
|
3437
4492
|
],
|
|
3438
4493
|
origin: "git",
|
|
@@ -3447,8 +4502,8 @@ var COMMAND_CONSTRAINTS = {
|
|
|
3447
4502
|
active("noCommit"),
|
|
3448
4503
|
active("signoff"),
|
|
3449
4504
|
active("mainline"),
|
|
3450
|
-
|
|
3451
|
-
|
|
4505
|
+
{ key: "strategy", test: "nonempty" },
|
|
4506
|
+
{ key: "strategyOption", test: "nonempty" },
|
|
3452
4507
|
present("rerereAutoupdate")
|
|
3453
4508
|
],
|
|
3454
4509
|
origin: "git",
|
|
@@ -3458,49 +4513,80 @@ var COMMAND_CONSTRAINTS = {
|
|
|
3458
4513
|
],
|
|
3459
4514
|
rebase: [
|
|
3460
4515
|
{
|
|
3461
|
-
id: "rebase.
|
|
3462
|
-
kind: "
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
4516
|
+
id: "rebase.action-alone",
|
|
4517
|
+
kind: "exclusiveGroups",
|
|
4518
|
+
groups: [
|
|
4519
|
+
[active("abort")],
|
|
4520
|
+
[active("continue")],
|
|
4521
|
+
[active("skip")],
|
|
4522
|
+
[
|
|
4523
|
+
{ key: "upstream", test: "nonempty" },
|
|
4524
|
+
{ key: "onto", test: "nonempty" },
|
|
4525
|
+
active("interactive"),
|
|
4526
|
+
active("rebaseMerges"),
|
|
4527
|
+
active("noVerify"),
|
|
4528
|
+
active("keepBase"),
|
|
4529
|
+
active("quiet"),
|
|
4530
|
+
active("verbose"),
|
|
4531
|
+
active("signoff"),
|
|
4532
|
+
active("committerDateIsAuthorDate"),
|
|
4533
|
+
active("resetAuthorDate"),
|
|
4534
|
+
active("ignoreWhitespace"),
|
|
4535
|
+
{ key: "whitespace", test: "nonempty" },
|
|
4536
|
+
active("forceRebase"),
|
|
4537
|
+
active("noFf"),
|
|
4538
|
+
active("apply"),
|
|
4539
|
+
present("rerereAutoupdate"),
|
|
4540
|
+
{ key: "empty", test: "nonempty" },
|
|
4541
|
+
present("autosquash"),
|
|
4542
|
+
present("updateRefs"),
|
|
4543
|
+
active("gpgSign"),
|
|
4544
|
+
present("autostash"),
|
|
4545
|
+
{ key: "exec", test: "nonempty" },
|
|
4546
|
+
present("forkPoint"),
|
|
4547
|
+
{ key: "strategy", test: "nonempty" },
|
|
4548
|
+
{ key: "strategyOption", test: "nonempty" },
|
|
4549
|
+
active("root"),
|
|
4550
|
+
present("rescheduleFailedExec"),
|
|
4551
|
+
present("reapplyCherryPicks")
|
|
4552
|
+
]
|
|
4553
|
+
],
|
|
3480
4554
|
origin: "git",
|
|
3481
|
-
reason: "
|
|
4555
|
+
reason: "A rebase action must be the only argument; Git prints usage otherwise.",
|
|
3482
4556
|
source: git("builtin/rebase.c")
|
|
3483
4557
|
},
|
|
3484
4558
|
{
|
|
3485
|
-
id: "rebase.
|
|
3486
|
-
kind: "
|
|
3487
|
-
|
|
4559
|
+
id: "rebase.backend",
|
|
4560
|
+
kind: "exclusiveGroups",
|
|
4561
|
+
groups: [
|
|
4562
|
+
[active("apply"), { key: "whitespace", test: "nonempty" }],
|
|
4563
|
+
[
|
|
4564
|
+
{ key: "strategy", test: "nonempty" },
|
|
4565
|
+
{ key: "strategyOption", test: "nonempty" },
|
|
4566
|
+
{ key: "exec", test: "nonempty" },
|
|
4567
|
+
active("rebaseMerges"),
|
|
4568
|
+
equal("updateRefs", true),
|
|
4569
|
+
equal("autosquash", true),
|
|
4570
|
+
{ key: "empty", test: "nonempty" },
|
|
4571
|
+
equal("rescheduleFailedExec", true)
|
|
4572
|
+
]
|
|
4573
|
+
],
|
|
3488
4574
|
origin: "git",
|
|
3489
|
-
reason: "
|
|
4575
|
+
reason: "Apply options (--apply, --whitespace) cannot be combined with options that select or require the merge backend.",
|
|
3490
4576
|
source: git("builtin/rebase.c")
|
|
3491
4577
|
},
|
|
3492
4578
|
{
|
|
3493
|
-
id: "rebase.
|
|
4579
|
+
id: "rebase.keepBase-onto",
|
|
3494
4580
|
kind: "exclusive",
|
|
3495
|
-
keys: ["
|
|
4581
|
+
keys: ["keepBase", "onto"],
|
|
3496
4582
|
origin: "git",
|
|
3497
4583
|
reason: "Git rejects these simultaneous modes or operands.",
|
|
3498
4584
|
source: git("builtin/rebase.c")
|
|
3499
4585
|
},
|
|
3500
4586
|
{
|
|
3501
|
-
id: "rebase.
|
|
4587
|
+
id: "rebase.keepBase-root",
|
|
3502
4588
|
kind: "exclusive",
|
|
3503
|
-
keys: ["
|
|
4589
|
+
keys: ["keepBase", "root"],
|
|
3504
4590
|
origin: "git",
|
|
3505
4591
|
reason: "Git rejects these simultaneous modes or operands.",
|
|
3506
4592
|
source: git("builtin/rebase.c")
|
|
@@ -3520,6 +4606,24 @@ var COMMAND_CONSTRAINTS = {
|
|
|
3520
4606
|
origin: "git",
|
|
3521
4607
|
reason: "Root rebases cannot use fork-point detection.",
|
|
3522
4608
|
source: git("builtin/rebase.c")
|
|
4609
|
+
},
|
|
4610
|
+
{
|
|
4611
|
+
id: "rebase.whitespace-value",
|
|
4612
|
+
kind: "value",
|
|
4613
|
+
key: "whitespace",
|
|
4614
|
+
allowed: ["", "nowarn", "warn", "error", "error-all", "fix", "strip"],
|
|
4615
|
+
origin: "git",
|
|
4616
|
+
reason: "cmd_rebase accepts only the git apply whitespace actions.",
|
|
4617
|
+
source: git("builtin/rebase.c")
|
|
4618
|
+
},
|
|
4619
|
+
{
|
|
4620
|
+
id: "rebase.empty-value",
|
|
4621
|
+
kind: "value",
|
|
4622
|
+
key: "empty",
|
|
4623
|
+
allowed: ["drop", "keep", "stop", "ask"],
|
|
4624
|
+
origin: "git",
|
|
4625
|
+
reason: "parse_empty_value accepts drop, keep, stop and the deprecated ask.",
|
|
4626
|
+
source: git("builtin/rebase.c")
|
|
3523
4627
|
}
|
|
3524
4628
|
],
|
|
3525
4629
|
restore: [
|
|
@@ -3563,6 +4667,33 @@ var COMMAND_CONSTRAINTS = {
|
|
|
3563
4667
|
origin: "git",
|
|
3564
4668
|
reason: "Git rejects these simultaneous modes or operands.",
|
|
3565
4669
|
source: git("builtin/checkout.c")
|
|
4670
|
+
},
|
|
4671
|
+
{
|
|
4672
|
+
id: "restore.stage-merge",
|
|
4673
|
+
kind: "conflicts",
|
|
4674
|
+
when: active("merge"),
|
|
4675
|
+
others: [active("ours"), active("theirs")],
|
|
4676
|
+
origin: "git",
|
|
4677
|
+
reason: "Git rejects --ours or --theirs with --merge.",
|
|
4678
|
+
source: git("builtin/checkout.c")
|
|
4679
|
+
},
|
|
4680
|
+
{
|
|
4681
|
+
id: "restore.stage-conflict",
|
|
4682
|
+
kind: "conflicts",
|
|
4683
|
+
when: active("conflict"),
|
|
4684
|
+
others: [active("ours"), active("theirs")],
|
|
4685
|
+
origin: "git",
|
|
4686
|
+
reason: "A conflict style implies --merge, which Git rejects with --ours or --theirs.",
|
|
4687
|
+
source: git("builtin/checkout.c")
|
|
4688
|
+
},
|
|
4689
|
+
{
|
|
4690
|
+
id: "restore.ignoreUnmerged-merge",
|
|
4691
|
+
kind: "conflicts",
|
|
4692
|
+
when: active("ignoreUnmerged"),
|
|
4693
|
+
others: [active("merge"), active("conflict")],
|
|
4694
|
+
origin: "git",
|
|
4695
|
+
reason: "Git rejects --ignore-unmerged with --merge, which a conflict style implies.",
|
|
4696
|
+
source: git("builtin/checkout.c")
|
|
3566
4697
|
}
|
|
3567
4698
|
],
|
|
3568
4699
|
clean: [
|
|
@@ -3748,8 +4879,8 @@ var INPUT_CONSTRAINTS = {
|
|
|
3748
4879
|
source: "https://github.com/git-lfs/git-lfs/blob/v3.8.0/commands/command_checkout.go"
|
|
3749
4880
|
}
|
|
3750
4881
|
],
|
|
3751
|
-
// repo.commit emits no paths. These stay runtime checks:
|
|
3752
|
-
// multiplies the compiler's work on every caller of the
|
|
4882
|
+
// repo.commit emits no paths, and its fixup is a free string. These stay runtime checks:
|
|
4883
|
+
// modeling them in CommitOpts multiplies the compiler's work on every caller of the type.
|
|
3753
4884
|
commitPaths: [
|
|
3754
4885
|
{
|
|
3755
4886
|
id: "commit.only-paths",
|
|
@@ -3762,7 +4893,6 @@ var INPUT_CONSTRAINTS = {
|
|
|
3762
4893
|
{ key: "fixup", test: "startsWith", value: "amend:" }
|
|
3763
4894
|
],
|
|
3764
4895
|
origin: "git",
|
|
3765
|
-
// Git 2.32+ also refuses amend with a plain fixup, but older Git accepts it.
|
|
3766
4896
|
reason: "Only mode without paths requires allowEmpty, amend or an amend: fixup.",
|
|
3767
4897
|
source: "https://github.com/git/git/blob/v2.55.0/builtin/commit.c"
|
|
3768
4898
|
},
|
|
@@ -3778,6 +4908,99 @@ var INPUT_CONSTRAINTS = {
|
|
|
3778
4908
|
origin: "git",
|
|
3779
4909
|
reason: "A reword: fixup cannot include changed files.",
|
|
3780
4910
|
source: "https://github.com/git/git/blob/v2.55.0/builtin/commit.c"
|
|
4911
|
+
},
|
|
4912
|
+
// Runtime checks: in CommitOpts these exceed the compiler's union budget.
|
|
4913
|
+
{
|
|
4914
|
+
id: "commit.fixup-suboption",
|
|
4915
|
+
kind: "scalar",
|
|
4916
|
+
key: "fixup",
|
|
4917
|
+
parser: "commit-fixup",
|
|
4918
|
+
origin: "git",
|
|
4919
|
+
reason: "A fixup suboption (letters before a colon) must be amend or reword.",
|
|
4920
|
+
source: "https://github.com/git/git/blob/v2.55.0/builtin/commit.c"
|
|
4921
|
+
},
|
|
4922
|
+
{
|
|
4923
|
+
id: "commit.reset-author-amend-fixup",
|
|
4924
|
+
kind: "forbid",
|
|
4925
|
+
when: [
|
|
4926
|
+
{ key: "resetAuthor", test: "active" },
|
|
4927
|
+
{ key: "amend", test: "active" },
|
|
4928
|
+
{ key: "fixup", test: "nonempty" }
|
|
4929
|
+
],
|
|
4930
|
+
origin: "git",
|
|
4931
|
+
reason: "With a fixup, amend reuses no message, so resetAuthor has nothing to reset.",
|
|
4932
|
+
source: "https://github.com/git/git/blob/v2.55.0/builtin/commit.c"
|
|
4933
|
+
},
|
|
4934
|
+
{
|
|
4935
|
+
id: "commit.fixup-amend-message",
|
|
4936
|
+
kind: "forbid",
|
|
4937
|
+
when: [
|
|
4938
|
+
{ key: "fixup", test: "startsWith", value: "amend:" },
|
|
4939
|
+
{ key: "message", test: "nonempty" }
|
|
4940
|
+
],
|
|
4941
|
+
origin: "git",
|
|
4942
|
+
reason: "An amend: fixup takes its message from the amended commit, not from a message.",
|
|
4943
|
+
source: "https://github.com/git/git/blob/v2.55.0/builtin/commit.c"
|
|
4944
|
+
},
|
|
4945
|
+
{
|
|
4946
|
+
id: "commit.fixup-reword-message",
|
|
4947
|
+
kind: "forbid",
|
|
4948
|
+
when: [
|
|
4949
|
+
{ key: "fixup", test: "startsWith", value: "reword:" },
|
|
4950
|
+
{ key: "message", test: "nonempty" }
|
|
4951
|
+
],
|
|
4952
|
+
origin: "git",
|
|
4953
|
+
reason: "A reword: fixup takes its message from the amended commit, not from a message.",
|
|
4954
|
+
source: "https://github.com/git/git/blob/v2.55.0/builtin/commit.c"
|
|
4955
|
+
},
|
|
4956
|
+
{
|
|
4957
|
+
id: "commit.author-ident",
|
|
4958
|
+
kind: "scalar",
|
|
4959
|
+
key: "author",
|
|
4960
|
+
parser: "commit-author",
|
|
4961
|
+
// repo.commit skips an empty author; dry runs return before determine_author_info.
|
|
4962
|
+
guard: [
|
|
4963
|
+
{ key: "author", test: "nonempty" },
|
|
4964
|
+
{ key: "dryRun", test: "inactive" }
|
|
4965
|
+
],
|
|
4966
|
+
origin: "git",
|
|
4967
|
+
reason: "An author containing '>' must be 'Name <email>' with a nonempty name.",
|
|
4968
|
+
source: "https://github.com/git/git/blob/v2.55.0/builtin/commit.c"
|
|
4969
|
+
},
|
|
4970
|
+
{
|
|
4971
|
+
id: "commit.date",
|
|
4972
|
+
kind: "scalar",
|
|
4973
|
+
key: "date",
|
|
4974
|
+
parser: "commit-date",
|
|
4975
|
+
// repo.commit skips an empty date and converts a Date, which still needs a valid time.
|
|
4976
|
+
guard: [
|
|
4977
|
+
{ key: "date", test: "present" },
|
|
4978
|
+
{ key: "date", test: "notEquals", value: "" },
|
|
4979
|
+
{ key: "dryRun", test: "inactive" }
|
|
4980
|
+
],
|
|
4981
|
+
origin: "git",
|
|
4982
|
+
reason: "The date must be a Git date (parse_date or approxidate).",
|
|
4983
|
+
source: "https://github.com/git/git/blob/v2.55.0/builtin/commit.c"
|
|
4984
|
+
}
|
|
4985
|
+
],
|
|
4986
|
+
restorePaths: [
|
|
4987
|
+
{
|
|
4988
|
+
id: "restore.paths",
|
|
4989
|
+
kind: "requiresAny",
|
|
4990
|
+
when: { key: "paths", test: "lengthEquals", value: 0 },
|
|
4991
|
+
// An empty pathspecFromFile is not emitted, so it does not count.
|
|
4992
|
+
choices: [{ key: "pathspecFromFile", test: "nonempty" }],
|
|
4993
|
+
origin: "git",
|
|
4994
|
+
reason: "Restore without patch mode needs paths or a pathspec file.",
|
|
4995
|
+
source: "https://github.com/git/git/blob/v2.55.0/builtin/checkout.c"
|
|
4996
|
+
},
|
|
4997
|
+
{
|
|
4998
|
+
id: "restore.source-empty",
|
|
4999
|
+
kind: "forbid",
|
|
5000
|
+
when: [{ key: "source", test: "equals", value: "" }],
|
|
5001
|
+
origin: "git",
|
|
5002
|
+
reason: "Git cannot resolve an empty --source tree-ish; omit source to restore from the index instead.",
|
|
5003
|
+
source: "https://github.com/git/git/blob/v2.55.0/builtin/checkout.c"
|
|
3781
5004
|
}
|
|
3782
5005
|
],
|
|
3783
5006
|
pathspec: [
|
|
@@ -3810,6 +5033,21 @@ var INPUT_CONSTRAINTS = {
|
|
|
3810
5033
|
origin: "git",
|
|
3811
5034
|
reason: "An empty switch target is never a valid reference or branch name, with or without create, force-create or orphan.",
|
|
3812
5035
|
source: "https://github.com/git/git/blob/v2.55.0/builtin/checkout.c"
|
|
5036
|
+
},
|
|
5037
|
+
{
|
|
5038
|
+
id: "switch.track-start-point",
|
|
5039
|
+
kind: "scalar",
|
|
5040
|
+
key: "branch",
|
|
5041
|
+
parser: "track-start-point",
|
|
5042
|
+
guard: [
|
|
5043
|
+
{ key: "track", test: "active" },
|
|
5044
|
+
{ key: "create", test: "inactive" },
|
|
5045
|
+
{ key: "forceCreate", test: "inactive" },
|
|
5046
|
+
{ key: "orphan", test: "inactive" }
|
|
5047
|
+
],
|
|
5048
|
+
origin: "git",
|
|
5049
|
+
reason: "--track without create, forceCreate or orphan names the new branch after the first '/' of the target (after refs/ and remotes/), which must leave a nonempty name.",
|
|
5050
|
+
source: "https://github.com/git/git/blob/v2.55.0/builtin/checkout.c"
|
|
3813
5051
|
}
|
|
3814
5052
|
]
|
|
3815
5053
|
};
|
|
@@ -3941,8 +5179,18 @@ function violates(rule, options, scalarContext) {
|
|
|
3941
5179
|
));
|
|
3942
5180
|
}
|
|
3943
5181
|
case "elements": {
|
|
3944
|
-
const
|
|
3945
|
-
|
|
5182
|
+
const stored = options[rule.key];
|
|
5183
|
+
if (stored === void 0 && rule.withKey === void 0) {
|
|
5184
|
+
return false;
|
|
5185
|
+
}
|
|
5186
|
+
if (stored !== void 0 && !Array.isArray(stored)) {
|
|
5187
|
+
return true;
|
|
5188
|
+
}
|
|
5189
|
+
const items = [
|
|
5190
|
+
...stored ?? [],
|
|
5191
|
+
...rule.withKey === void 0 ? [] : [options[rule.withKey]]
|
|
5192
|
+
];
|
|
5193
|
+
return items.filter((item) => !rule.allowed.includes(item)).length > (rule.maxOutside ?? 0);
|
|
3946
5194
|
}
|
|
3947
5195
|
case "eachScalar": {
|
|
3948
5196
|
const items = options[rule.key];
|
|
@@ -4181,6 +5429,7 @@ var CliRunner = class _CliRunner {
|
|
|
4181
5429
|
home;
|
|
4182
5430
|
credential;
|
|
4183
5431
|
audit;
|
|
5432
|
+
configOverrides;
|
|
4184
5433
|
constructor(adapters, options) {
|
|
4185
5434
|
this.exec = adapters.exec;
|
|
4186
5435
|
this.fs = adapters.fs;
|
|
@@ -4196,6 +5445,7 @@ var CliRunner = class _CliRunner {
|
|
|
4196
5445
|
this.home = options?.home;
|
|
4197
5446
|
this.credential = options?.credential;
|
|
4198
5447
|
this.audit = options?.audit;
|
|
5448
|
+
this.configOverrides = options?.configOverrides ?? [];
|
|
4199
5449
|
}
|
|
4200
5450
|
/**
|
|
4201
5451
|
* Create a new CliRunner with additional options merged
|
|
@@ -4226,17 +5476,23 @@ var CliRunner = class _CliRunner {
|
|
|
4226
5476
|
pathPrefix: mergedPathPrefix,
|
|
4227
5477
|
home,
|
|
4228
5478
|
credential,
|
|
4229
|
-
audit
|
|
5479
|
+
audit,
|
|
5480
|
+
configOverrides: [...this.configOverrides, ...options.configOverrides ?? []]
|
|
4230
5481
|
}
|
|
4231
5482
|
);
|
|
4232
5483
|
}
|
|
5484
|
+
/** `key=value` pairs passed with `-c`: the credential helper, then the configured overrides. */
|
|
5485
|
+
configParameters() {
|
|
5486
|
+
const parameters = this.credential?.helper ? [`credential.helper=${this.credential.helper}`] : [];
|
|
5487
|
+
return [...parameters, ...this.configOverrides];
|
|
5488
|
+
}
|
|
4233
5489
|
/**
|
|
4234
5490
|
* Build command argv based on execution context
|
|
4235
5491
|
*/
|
|
4236
5492
|
buildArgv(context, args) {
|
|
4237
5493
|
const argv = [this.gitBinary];
|
|
4238
|
-
|
|
4239
|
-
argv.push("-c",
|
|
5494
|
+
for (const parameter of this.configParameters()) {
|
|
5495
|
+
argv.push("-c", parameter);
|
|
4240
5496
|
}
|
|
4241
5497
|
switch (context.type) {
|
|
4242
5498
|
case "global":
|
|
@@ -4563,10 +5819,11 @@ var CliRunner = class _CliRunner {
|
|
|
4563
5819
|
stripTraceEnv(env);
|
|
4564
5820
|
}
|
|
4565
5821
|
const audit = internal ? void 0 : this.audit;
|
|
4566
|
-
|
|
5822
|
+
const parameters = executable ? this.configParameters() : [];
|
|
5823
|
+
if (parameters.length > 0) {
|
|
4567
5824
|
const quote = (value) => `'${value.replace(/['!]/g, "'\\$&'")}'`;
|
|
4568
|
-
const
|
|
4569
|
-
env.GIT_CONFIG_PARAMETERS = env.GIT_CONFIG_PARAMETERS ? `${env.GIT_CONFIG_PARAMETERS} ${
|
|
5825
|
+
const quoted = parameters.map(quote).join(" ");
|
|
5826
|
+
env.GIT_CONFIG_PARAMETERS = env.GIT_CONFIG_PARAMETERS ? `${env.GIT_CONFIG_PARAMETERS} ${quoted}` : quoted;
|
|
4570
5827
|
}
|
|
4571
5828
|
if (onLfsProgress) {
|
|
4572
5829
|
env.GIT_LFS_FORCE_PROGRESS = "1";
|
|
@@ -4777,10 +6034,12 @@ export {
|
|
|
4777
6034
|
GitError,
|
|
4778
6035
|
GitArgumentError,
|
|
4779
6036
|
asciiLower,
|
|
6037
|
+
isBooleanCallback,
|
|
6038
|
+
validRefSortKey,
|
|
6039
|
+
branchNameSyntax,
|
|
4780
6040
|
DECIMAL_CALLBACK_PROBES,
|
|
4781
6041
|
decimalCallbackFamily,
|
|
4782
6042
|
isCompoundDecimal,
|
|
4783
|
-
isBooleanCallback,
|
|
4784
6043
|
nativeCLongBits,
|
|
4785
6044
|
nativeSizeTBits,
|
|
4786
6045
|
objectFilterUsesBinary,
|