Merge pull request #3781 from github/henrymercer/update-git-minimum-version

Update minimum Git version for overlay to 2.36.0
This commit is contained in:
Henry Mercer
2026-03-27 14:59:36 +00:00
committed by GitHub
3 changed files with 8 additions and 8 deletions

View File

@@ -4,7 +4,7 @@ See the [releases page](https://github.com/github/codeql-action/releases) for th
## [UNRELEASED]
No user facing changes.
- Fix incorrect minimum required Git version for [improved incremental analysis](https://github.com/github/roadmap/issues/1158): it should have been 2.36.0, not 2.11.0. [#3781](https://github.com/github/codeql-action/pull/3781)
## 4.35.0 - 27 Mar 2026

2
lib/init-action.js generated
View File

@@ -105203,7 +105203,7 @@ var core8 = __toESM(require_core());
var toolrunner2 = __toESM(require_toolrunner());
var io3 = __toESM(require_io());
var semver3 = __toESM(require_semver2());
var GIT_MINIMUM_VERSION_FOR_OVERLAY = "2.11.0";
var GIT_MINIMUM_VERSION_FOR_OVERLAY = "2.36.0";
var GitVersionInfo = class {
constructor(truncatedVersion, fullVersion) {
this.truncatedVersion = truncatedVersion;

View File

@@ -14,11 +14,11 @@ import {
import { ConfigurationError, getRequiredEnvParam } from "./util";
/**
* Minimum Git version required for overlay analysis. The
* `git ls-files --recurse-submodules` option, which is used by
* `getFileOidsUnderPath`, was introduced in Git 2.11.0.
* Minimum Git version required for overlay analysis. Support for using the `git ls-files
* --recurse-submodules` option with `--stage` was added in Git 2.36.0. For more information, see
* `getFileOidsUnderPath`.
*/
export const GIT_MINIMUM_VERSION_FOR_OVERLAY = "2.11.0";
export const GIT_MINIMUM_VERSION_FOR_OVERLAY = "2.36.0";
/**
* Git version information
@@ -261,8 +261,8 @@ export const getFileOidsUnderPath = async function (
// Without the --full-name flag, the path is relative to the current working
// directory of the git command, which is basePath.
//
// We use --stage rather than --format here because --stage has been available since Git 2.11.0,
// while --format was only introduced in Git 2.38.0, which would limit overlay rollout.
// We use --stage rather than --format here because --stage has been available since Git 2.36.0,
// while --format was only introduced in Git 2.38.0.
const stdout = await runGitCommand(
basePath,
["ls-files", "--recurse-submodules", "--stage"],