harden against tags pointing to non-commits

This commit is contained in:
Mateusz Burzyński
2026-08-04 11:50:15 +02:00
parent 5e8919cc41
commit 7056145900
2 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -167,7 +167,7 @@ async function getTagCommits(cwd: string, tags: string[]) {
if (tags.length === 0) {
return [];
}
const refs = tags.map((tag) => `refs/tags/${tag}^{commit}`);
const refs = tags.map((tag) => `refs/tags/${tag}^{}`);
const { stdout } = await getExecOutput(
"git",
["cat-file", "--batch-check=%(objectname) %(objecttype)"],