mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 08:37:22 +00:00
Correctly extract HEAD ref in getNostrRemoteInfo
This commit is contained in:
2 files changed
+165
-1
No files matched your search
+8
-1
@@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user