Correctly extract HEAD ref in getNostrRemoteInfo

This commit is contained in:
Alex Gleason committed 2025-12-26 00:00:35 -06:00
1 parent 393eef282b
commit d1b5a26839
2 files changed
+165 -1

No files matched your search

+8 -1
View File
@@ -661,10 +661,17 @@ export class Git {
}
}
// Extract HEAD value - if it's a symbolic ref, extract the target
// Keep the raw value in refs['HEAD'], return extracted target in HEAD field
let headValue = refs['HEAD'];
if (headValue?.startsWith('ref: ')) {
headValue = headValue.substring(5); // Remove "ref: " prefix for the HEAD field
}
return {
capabilities,
refs,
HEAD: refs['HEAD'],
HEAD: headValue,
};
}