Test fallback when repo has no submodules

This commit is contained in:
Henry Mercer
2026-03-30 15:58:58 +01:00
parent be0a156326
commit a507a542a4
10 changed files with 32 additions and 54 deletions
+2 -6
View File
@@ -162179,12 +162179,8 @@ function hasSubmodules(gitRoot) {
}
var getFileOidsUnderPath = async function(basePath) {
const gitRoot = await getGitRoot(basePath);
if (gitRoot === void 0) {
throw new Error(
`Cannot determine the Git root from ${basePath}.`
);
}
const args = hasSubmodules(gitRoot) ? ["ls-files", "--recurse-submodules", "--stage"] : ["ls-files", "--stage"];
const mayHaveSubmodules = gitRoot === void 0 ? true : hasSubmodules(gitRoot);
const args = mayHaveSubmodules ? ["ls-files", "--recurse-submodules", "--stage"] : ["ls-files", "--stage"];
const stdout = await runGitCommand(
basePath,
args,
+2 -6
View File
@@ -107774,12 +107774,8 @@ function hasSubmodules(gitRoot) {
}
var getFileOidsUnderPath = async function(basePath) {
const gitRoot = await getGitRoot(basePath);
if (gitRoot === void 0) {
throw new Error(
`Cannot determine the Git root from ${basePath}.`
);
}
const args = hasSubmodules(gitRoot) ? ["ls-files", "--recurse-submodules", "--stage"] : ["ls-files", "--stage"];
const mayHaveSubmodules = gitRoot === void 0 ? true : hasSubmodules(gitRoot);
const args = mayHaveSubmodules ? ["ls-files", "--recurse-submodules", "--stage"] : ["ls-files", "--stage"];
const stdout = await runGitCommand(
basePath,
args,
+2 -6
View File
@@ -104233,12 +104233,8 @@ function hasSubmodules(gitRoot) {
}
var getFileOidsUnderPath = async function(basePath) {
const gitRoot = await getGitRoot(basePath);
if (gitRoot === void 0) {
throw new Error(
`Cannot determine the Git root from ${basePath}.`
);
}
const args = hasSubmodules(gitRoot) ? ["ls-files", "--recurse-submodules", "--stage"] : ["ls-files", "--stage"];
const mayHaveSubmodules = gitRoot === void 0 ? true : hasSubmodules(gitRoot);
const args = mayHaveSubmodules ? ["ls-files", "--recurse-submodules", "--stage"] : ["ls-files", "--stage"];
const stdout = await runGitCommand(
basePath,
args,
+2 -6
View File
@@ -165691,12 +165691,8 @@ function hasSubmodules(gitRoot) {
}
var getFileOidsUnderPath = async function(basePath) {
const gitRoot = await getGitRoot(basePath);
if (gitRoot === void 0) {
throw new Error(
`Cannot determine the Git root from ${basePath}.`
);
}
const args = hasSubmodules(gitRoot) ? ["ls-files", "--recurse-submodules", "--stage"] : ["ls-files", "--stage"];
const mayHaveSubmodules = gitRoot === void 0 ? true : hasSubmodules(gitRoot);
const args = mayHaveSubmodules ? ["ls-files", "--recurse-submodules", "--stage"] : ["ls-files", "--stage"];
const stdout = await runGitCommand(
basePath,
args,
+2 -6
View File
@@ -105317,12 +105317,8 @@ function hasSubmodules(gitRoot) {
}
var getFileOidsUnderPath = async function(basePath) {
const gitRoot = await getGitRoot(basePath);
if (gitRoot === void 0) {
throw new Error(
`Cannot determine the Git root from ${basePath}.`
);
}
const args = hasSubmodules(gitRoot) ? ["ls-files", "--recurse-submodules", "--stage"] : ["ls-files", "--stage"];
const mayHaveSubmodules = gitRoot === void 0 ? true : hasSubmodules(gitRoot);
const args = mayHaveSubmodules ? ["ls-files", "--recurse-submodules", "--stage"] : ["ls-files", "--stage"];
const stdout = await runGitCommand(
basePath,
args,
+2 -6
View File
@@ -104226,12 +104226,8 @@ function hasSubmodules(gitRoot) {
}
var getFileOidsUnderPath = async function(basePath) {
const gitRoot = await getGitRoot(basePath);
if (gitRoot === void 0) {
throw new Error(
`Cannot determine the Git root from ${basePath}.`
);
}
const args = hasSubmodules(gitRoot) ? ["ls-files", "--recurse-submodules", "--stage"] : ["ls-files", "--stage"];
const mayHaveSubmodules = gitRoot === void 0 ? true : hasSubmodules(gitRoot);
const args = mayHaveSubmodules ? ["ls-files", "--recurse-submodules", "--stage"] : ["ls-files", "--stage"];
const stdout = await runGitCommand(
basePath,
args,
+2 -6
View File
@@ -104092,12 +104092,8 @@ function hasSubmodules(gitRoot) {
}
var getFileOidsUnderPath = async function(basePath) {
const gitRoot = await getGitRoot(basePath);
if (gitRoot === void 0) {
throw new Error(
`Cannot determine the Git root from ${basePath}.`
);
}
const args = hasSubmodules(gitRoot) ? ["ls-files", "--recurse-submodules", "--stage"] : ["ls-files", "--stage"];
const mayHaveSubmodules = gitRoot === void 0 ? true : hasSubmodules(gitRoot);
const args = mayHaveSubmodules ? ["ls-files", "--recurse-submodules", "--stage"] : ["ls-files", "--stage"];
const stdout = await runGitCommand(
basePath,
args,
+2 -6
View File
@@ -107382,12 +107382,8 @@ function hasSubmodules(gitRoot) {
}
var getFileOidsUnderPath = async function(basePath) {
const gitRoot = await getGitRoot(basePath);
if (gitRoot === void 0) {
throw new Error(
`Cannot determine the Git root from ${basePath}.`
);
}
const args = hasSubmodules(gitRoot) ? ["ls-files", "--recurse-submodules", "--stage"] : ["ls-files", "--stage"];
const mayHaveSubmodules = gitRoot === void 0 ? true : hasSubmodules(gitRoot);
const args = mayHaveSubmodules ? ["ls-files", "--recurse-submodules", "--stage"] : ["ls-files", "--stage"];
const stdout = await runGitCommand(
basePath,
args,
+2 -6
View File
@@ -107067,12 +107067,8 @@ function hasSubmodules(gitRoot) {
}
var getFileOidsUnderPath = async function(basePath) {
const gitRoot = await getGitRoot(basePath);
if (gitRoot === void 0) {
throw new Error(
`Cannot determine the Git root from ${basePath}.`
);
}
const args = hasSubmodules(gitRoot) ? ["ls-files", "--recurse-submodules", "--stage"] : ["ls-files", "--stage"];
const mayHaveSubmodules = gitRoot === void 0 ? true : hasSubmodules(gitRoot);
const args = mayHaveSubmodules ? ["ls-files", "--recurse-submodules", "--stage"] : ["ls-files", "--stage"];
const stdout = await runGitCommand(
basePath,
args,