🐙 Templated web page generator for your git repositories
git clone https://github.com/m-col/gitja
Files | Refs | Readme | License

Commit 35031ef128de801d323c110ecf730b19023eeb64
Parent: 18e673fd0bd2e949997dc7d08ec568de7d2682f1
Author: mcol <mcol@posteo.net>
Date: 2021-09-19 00:08:38 +0100
Committer: mcol <mcol@posteo.net>
Committed: 2021-09-19 00:08:38 +0100

Remove sub function when handling Git - must improve later

src/Repositories.hs Modified

@@ -39,18 +39,14 @@
     liftIO $ createDirectoryIfMissing True outPath
     ref <- resolveReference "HEAD"
     case ref of
+        Nothing -> liftIO . print $ "gitserve: " <> (takeFileName path) <> ": Failed to resolve HEAD."
         Just commitID -> do
             head <- lookupCommit (Tagged commitID)
             nodes <- lookupTree (commitTree head) >>= listTreeEntries
-            liftIO $ processRepo' templates outPath
-        _ -> liftIO . print $ "gitserve: " <> (takeFileName path) <> ": Failed to resolve HEAD."
+            return ()
   where
     outPath = outputDirectory </> (takeFileName path)
 
-processRepo' :: [Template] -> FilePath -> IO ()
-processRepo' templates outPath = do
-    return ()
-
     --mconcat $ runGingerT (makeContextHtmlM (scopeLookup context) (putStr . unpack . htmlSource)) tpl
 
 -- Variables: