mirror of
https://github.com/github/codeql-action
synced 2026-05-27 10:01:44 +03:00
Test fallback when repo has no submodules
This commit is contained in:
Generated
+2
-6
@@ -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,
|
||||
|
||||
Generated
+2
-6
@@ -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,
|
||||
|
||||
Generated
+2
-6
@@ -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,
|
||||
|
||||
Generated
+2
-6
@@ -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,
|
||||
|
||||
Generated
+2
-6
@@ -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,
|
||||
|
||||
Generated
+2
-6
@@ -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,
|
||||
|
||||
Generated
+2
-6
@@ -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,
|
||||
|
||||
Generated
+2
-6
@@ -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,
|
||||
|
||||
Generated
+2
-6
@@ -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,
|
||||
|
||||
@@ -1959,6 +1959,20 @@ test.serial(
|
||||
},
|
||||
);
|
||||
|
||||
test.serial(
|
||||
checkOverlayEnablementMacro,
|
||||
"Overlay enabled when git version cannot be determined and repo has no submodules",
|
||||
{
|
||||
overlayDatabaseEnvVar: "overlay",
|
||||
gitVersion: undefined,
|
||||
hasSubmodules: false,
|
||||
},
|
||||
{
|
||||
overlayDatabaseMode: OverlayDatabaseMode.Overlay,
|
||||
useOverlayDatabaseCaching: false,
|
||||
},
|
||||
);
|
||||
|
||||
test.serial(
|
||||
checkOverlayEnablementMacro,
|
||||
"No overlay when disabled via repository property",
|
||||
|
||||
Reference in New Issue
Block a user