diff --git a/Command/Uninit.hs b/Command/Uninit.hs index 1b2e8395a8..a38ac9a7e6 100644 --- a/Command/Uninit.hs +++ b/Command/Uninit.hs @@ -79,7 +79,7 @@ checkCanUninit recordok = current_branch = ifM (inRepo Git.Ref.headExists) - ( Just . Git.Ref . encodeBS . Prelude.head . lines . decodeBS <$> revhead + ( headMaybe . map (Git.Ref . encodeBS) . lines . decodeBS <$> revhead , return Nothing ) revhead = inRepo $ Git.Command.pipeReadStrict