Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit 77b6b85

Browse files
committed
Properly parse other objects and modes
1 parent 3409779 commit 77b6b85

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Semantic/Git.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ entryParser = TreeEntry
6060
<*> oidParser <* AP.char '\t'
6161
<*> (unpack <$> AP.takeWhile (/= '\NUL'))
6262
where
63-
typeParser = AP.choice [BlobObject <$ "blob", TreeObject <$ "tree"]
64-
modeParser = AP.choice [NormalMode <$ "100644", ExecutableMode <$ "100755", SymlinkMode <$ "120000", TreeMode <$ "040000"]
63+
typeParser = AP.choice [BlobObject <$ "blob", TreeObject <$ "tree", OtherObjectType <$ AP.takeWhile isAlphaNum]
64+
modeParser = AP.choice [NormalMode <$ "100644", ExecutableMode <$ "100755", SymlinkMode <$ "120000", TreeMode <$ "040000", OtherMode <$ AP.takeWhile isAlphaNum]
6565
oidParser = OID <$> AP.takeWhile isHexDigit
6666

6767
newtype OID = OID Text

0 commit comments

Comments
 (0)