{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} #include #include module Bindings.Libgit2.Index where import Foreign.Ptr #strict_import import Bindings.Libgit2.Common import Bindings.Libgit2.Indexer import Bindings.Libgit2.Types import Bindings.Libgit2.Oid {- typedef struct { git_time_t seconds; unsigned int nanoseconds; } git_index_time; -} #starttype git_index_time #field seconds , CLong #field nanoseconds , CUInt #stoptype {- typedef struct git_index_entry { git_index_time ctime; git_index_time mtime; unsigned int dev; unsigned int ino; unsigned int mode; unsigned int uid; unsigned int gid; git_off_t file_size; git_oid oid; unsigned short flags; unsigned short flags_extended; char * path; } git_index_entry; -} #starttype git_index_entry #field ctime , #field mtime , #field dev , CUInt #field ino , CUInt #field mode , CUInt #field uid , CUInt #field gid , CUInt #field file_size , CLong #field oid , #field flags , CUShort #field flags_extended , CUShort #field path , CString #stoptype {- typedef struct git_index_reuc_entry { unsigned int mode[3]; git_oid oid[3]; char * path; } git_index_reuc_entry; -} #starttype git_index_reuc_entry #array_field mode , CUInt #array_field oid , #field path , CString #stoptype {- enum { GIT_INDEXCAP_IGNORE_CASE = 1, GIT_INDEXCAP_NO_FILEMODE = 2, GIT_INDEXCAP_NO_SYMLINKS = 4, GIT_INDEXCAP_FROM_OWNER = ~0u }; -} #num GIT_INDEXCAP_IGNORE_CASE #num GIT_INDEXCAP_NO_FILEMODE #num GIT_INDEXCAP_NO_SYMLINKS #num GIT_INDEXCAP_FROM_OWNER #ccall git_index_open , Ptr (Ptr ) -> CString -> IO (CInt) #ccall git_index_new , Ptr (Ptr ) -> IO (CInt) #ccall git_index_free , Ptr -> IO () #ccall git_index_owner , Ptr -> IO (Ptr ) #ccall git_index_caps , Ptr -> IO (CUInt) #ccall git_index_set_caps , Ptr -> CUInt -> IO (CInt) #ccall git_index_read , Ptr -> IO (CInt) #ccall git_index_write , Ptr -> IO (CInt) #ccall git_index_read_tree , Ptr -> Ptr -> IO (CInt) #ccall git_index_write_tree , Ptr -> Ptr -> IO (CInt) #ccall git_index_write_tree_to , Ptr -> Ptr -> Ptr -> IO (CInt) #ccall git_index_entrycount , Ptr -> IO (CSize) #ccall git_index_clear , Ptr -> IO () #ccall git_index_get_byindex , Ptr -> CSize -> IO (Ptr ) #ccall git_index_get_bypath , Ptr -> CString -> CInt -> IO (Ptr ) #ccall git_index_remove , Ptr -> CString -> CInt -> IO (CInt) #ccall git_index_remove_directory , Ptr -> CString -> CInt -> IO (CInt) #ccall git_index_add , Ptr -> Ptr -> IO (CInt) #ccall git_index_entry_stage , Ptr -> IO (CInt) #ccall git_index_add_bypath , Ptr -> CString -> IO (CInt) #ccall git_index_remove_bypath , Ptr -> CString -> IO (CInt) #ccall git_index_find , Ptr CSize -> Ptr -> CString -> IO (CInt) #ccall git_index_conflict_add , Ptr -> Ptr -> Ptr -> Ptr -> IO (CInt) #ccall git_index_conflict_get , Ptr (Ptr ) -> Ptr (Ptr ) -> Ptr (Ptr ) -> Ptr -> CString -> IO (CInt) #ccall git_index_conflict_remove , Ptr -> CString -> IO (CInt) #ccall git_index_conflict_cleanup , Ptr -> IO () #ccall git_index_has_conflicts , Ptr -> IO (CInt) #ccall git_index_reuc_entrycount , Ptr -> IO (CUInt) #ccall git_index_reuc_find , Ptr CSize -> Ptr -> CString -> IO (CInt) #ccall git_index_reuc_get_bypath , Ptr -> CString -> IO (Ptr ) #ccall git_index_reuc_get_byindex , Ptr -> CSize -> IO (Ptr ) #ccall git_index_reuc_add , Ptr -> CString -> CInt -> Ptr -> CInt -> Ptr -> CInt -> Ptr -> IO (CInt) #ccall git_index_reuc_remove , Ptr -> CSize -> IO (CInt) #ccall git_index_reuc_clear , Ptr -> IO ()