removed all uses of undefined from code base
It's a code smell, can lead to hard to diagnose error messages.
This commit is contained in:
parent
d7f4c823d7
commit
addc82dab7
19 changed files with 42 additions and 37 deletions
|
@ -181,12 +181,13 @@ parseUnmerged s
|
|||
| otherwise = case words metadata of
|
||||
(rawblobtype:rawsha:rawstage:_) -> do
|
||||
stage <- readish rawstage :: Maybe Int
|
||||
unless (stage == 2 || stage == 3) $
|
||||
fail undefined -- skip stage 1
|
||||
blobtype <- readBlobType rawblobtype
|
||||
sha <- extractSha rawsha
|
||||
return $ InternalUnmerged (stage == 2) file
|
||||
(Just blobtype) (Just sha)
|
||||
if stage /= 2 && stage /= 3
|
||||
then Nothing
|
||||
else do
|
||||
blobtype <- readBlobType rawblobtype
|
||||
sha <- extractSha rawsha
|
||||
return $ InternalUnmerged (stage == 2) file
|
||||
(Just blobtype) (Just sha)
|
||||
_ -> Nothing
|
||||
where
|
||||
(metadata, file) = separate (== '\t') s
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue