summaryrefslogtreecommitdiff
path: root/Git/Sha.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-12-13 00:24:19 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-12-13 00:24:19 -0400
commit94554782894ec6c26da3b46312d5d1d16d596458 (patch)
tree78746106bfb153945ccbfd2bbae536081c005e91 /Git/Sha.hs
parent55bd61d8c42aaf36a3c57f8444c493f6b045f4cd (diff)
finished where indentation changes
Diffstat (limited to 'Git/Sha.hs')
-rw-r--r--Git/Sha.hs16
1 files changed, 8 insertions, 8 deletions
diff --git a/Git/Sha.hs b/Git/Sha.hs
index 2a01ede83..e62b29dab 100644
--- a/Git/Sha.hs
+++ b/Git/Sha.hs
@@ -14,8 +14,8 @@ import Git.Types
any trailing newline, returning the sha. -}
getSha :: String -> IO String -> IO Sha
getSha subcommand a = maybe bad return =<< extractSha <$> a
- where
- bad = error $ "failed to read sha from git " ++ subcommand
+ where
+ bad = error $ "failed to read sha from git " ++ subcommand
{- Extracts the Sha from a string. There can be a trailing newline after
- it, but nothing else. -}
@@ -24,12 +24,12 @@ extractSha s
| len == shaSize = val s
| len == shaSize + 1 && length s' == shaSize = val s'
| otherwise = Nothing
- where
- len = length s
- s' = firstLine s
- val v
- | all (`elem` "1234567890ABCDEFabcdef") v = Just $ Ref v
- | otherwise = Nothing
+ where
+ len = length s
+ s' = firstLine s
+ val v
+ | all (`elem` "1234567890ABCDEFabcdef") v = Just $ Ref v
+ | otherwise = Nothing
{- Size of a git sha. -}
shaSize :: Int