hide useless git error
Msrc/services/git.ts
@@ -453,7 +453,11 @@ export const git = {
await $`git -C ${p} show --end-of-options ${`${ref}:${filePath}`}`.arrayBuffer();
return Buffer.from(buf);
} catch (e) {
logGitError(`show(${ref}:${filePath})`, name, e);
// A missing path is a normal answer (e.g. probing for a CI
// config on every push), not an error worth a stack trace.
const stderr = (e as { stderr?: unknown }).stderr?.toString() ?? "";
if (!/does not exist in|exists on disk, but not in/.test(stderr))
logGitError(`show(${ref}:${filePath})`, name, e);
return null;
}
},