 newtype Index      = Index CPtr
 newtype Blob       = Blob CPtr
 newtype ObjID      = ObjID CPtr
+newtype Commit     = Commit CPtr
+newtype Signature  = Signature CPtr
 
 defaultPort :: String
 defaultPort = "9418" -- TODO: Import from net.h?

retMaybeRes res | res == 0  = return Nothing
                | otherwise = return $ Just . toEnum . fromIntegral $ res

blobFromBuffer :: ObjID -> Repository -> CPtr -> Int -> IO (Maybe GitError)
blobFromBuffer (ObjID objid) (Repository repo) buf n = do
  res <- {#call git_blob_create_frombuffer#} objid repo buf (fromIntegral n)
  retMaybeRes res

-------------------------------------------------------------------------------
-- END: blob.h
-------------------------------------------------------------------------------



import Foreign
import Foreign.C.String
import Foreign.C.Types
import System.IO.Unsafe

type OffT    = {#type git_off_t#}
type TimeT   = {#type git_time_t#}
