Commits

Stefan Saasen committed a4b4b9a

Add doc comments to Git.Pack.Delta and Git.Remote.Operations

Comments (0)

Files changed (2)

src/Git/Pack/Delta.hs

 --     delta <- B.readFile deltaFile
 --     either putStrLn (B.writeFile \"target.file\") $ patch source delta
 -- @
-patch :: B.ByteString -> B.ByteString -> Either String B.ByteString
+patch :: B.ByteString -- ^ Source/Base
+      -> B.ByteString -- ^ Delta
+      -> Either String B.ByteString
 patch base delta = do
         header <- decodeDeltaHeader delta
         if B.length base == sourceLength header then

src/Git/Remote/Operations.hs

 
 -- | Clone the given git repository (only the git protocol is currently
 -- supported) into a new directory.
---
--- <url> The git URL to clone from
--- [<directory>] The name of the directory to clone into (optional)
-clone :: String -> Maybe String -> IO ()
+clone :: String         -- ^ The git URL to clone from
+      -> Maybe String   -- ^ The name of the directory to clone into (optional)
+      -> IO ()
 clone url maybeDirectory =
     case parseRemote $ C.pack url of
         Just remote -> let gitRepoName = fromMaybe (repositoryName remote) maybeDirectory
         runReaderT checkoutHead repo
 
 -- | List references in a remote repository
-lsRemote :: String -> IO ()
+lsRemote :: String  -- ^ Location of the repository
+         -> IO ()
 lsRemote url =
     case parseRemote $ C.pack url of
         Just remote -> do