Skip to content

Commit 0a4ddb7

Browse files
committed
decode refname even if hash isn't present
1 parent d59db9c commit 0a4ddb7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/SymbolGraphs/Metadata/SymbolGraphMetadata.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,9 @@ extension SymbolGraphMetadata:BSONDocumentDecodable
159159
{
160160
self.init(
161161
package: try bson[.package].decode(),
162-
commit: try bson[.commit_hash]?.decode(as: SHA1.self)
162+
commit: try bson[.commit_refname]?.decode(as: String.self)
163163
{
164-
.init($0, refname: try bson[.commit_refname].decode())
164+
.init(try bson[.commit_hash]?.decode(), refname: $0)
165165
},
166166
triple: try bson[.triple].decode(),
167167
swift: try bson[.swift]?.decode(),

0 commit comments

Comments
 (0)