Commit 57468a35760f2784135e1f264e9c7a8366034894 Parent: 7af0c2f1a5b4703f09e02d298c55152ec9ae5ae3 Author: mcol <mcol@posteo.net> Date: 2021-09-24 17:05:23 +0100 Committer: mcol <mcol@posteo.net> Committed: 2021-09-24 17:05:23 +0100 Source description from right path
src/Repositories.hs Modified
@@ -53,7 +53,8 @@ -- This is split out to make type reasoning a bit easier. processRepo' :: [Template] -> Config -> FilePath -> ReaderT LgRepo IO () processRepo' templates config path = do - liftIO $ createDirectoryIfMissing True outPath + let name = takeFileName path + liftIO $ createDirectoryIfMissing True $ outputDirectory config </> name resolveReference "HEAD" >>= \case Nothing -> liftIO . print $ "gitserve: " <> name <> ": Failed to resolve HEAD." Just commitID -> do @@ -62,7 +63,7 @@ -- description: The description of the repository from repo/description, if -- it exists. - description <- liftIO $ getDescription $ outPath </> "description" + description <- liftIO $ getDescription $ path </> "description" -- commits: A list of `Git.Commit` objects to HEAD. commits <- getCommits gitHead @@ -74,9 +75,6 @@ let repo = package config name description commits tree liftIO . mapM (generate repo) $ templates return () - where - name = takeFileName path - outPath = outputDirectory config </> name {- The role of the function above is to gather information about a git repository and
description Added
@@ -0,0 +1 @@
+This is a placeholder respository description used for testing!