Use --stage instead of --format in git ls-files

This commit is contained in:
Henry Mercer
2026-03-23 18:33:59 +00:00
parent 72c0b0efb7
commit d48d054533
11 changed files with 37 additions and 33 deletions
+2 -2
View File
@@ -162158,11 +162158,11 @@ var decodeGitFilePath = function(filePath) {
var getFileOidsUnderPath = async function(basePath) {
const stdout = await runGitCommand(
basePath,
["ls-files", "--recurse-submodules", "--format=%(objectname)_%(path)"],
["ls-files", "--recurse-submodules", "--stage"],
"Cannot list Git OIDs of tracked files."
);
const fileOidMap = {};
const regex = /^([0-9a-f]{40})_(.+)$/;
const regex = /^[0-9]+ ([0-9a-f]{40}) [0-9]+\t(.+)$/;
for (const line of stdout.split("\n")) {
if (line) {
const match = line.match(regex);
+2 -2
View File
@@ -107778,11 +107778,11 @@ var decodeGitFilePath = function(filePath) {
var getFileOidsUnderPath = async function(basePath) {
const stdout = await runGitCommand(
basePath,
["ls-files", "--recurse-submodules", "--format=%(objectname)_%(path)"],
["ls-files", "--recurse-submodules", "--stage"],
"Cannot list Git OIDs of tracked files."
);
const fileOidMap = {};
const regex = /^([0-9a-f]{40})_(.+)$/;
const regex = /^[0-9]+ ([0-9a-f]{40}) [0-9]+\t(.+)$/;
for (const line of stdout.split("\n")) {
if (line) {
const match = line.match(regex);
+2 -2
View File
@@ -104212,11 +104212,11 @@ var decodeGitFilePath = function(filePath) {
var getFileOidsUnderPath = async function(basePath) {
const stdout = await runGitCommand(
basePath,
["ls-files", "--recurse-submodules", "--format=%(objectname)_%(path)"],
["ls-files", "--recurse-submodules", "--stage"],
"Cannot list Git OIDs of tracked files."
);
const fileOidMap = {};
const regex = /^([0-9a-f]{40})_(.+)$/;
const regex = /^[0-9]+ ([0-9a-f]{40}) [0-9]+\t(.+)$/;
for (const line of stdout.split("\n")) {
if (line) {
const match = line.match(regex);
+2 -2
View File
@@ -165672,11 +165672,11 @@ var decodeGitFilePath = function(filePath) {
var getFileOidsUnderPath = async function(basePath) {
const stdout = await runGitCommand(
basePath,
["ls-files", "--recurse-submodules", "--format=%(objectname)_%(path)"],
["ls-files", "--recurse-submodules", "--stage"],
"Cannot list Git OIDs of tracked files."
);
const fileOidMap = {};
const regex = /^([0-9a-f]{40})_(.+)$/;
const regex = /^[0-9]+ ([0-9a-f]{40}) [0-9]+\t(.+)$/;
for (const line of stdout.split("\n")) {
if (line) {
const match = line.match(regex);
+2 -2
View File
@@ -105306,11 +105306,11 @@ var getGitRoot = async function(sourceRoot) {
var getFileOidsUnderPath = async function(basePath) {
const stdout = await runGitCommand(
basePath,
["ls-files", "--recurse-submodules", "--format=%(objectname)_%(path)"],
["ls-files", "--recurse-submodules", "--stage"],
"Cannot list Git OIDs of tracked files."
);
const fileOidMap = {};
const regex = /^([0-9a-f]{40})_(.+)$/;
const regex = /^[0-9]+ ([0-9a-f]{40}) [0-9]+\t(.+)$/;
for (const line of stdout.split("\n")) {
if (line) {
const match = line.match(regex);
+2 -2
View File
@@ -104205,11 +104205,11 @@ var decodeGitFilePath = function(filePath) {
var getFileOidsUnderPath = async function(basePath) {
const stdout = await runGitCommand(
basePath,
["ls-files", "--recurse-submodules", "--format=%(objectname)_%(path)"],
["ls-files", "--recurse-submodules", "--stage"],
"Cannot list Git OIDs of tracked files."
);
const fileOidMap = {};
const regex = /^([0-9a-f]{40})_(.+)$/;
const regex = /^[0-9]+ ([0-9a-f]{40}) [0-9]+\t(.+)$/;
for (const line of stdout.split("\n")) {
if (line) {
const match = line.match(regex);
+2 -2
View File
@@ -104072,11 +104072,11 @@ var decodeGitFilePath = function(filePath) {
var getFileOidsUnderPath = async function(basePath) {
const stdout = await runGitCommand(
basePath,
["ls-files", "--recurse-submodules", "--format=%(objectname)_%(path)"],
["ls-files", "--recurse-submodules", "--stage"],
"Cannot list Git OIDs of tracked files."
);
const fileOidMap = {};
const regex = /^([0-9a-f]{40})_(.+)$/;
const regex = /^[0-9]+ ([0-9a-f]{40}) [0-9]+\t(.+)$/;
for (const line of stdout.split("\n")) {
if (line) {
const match = line.match(regex);
+2 -2
View File
@@ -107363,11 +107363,11 @@ var decodeGitFilePath = function(filePath) {
var getFileOidsUnderPath = async function(basePath) {
const stdout = await runGitCommand(
basePath,
["ls-files", "--recurse-submodules", "--format=%(objectname)_%(path)"],
["ls-files", "--recurse-submodules", "--stage"],
"Cannot list Git OIDs of tracked files."
);
const fileOidMap = {};
const regex = /^([0-9a-f]{40})_(.+)$/;
const regex = /^[0-9]+ ([0-9a-f]{40}) [0-9]+\t(.+)$/;
for (const line of stdout.split("\n")) {
if (line) {
const match = line.match(regex);
+2 -2
View File
@@ -107047,11 +107047,11 @@ var decodeGitFilePath = function(filePath) {
var getFileOidsUnderPath = async function(basePath) {
const stdout = await runGitCommand(
basePath,
["ls-files", "--recurse-submodules", "--format=%(objectname)_%(path)"],
["ls-files", "--recurse-submodules", "--stage"],
"Cannot list Git OIDs of tracked files."
);
const fileOidMap = {};
const regex = /^([0-9a-f]{40})_(.+)$/;
const regex = /^[0-9]+ ([0-9a-f]{40}) [0-9]+\t(.+)$/;
for (const line of stdout.split("\n")) {
if (line) {
const match = line.match(regex);