fix some mixed space+tab indentation
This fixes all instances of " \t" in the code base. Most common case seems to be after a "where" line; probably vim copied the two space layout of that line. Done as a background task while listening to episode 2 of the Type Theory podcast.
This commit is contained in:
parent
8f69d55f03
commit
7b50b3c057
131 changed files with 242 additions and 242 deletions
|
@ -94,7 +94,7 @@ catTree :: CatFileHandle -> Ref -> IO [(FilePath, FileMode)]
|
|||
catTree h treeref = go <$> catObjectDetails h treeref
|
||||
where
|
||||
go (Just (b, _, TreeObject)) = parsetree [] b
|
||||
go _ = []
|
||||
go _ = []
|
||||
|
||||
parsetree c b = case L.break (== 0) b of
|
||||
(modefile, rest)
|
||||
|
|
|
@ -79,7 +79,7 @@ pipeWriteRead params writer repo = assertLocal repo $
|
|||
writeReadProcessEnv "git" (toCommand $ gitCommandLine params repo)
|
||||
(gitEnv repo) writer (Just adjusthandle)
|
||||
where
|
||||
adjusthandle h = do
|
||||
adjusthandle h = do
|
||||
fileEncoding h
|
||||
hSetNewlineMode h noNewlineTranslation
|
||||
|
||||
|
@ -117,7 +117,7 @@ gitCoProcessStart restartable params repo = CoProcess.start numrestarts "git"
|
|||
(toCommand $ gitCommandLine params repo)
|
||||
(gitEnv repo)
|
||||
where
|
||||
{- If a long-running git command like cat-file --batch
|
||||
{- If a long-running git command like cat-file --batch
|
||||
- crashes, it will likely start up again ok. If it keeps crashing
|
||||
- 10 times, something is badly wrong. -}
|
||||
numrestarts = if restartable then 10 else 0
|
||||
|
|
|
@ -167,7 +167,7 @@ coreBare = "core.bare"
|
|||
fromPipe :: Repo -> String -> [CommandParam] -> IO (Either SomeException (Repo, String))
|
||||
fromPipe r cmd params = try $
|
||||
withHandle StdoutHandle createProcessSuccess p $ \h -> do
|
||||
fileEncoding h
|
||||
fileEncoding h
|
||||
val <- hGetContentsStrict h
|
||||
r' <- store val r
|
||||
return (r', val)
|
||||
|
|
|
@ -38,12 +38,12 @@ isEncrypted _ = False
|
|||
encryptedRemote :: Repo -> Repo -> IO Repo
|
||||
encryptedRemote baserepo = go
|
||||
where
|
||||
go Repo { location = Url url }
|
||||
go Repo { location = Url url }
|
||||
| urlPrefix `isPrefixOf` u =
|
||||
fromRemoteLocation (drop plen u) baserepo
|
||||
| otherwise = notencrypted
|
||||
where
|
||||
u = show url
|
||||
u = show url
|
||||
plen = length urlPrefix
|
||||
go _ = notencrypted
|
||||
notencrypted = error "not a gcrypt encrypted repository"
|
||||
|
@ -92,7 +92,7 @@ getParticiantList globalconfigrepo repo remotename = KeyIds $ parse $ firstJust
|
|||
]
|
||||
where
|
||||
defaultkey = "gcrypt.participants"
|
||||
parse (Just "simple") = []
|
||||
parse (Just "simple") = []
|
||||
parse (Just l) = words l
|
||||
parse Nothing = []
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ lsTreeParams t = [ Params "ls-tree --full-tree -z -r --", File $ fromRef t ]
|
|||
lsTreeFiles :: Ref -> [FilePath] -> Repo -> IO [TreeItem]
|
||||
lsTreeFiles t fs repo = map parseLsTree <$> pipeNullSplitStrict ps repo
|
||||
where
|
||||
ps = [Params "ls-tree --full-tree -z --", File $ fromRef t] ++ map File fs
|
||||
ps = [Params "ls-tree --full-tree -z --", File $ fromRef t] ++ map File fs
|
||||
|
||||
{- Parses a line of ls-tree output.
|
||||
- (The --long format is not currently supported.) -}
|
||||
|
|
|
@ -70,7 +70,7 @@ remoteLocationIsSshUrl _ = False
|
|||
parseRemoteLocation :: String -> Repo -> RemoteLocation
|
||||
parseRemoteLocation s repo = ret $ calcloc s
|
||||
where
|
||||
ret v
|
||||
ret v
|
||||
#ifdef mingw32_HOST_OS
|
||||
| dosstyle v = RemotePath (dospath v)
|
||||
#endif
|
||||
|
|
|
@ -222,7 +222,7 @@ badBranches missing r = filterM isbad =<< getAllRefs r
|
|||
getAllRefs :: Repo -> IO [Ref]
|
||||
getAllRefs r = map toref <$> dirContentsRecursive refdir
|
||||
where
|
||||
refdir = localGitDir r </> "refs"
|
||||
refdir = localGitDir r </> "refs"
|
||||
toref = Ref . relPathDirToFile (localGitDir r)
|
||||
|
||||
explodePackedRefsFile :: Repo -> IO ()
|
||||
|
@ -411,7 +411,7 @@ displayList items header
|
|||
putStrLn header
|
||||
putStr $ unlines $ map (\i -> "\t" ++ i) truncateditems
|
||||
where
|
||||
numitems = length items
|
||||
numitems = length items
|
||||
truncateditems
|
||||
| numitems > 10 = take 10 items ++ ["(and " ++ show (numitems - 10) ++ " more)"]
|
||||
| otherwise = items
|
||||
|
|
|
@ -21,7 +21,7 @@ instance Show GitVersion where
|
|||
installed :: IO GitVersion
|
||||
installed = normalize . extract <$> readProcess "git" ["--version"]
|
||||
where
|
||||
extract s = case lines s of
|
||||
extract s = case lines s of
|
||||
[] -> ""
|
||||
(l:_) -> unwords $ drop 2 $ words l
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue