summaryrefslogtreecommitdiff
path: root/Git/CatFile.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Git/CatFile.hs')
-rw-r--r--Git/CatFile.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Git/CatFile.hs b/Git/CatFile.hs
index 984d2f465..bd86ff326 100644
--- a/Git/CatFile.hs
+++ b/Git/CatFile.hs
@@ -130,4 +130,4 @@ catTree h treeref = go <$> catObjectDetails h treeref
parsemodefile b =
let (modestr, file) = separate (== ' ') (encodeW8 $ L.unpack b)
in (file, readmode modestr)
- readmode = fst . Prelude.head . readOct
+ readmode = fst . fromMaybe (0, undefined) . headMaybe . readOct