I'm trying to fix missing pointers issue using git lfs migrate import --no-rewrite
first i list all the files that had missing pointers using git reset --hard
:
new Promise((resolve, reject) => {
exec("git reset --hard", (error, stdout, stderr) => {
if (error) {
console.error(`exec error: ${error}`);
reject(error);
return;
}
const filesWithMissingPointers = Array.from(
stderr.matchAll(/\t(.*)/g)
).map((m) => m[1]);
resolve(filesWithMissingPointers);
});
});
Then i log the output:
console.log(
`Problem files before lfs migrating: \t\n${problemFilesBefore.join("\t\n")}`
);
Output:
Problem files before lfs migrating:
IdleGame/Assets/Plugins/Fonts/Localization/Korean/NotoSansCJKkr-Medium.otf
IdleGame/Assets/Plugins/Fonts/Localization/Latin_Cyrillic_Greek/OctoberPro-Black.otf
IdleGame/Assets/Plugins/Fonts/Localization/Latin_Cyrillic_Greek/OctoberPro-HeavyItalic.otf
IdleGame/Assets/Plugins/Fonts/Localization/Persian/NotoNaskhArabicUI-Bold.ttf
IdleGame/Assets/Plugins/Fonts/Localization/Thai/NotoSansThaiUI-CondensedMedium.ttf
IdleGame/Assets/Plugins/Fonts/Oswald-Bold.ttf
IdleGame/Assets/Plugins/Fonts/PoetsenOneRegular/TrueType font file/PoetsenOne-Regular 1.ttf
IdleGame/Assets/Plugins/Fonts/Roboto Medium/TrueType font file/roboto-medium.ttf
IdleGame/Assets/Plugins/Fonts/nevis.ttf
IdleGame/Assets/Plugins/LibrariesDesign/BeautifulDissolves/_Examples/_Assets/Textures/ZomBearSpecular.tif
IdleGame/Assets/Plugins/LibrariesDesign/BeautifulDissolves/_Examples/_Assets/Textures/ZomBunnySpecular.tif
I'm then trying to run:
execSync(
`git lfs migrate import --no-rewrite \ -m "AutoCommit Bot: fix missing LFS points ${process.env.CI_PIPELINE_URL}" ${problemFilesBefore.join(" ")} --yes`
);
And i encounter:
Error: unknown flag: --no-rewrite
I'm encountering the same issue locally when running the command in powershell but i do not encounter it when running it in bash. My scripts runs in docker container (linux) with installed git lfs. Since it's Unix it should use bash as default command line so i don't think that the problem lies in the shell.
Note: I run this script as a job on gitlab