{-# LINE 1 "Bindings/Libgit2/Repository.hsc" #-}

{-# LINE 2 "Bindings/Libgit2/Repository.hsc" #-}

{-# LINE 3 "Bindings/Libgit2/Repository.hsc" #-}
module Bindings.Libgit2.Repository where
import Foreign.Ptr (Ptr,FunPtr,plusPtr)
import Foreign.Ptr (wordPtrToPtr,castPtrToFunPtr)
import Foreign.Storable
import Foreign.C.Types
import Foreign.C.String (CString,CStringLen,CWString,CWStringLen)
import Foreign.Marshal.Alloc (alloca)
import Foreign.Marshal.Array (peekArray,pokeArray)
import Data.Int
import Data.Word

{-# LINE 5 "Bindings/Libgit2/Repository.hsc" #-}

import Bindings.Libgit2.Common
import Bindings.Libgit2.Types
import Bindings.Libgit2.Oid
foreign import ccall "git_repository_open" c'git_repository_open
  :: Ptr (Ptr C'git_repository) -> CString -> IO (CInt)
foreign import ccall "&git_repository_open" p'git_repository_open
  :: FunPtr (Ptr (Ptr C'git_repository) -> CString -> IO (CInt))

{-# LINE 10 "Bindings/Libgit2/Repository.hsc" #-}
foreign import ccall "git_repository_discover" c'git_repository_discover
  :: CString -> CSize -> CString -> CInt -> CString -> IO (CInt)
foreign import ccall "&git_repository_discover" p'git_repository_discover
  :: FunPtr (CString -> CSize -> CString -> CInt -> CString -> IO (CInt))

{-# LINE 11 "Bindings/Libgit2/Repository.hsc" #-}
{- enum {
    GIT_REPOSITORY_OPEN_NO_SEARCH = 1 << 0,
    GIT_REPOSITORY_OPEN_CROSS_FS = 1 << 1
}; -}
c'GIT_REPOSITORY_OPEN_NO_SEARCH = 1
c'GIT_REPOSITORY_OPEN_NO_SEARCH :: (Num a) => a

{-# LINE 16 "Bindings/Libgit2/Repository.hsc" #-}
c'GIT_REPOSITORY_OPEN_CROSS_FS = 2
c'GIT_REPOSITORY_OPEN_CROSS_FS :: (Num a) => a

{-# LINE 17 "Bindings/Libgit2/Repository.hsc" #-}
foreign import ccall "git_repository_open_ext" c'git_repository_open_ext
  :: Ptr (Ptr C'git_repository) -> CString -> CUInt -> CString -> IO (CInt)
foreign import ccall "&git_repository_open_ext" p'git_repository_open_ext
  :: FunPtr (Ptr (Ptr C'git_repository) -> CString -> CUInt -> CString -> IO (CInt))

{-# LINE 18 "Bindings/Libgit2/Repository.hsc" #-}
foreign import ccall "git_repository_new" c'git_repository_new
  :: Ptr (Ptr C'git_repository) -> IO (CInt)
foreign import ccall "&git_repository_new" p'git_repository_new
  :: FunPtr (Ptr (Ptr C'git_repository) -> IO (CInt))

{-# LINE 19 "Bindings/Libgit2/Repository.hsc" #-}
foreign import ccall "git_repository_free" c'git_repository_free
  :: Ptr C'git_repository -> IO ()
foreign import ccall "&git_repository_free" p'git_repository_free
  :: FunPtr (Ptr C'git_repository -> IO ())

{-# LINE 20 "Bindings/Libgit2/Repository.hsc" #-}
foreign import ccall "git_repository_init" c'git_repository_init
  :: Ptr (Ptr C'git_repository) -> CString -> CUInt -> IO (CInt)
foreign import ccall "&git_repository_init" p'git_repository_init
  :: FunPtr (Ptr (Ptr C'git_repository) -> CString -> CUInt -> IO (CInt))

{-# LINE 21 "Bindings/Libgit2/Repository.hsc" #-}
foreign import ccall "git_repository_head" c'git_repository_head
  :: Ptr (Ptr C'git_reference) -> Ptr C'git_repository -> IO (CInt)
foreign import ccall "&git_repository_head" p'git_repository_head
  :: FunPtr (Ptr (Ptr C'git_reference) -> Ptr C'git_repository -> IO (CInt))

{-# LINE 22 "Bindings/Libgit2/Repository.hsc" #-}
foreign import ccall "git_repository_head_detached" c'git_repository_head_detached
  :: Ptr C'git_repository -> IO (CInt)
foreign import ccall "&git_repository_head_detached" p'git_repository_head_detached
  :: FunPtr (Ptr C'git_repository -> IO (CInt))

{-# LINE 23 "Bindings/Libgit2/Repository.hsc" #-}
foreign import ccall "git_repository_head_orphan" c'git_repository_head_orphan
  :: Ptr C'git_repository -> IO (CInt)
foreign import ccall "&git_repository_head_orphan" p'git_repository_head_orphan
  :: FunPtr (Ptr C'git_repository -> IO (CInt))

{-# LINE 24 "Bindings/Libgit2/Repository.hsc" #-}
foreign import ccall "git_repository_is_empty" c'git_repository_is_empty
  :: Ptr C'git_repository -> IO (CInt)
foreign import ccall "&git_repository_is_empty" p'git_repository_is_empty
  :: FunPtr (Ptr C'git_repository -> IO (CInt))

{-# LINE 25 "Bindings/Libgit2/Repository.hsc" #-}
foreign import ccall "git_repository_path" c'git_repository_path
  :: Ptr C'git_repository -> IO (CString)
foreign import ccall "&git_repository_path" p'git_repository_path
  :: FunPtr (Ptr C'git_repository -> IO (CString))

{-# LINE 26 "Bindings/Libgit2/Repository.hsc" #-}
foreign import ccall "git_repository_workdir" c'git_repository_workdir
  :: Ptr C'git_repository -> IO (CString)
foreign import ccall "&git_repository_workdir" p'git_repository_workdir
  :: FunPtr (Ptr C'git_repository -> IO (CString))

{-# LINE 27 "Bindings/Libgit2/Repository.hsc" #-}
foreign import ccall "git_repository_set_workdir" c'git_repository_set_workdir
  :: Ptr C'git_repository -> CString -> IO (CInt)
foreign import ccall "&git_repository_set_workdir" p'git_repository_set_workdir
  :: FunPtr (Ptr C'git_repository -> CString -> IO (CInt))

{-# LINE 28 "Bindings/Libgit2/Repository.hsc" #-}
foreign import ccall "git_repository_is_bare" c'git_repository_is_bare
  :: Ptr C'git_repository -> IO (CInt)
foreign import ccall "&git_repository_is_bare" p'git_repository_is_bare
  :: FunPtr (Ptr C'git_repository -> IO (CInt))

{-# LINE 29 "Bindings/Libgit2/Repository.hsc" #-}
foreign import ccall "git_repository_config" c'git_repository_config
  :: Ptr (Ptr C'git_config) -> Ptr C'git_repository -> IO (CInt)
foreign import ccall "&git_repository_config" p'git_repository_config
  :: FunPtr (Ptr (Ptr C'git_config) -> Ptr C'git_repository -> IO (CInt))

{-# LINE 30 "Bindings/Libgit2/Repository.hsc" #-}
foreign import ccall "git_repository_set_config" c'git_repository_set_config
  :: Ptr C'git_repository -> Ptr C'git_config -> IO ()
foreign import ccall "&git_repository_set_config" p'git_repository_set_config
  :: FunPtr (Ptr C'git_repository -> Ptr C'git_config -> IO ())

{-# LINE 31 "Bindings/Libgit2/Repository.hsc" #-}
foreign import ccall "git_repository_odb" c'git_repository_odb
  :: Ptr (Ptr C'git_odb) -> Ptr C'git_repository -> IO (CInt)
foreign import ccall "&git_repository_odb" p'git_repository_odb
  :: FunPtr (Ptr (Ptr C'git_odb) -> Ptr C'git_repository -> IO (CInt))

{-# LINE 32 "Bindings/Libgit2/Repository.hsc" #-}
foreign import ccall "git_repository_set_odb" c'git_repository_set_odb
  :: Ptr C'git_repository -> Ptr C'git_odb -> IO ()
foreign import ccall "&git_repository_set_odb" p'git_repository_set_odb
  :: FunPtr (Ptr C'git_repository -> Ptr C'git_odb -> IO ())

{-# LINE 33 "Bindings/Libgit2/Repository.hsc" #-}
foreign import ccall "git_repository_index" c'git_repository_index
  :: Ptr (Ptr C'git_index) -> Ptr C'git_repository -> IO (CInt)
foreign import ccall "&git_repository_index" p'git_repository_index
  :: FunPtr (Ptr (Ptr C'git_index) -> Ptr C'git_repository -> IO (CInt))

{-# LINE 34 "Bindings/Libgit2/Repository.hsc" #-}
foreign import ccall "git_repository_set_index" c'git_repository_set_index
  :: Ptr C'git_repository -> Ptr C'git_index -> IO ()
foreign import ccall "&git_repository_set_index" p'git_repository_set_index
  :: FunPtr (Ptr C'git_repository -> Ptr C'git_index -> IO ())

{-# LINE 35 "Bindings/Libgit2/Repository.hsc" #-}