packages feed

hlibgit2 0.2.1 → 0.3.0

raw patch · 40 files changed

+685/−306 lines, 40 files

Files

hlibgit2.cabal view
@@ -1,5 +1,5 @@ Name:                hlibgit2-Version:             0.2.1+Version:             0.3.0 Synopsis:            Low-level bindings to libgit2. Description:         Bindings to libgit2 v0.16.0-471-g5b9fac3 License-file:        LICENSE@@ -23,7 +23,7 @@   location: git://github.com/jwiegley/hlibgit2.git   tag: hlibgit2-0.1-17-gd7b22d6 -test-suite smoke+Test-suite smoke   default-language: Haskell98   type: exitcode-stdio-1.0   main-is: Main.hs@@ -33,7 +33,7 @@     hlibgit2,     process -library+Library   default-language: Haskell98   default-extensions:     ForeignFunctionInterface@@ -42,30 +42,44 @@     bindings-DSL >= 1.0.11   exposed-modules:     Bindings.Libgit2-    Bindings.Libgit2.Repository+    Bindings.Libgit2.Attr+    Bindings.Libgit2.Blob+    Bindings.Libgit2.Branch+    Bindings.Libgit2.Commit+    Bindings.Libgit2.Common     Bindings.Libgit2.Config-    Bindings.Libgit2.Types-    Bindings.Libgit2.Revwalk-    Bindings.Libgit2.OdbBackend-    Bindings.Libgit2.Tag+    Bindings.Libgit2.Diff+    Bindings.Libgit2.Errors+    Bindings.Libgit2.Index+    Bindings.Libgit2.Indexer+    Bindings.Libgit2.Merge     Bindings.Libgit2.Net+    Bindings.Libgit2.Notes+    Bindings.Libgit2.Object+    Bindings.Libgit2.Odb+    Bindings.Libgit2.OdbBackend+    Bindings.Libgit2.Oid+    Bindings.Libgit2.Reflog     Bindings.Libgit2.Refs     Bindings.Libgit2.Refspec-    Bindings.Libgit2.Reflog-    Bindings.Libgit2.Commit-    Bindings.Libgit2.Index+    Bindings.Libgit2.Remote+    Bindings.Libgit2.Repository+    Bindings.Libgit2.Revwalk     Bindings.Libgit2.Signature-    Bindings.Libgit2.Blob-    Bindings.Libgit2.Errors-    Bindings.Libgit2.Oid+    Bindings.Libgit2.Status+    Bindings.Libgit2.Submodule+    Bindings.Libgit2.Tag+    Bindings.Libgit2.Threads     Bindings.Libgit2.Tree-    Bindings.Libgit2.Odb-    Bindings.Libgit2.Common-    Bindings.Libgit2.Object+    Bindings.Libgit2.Types+    Bindings.Libgit2.Version+    Bindings.Libgit2.Windows   c-sources:-    src/Bindings/Libgit2/Tag.hsc.helper.c-    src/Bindings/Libgit2/Commit.hsc.helper.c+    src/Bindings/Libgit2/Attr.hsc.helper.c     src/Bindings/Libgit2/Blob.hsc.helper.c+    src/Bindings/Libgit2/Commit.hsc.helper.c+    src/Bindings/Libgit2/Common.hsc.helper.c+    src/Bindings/Libgit2/Tag.hsc.helper.c     src/Bindings/Libgit2/Tree.hsc.helper.c    hs-source-dirs: src
libgit2/include/git2/branch.h view
@@ -8,6 +8,7 @@ #define INCLUDE_git_branch_h__  #include "common.h"+#include "oid.h" #include "types.h"  /**
+ src/Bindings/Libgit2/Attr.hsc view
@@ -0,0 +1,30 @@+#include <bindings.dsl.h>+#include <git2.h>+#include <git2/attr.h>+module Bindings.Libgit2.Attr where+#strict_import++import Bindings.Libgit2.Common+import Bindings.Libgit2.Types++{- extern __attribute__((visibility("default"))) const char * git_attr__true; -}+{- extern __attribute__((visibility("default"))) const char * git_attr__false; -}+{- extern __attribute__((visibility("default"))) const char * git_attr__unset; -}++#ccall git_attr_get , Ptr (CString) -> Ptr <git_repository> -> CUInt -> CString -> CString -> IO (CInt)+#ccall git_attr_get_many , Ptr (CString) -> Ptr <git_repository> -> CUInt -> CString -> CLong -> Ptr (CString) -> IO (CInt)+#ccall git_attr_foreach , Ptr <git_repository> -> CUInt -> CString -> Ptr () -> Ptr () -> IO (CInt)+#ccall git_attr_cache_flush , Ptr <git_repository> -> IO ()+#ccall git_attr_add_macro , Ptr <git_repository> -> CString -> CString -> IO (CInt)++{- BEGIN MANUAL ENTRY -}+#cinline GIT_ATTR_TRUE , CString -> CInt+#cinline GIT_ATTR_FALSE , CString -> CInt+#cinline GIT_ATTR_UNSPECIFIED , CString -> CInt+#cinline GIT_ATTR_HAS_VALUE , CString -> CInt++#num GIT_ATTR_CHECK_FILE_THEN_INDEX+#num GIT_ATTR_CHECK_INDEX_THEN_FILE+#num GIT_ATTR_CHECK_INDEX_ONLY+#num GIT_ATTR_CHECK_NO_SYSTEM+{- END MANUAL ENTRY -}
+ src/Bindings/Libgit2/Attr.hsc.helper.c view
@@ -0,0 +1,7 @@+#include <bindings.cmacros.h>+#include <git2/attr.h>++BC_INLINE1(GIT_ATTR_TRUE, const char *, int)+BC_INLINE1(GIT_ATTR_FALSE, const char *, int)+BC_INLINE1(GIT_ATTR_UNSPECIFIED, const char *, int)+BC_INLINE1(GIT_ATTR_HAS_VALUE, const char *, int)
src/Bindings/Libgit2/Blob.hsc view
@@ -1,4 +1,3 @@- #include <bindings.dsl.h> #include <git2.h> module Bindings.Libgit2.Blob where@@ -8,10 +7,11 @@ import Bindings.Libgit2.Types import Bindings.Libgit2.Oid import Bindings.Libgit2.Object-#ccall git_blob_rawcontent , Ptr <git_blob> -> IO (Ptr CChar)-#ccall git_blob_rawsize , Ptr <git_blob> -> IO (CInt)-#ccall git_blob_create_fromfile , Ptr <git_oid> -> Ptr <git_repository> -> CString -> IO (CInt)-#ccall git_blob_create_frombuffer , Ptr <git_oid> -> Ptr <git_repository> -> Ptr CChar -> CSize -> IO (CInt) #cinline git_blob_lookup , Ptr (Ptr <git_blob>) -> Ptr <git_repository> -> Ptr <git_oid> -> IO (CInt) #cinline git_blob_lookup_prefix , Ptr (Ptr <git_blob>) -> Ptr <git_repository> -> Ptr <git_oid> -> CUInt -> IO (CInt)-#cinline git_blob_close , Ptr <git_blob> -> IO ()+#cinline git_blob_free , Ptr <git_blob> -> IO ()+#ccall git_blob_rawcontent , Ptr <git_blob> -> IO (Ptr ())+#ccall git_blob_rawsize , Ptr <git_blob> -> IO (CLong)+#ccall git_blob_create_fromfile , Ptr <git_oid> -> Ptr <git_repository> -> CString -> IO (CInt)+#ccall git_blob_create_fromdisk , Ptr <git_oid> -> Ptr <git_repository> -> CString -> IO (CInt)+#ccall git_blob_create_frombuffer , Ptr <git_oid> -> Ptr <git_repository> -> Ptr () -> CLong -> IO (CInt)
src/Bindings/Libgit2/Blob.hsc.helper.c view
@@ -1,7 +1,6 @@- #include <bindings.cmacros.h> #include <git2.h> -BC_INLINE3(git_blob_lookup, git_blob **, git_repository *, const git_oid *,int)-BC_INLINE4(git_blob_lookup_prefix, git_blob **, git_repository *, const git_oid *, unsigned int ,int)-BC_INLINE1VOID(git_blob_close, git_blob *)+BC_INLINE3(git_blob_lookup, git_blob * *, git_repository *, const git_oid *, int)+BC_INLINE4(git_blob_lookup_prefix, git_blob * *, git_repository *, const git_oid *, unsigned int, int)+BC_INLINE1VOID(git_blob_free, git_blob *)
+ src/Bindings/Libgit2/Branch.hsc view
@@ -0,0 +1,12 @@+#include <bindings.dsl.h>+#include <git2.h>+module Bindings.Libgit2.Branch where+#strict_import++import Bindings.Libgit2.Common+import Bindings.Libgit2.Oid+import Bindings.Libgit2.Types+#ccall git_branch_create , Ptr <git_oid> -> Ptr <git_repository> -> CString -> Ptr <git_object> -> CInt -> IO (CInt)+#ccall git_branch_delete , Ptr <git_repository> -> CString -> <git_branch_t> -> IO (CInt)+#ccall git_branch_list , Ptr <git_strarray> -> Ptr <git_repository> -> CUInt -> IO (CInt)+#ccall git_branch_move , Ptr <git_repository> -> CString -> CString -> CInt -> IO (CInt)
src/Bindings/Libgit2/Commit.hsc view
@@ -1,4 +1,3 @@- #include <bindings.dsl.h> #include <git2.h> module Bindings.Libgit2.Commit where@@ -8,10 +7,13 @@ import Bindings.Libgit2.Types import Bindings.Libgit2.Oid import Bindings.Libgit2.Object+#cinline git_commit_lookup , Ptr (Ptr <git_commit>) -> Ptr <git_repository> -> Ptr <git_oid> -> IO (CInt)+#cinline git_commit_lookup_prefix , Ptr (Ptr <git_commit>) -> Ptr <git_repository> -> Ptr <git_oid> -> CUInt -> IO (CInt)+#cinline git_commit_free , Ptr <git_commit> -> IO () #ccall git_commit_id , Ptr <git_commit> -> IO (Ptr <git_oid>)-#ccall git_commit_message_short , Ptr <git_commit> -> IO (CString)+#ccall git_commit_message_encoding , Ptr <git_commit> -> IO (CString) #ccall git_commit_message , Ptr <git_commit> -> IO (CString)-#ccall git_commit_time , Ptr <git_commit> -> IO (CTime)+#ccall git_commit_time , Ptr <git_commit> -> IO (CLong) #ccall git_commit_time_offset , Ptr <git_commit> -> IO (CInt) #ccall git_commit_committer , Ptr <git_commit> -> IO (Ptr <git_signature>) #ccall git_commit_author , Ptr <git_commit> -> IO (Ptr <git_signature>)@@ -20,7 +22,5 @@ #ccall git_commit_parentcount , Ptr <git_commit> -> IO (CUInt) #ccall git_commit_parent , Ptr (Ptr <git_commit>) -> Ptr <git_commit> -> CUInt -> IO (CInt) #ccall git_commit_parent_oid , Ptr <git_commit> -> CUInt -> IO (Ptr <git_oid>)-#ccall git_commit_create , Ptr <git_oid> -> Ptr <git_repository> -> CString -> Ptr <git_signature> -> Ptr <git_signature> -> CString -> Ptr <git_tree> -> CInt -> Ptr (Ptr <git_commit>) -> IO (CInt)-#cinline git_commit_lookup , Ptr (Ptr <git_commit>) -> Ptr <git_repository> -> Ptr <git_oid> -> IO (CInt)-#cinline git_commit_lookup_prefix , Ptr (Ptr <git_commit>) -> Ptr <git_repository> -> Ptr <git_oid> -> CUInt -> IO (CInt)-#cinline git_commit_close , Ptr <git_commit> -> IO ()+#ccall git_commit_create , Ptr <git_oid> -> Ptr <git_repository> -> CString -> Ptr <git_signature> -> Ptr <git_signature> -> CString -> CString -> Ptr <git_tree> -> CInt -> Ptr (Ptr <git_commit>) -> IO (CInt)+{- #ccall git_commit_create_v , Ptr <git_oid> -> Ptr <git_repository> -> CString -> Ptr <git_signature> -> Ptr <git_signature> -> CString -> CString -> Ptr <git_tree> -> CInt -> IO (CInt) -}
src/Bindings/Libgit2/Commit.hsc.helper.c view
@@ -1,7 +1,6 @@- #include <bindings.cmacros.h> #include <git2.h> -BC_INLINE3(git_commit_lookup, git_commit **, git_repository *, const git_oid *,int)-BC_INLINE4(git_commit_lookup_prefix, git_commit **, git_repository *, const git_oid *, unsigned ,int)-BC_INLINE1VOID(git_commit_close, git_commit *)+BC_INLINE3(git_commit_lookup, git_commit * *, git_repository *, const git_oid *, int)+BC_INLINE4(git_commit_lookup_prefix, git_commit * *, git_repository *, const git_oid *, unsigned, int)+BC_INLINE1VOID(git_commit_free, git_commit *)
src/Bindings/Libgit2/Common.hsc view
@@ -1,18 +1,20 @@- #include <bindings.dsl.h> #include <git2.h> module Bindings.Libgit2.Common where #strict_import -#num    GIT_PATH_LIST_SEPARATOR-#num    GIT_PATH_MAX {- typedef struct {-	char **strings;-	size_t count;-} git_strarray; -}+            char * * strings; size_t count;+        } git_strarray; -} #starttype git_strarray-#field    strings , Ptr CString-#field    count , CSize+#field strings , Ptr (CString)+#field count , CLong #stoptype #ccall git_strarray_free , Ptr <git_strarray> -> IO ()+#ccall git_strarray_copy , Ptr <git_strarray> -> Ptr <git_strarray> -> IO (CInt) #ccall git_libgit2_version , Ptr CInt -> Ptr CInt -> Ptr CInt -> IO ()++{- BEGIN MANUAL ENTRY -}+#cinline GIT_PATH_LIST_SEPARATOR , CChar+#num GIT_PATH_MAX+{- END MANUAL ENTRY -}
+ src/Bindings/Libgit2/Common.hsc.helper.c view
@@ -0,0 +1,4 @@+#include <bindings.cmacros.h>+#include <git2.h>++BC_INLINE_(GIT_PATH_LIST_SEPARATOR, char)
src/Bindings/Libgit2/Config.hsc view
@@ -1,4 +1,3 @@- #include <bindings.dsl.h> #include <git2.h> module Bindings.Libgit2.Config where@@ -6,31 +5,58 @@  import Bindings.Libgit2.Common import Bindings.Libgit2.Types--#starttype struct git_config_file-#field cfg, Ptr <git_config>-#field open, FunPtr (Ptr <git_config_file> -> IO CInt)-#field get, FunPtr (Ptr <git_config_file> -> CString -> Ptr CString -> IO CInt)-#field set, FunPtr (Ptr <git_config_file> -> CString -> CString -> IO CInt)-#field foreach, FunPtr (Ptr <git_config_file> -> FunPtr (CString -> CString -> Ptr () -> CInt) -> Ptr () -> IO CInt)-#field free, FunPtr (Ptr <git_config_file> -> IO ())+{- typedef enum {+            GIT_CVAR_FALSE = 0,+            GIT_CVAR_TRUE = 1,+            GIT_CVAR_INT32,+            GIT_CVAR_STRING+        } git_cvar_t; -}+#integral_t git_cvar_t+#num GIT_CVAR_FALSE+#num GIT_CVAR_TRUE+#num GIT_CVAR_INT32+#num GIT_CVAR_STRING+{- typedef struct {+            git_cvar_t cvar_type; const char * str_match; int map_value;+        } git_cvar_map; -}+#starttype git_cvar_map+#field cvar_type , <git_cvar_t>+#field str_match , CString+#field map_value , CInt #stoptype--#ccall git_config_find_global , CString -> IO (CInt)+#ccall git_config_find_global , CString -> CLong -> IO (CInt)+#ccall git_config_find_system , CString -> CLong -> IO (CInt) #ccall git_config_open_global , Ptr (Ptr <git_config>) -> IO (CInt)-#ccall git_config_file__ondisk , Ptr (Ptr <git_config_file>) -> CString -> IO (CInt)+#ccall git_config_file__ondisk , Ptr (Ptr ()) -> CString -> IO (CInt) #ccall git_config_new , Ptr (Ptr <git_config>) -> IO (CInt) #ccall git_config_add_file , Ptr <git_config> -> Ptr <git_config_file> -> CInt -> IO (CInt) #ccall git_config_add_file_ondisk , Ptr <git_config> -> CString -> CInt -> IO (CInt) #ccall git_config_open_ondisk , Ptr (Ptr <git_config>) -> CString -> IO (CInt) #ccall git_config_free , Ptr <git_config> -> IO ()-#ccall git_config_get_int , Ptr <git_config> -> CString -> Ptr CInt -> IO (CInt)-#ccall git_config_get_long , Ptr <git_config> -> CString -> CLong -> IO (CInt)-#ccall git_config_get_bool , Ptr <git_config> -> CString -> Ptr CInt -> IO (CInt)-#ccall git_config_get_string , Ptr <git_config> -> CString -> Ptr CString -> IO (CInt)-#ccall git_config_set_int , Ptr <git_config> -> CString -> CInt -> IO (CInt)-#ccall git_config_set_long , Ptr <git_config> -> CString -> CLong -> IO (CInt)+#ccall git_config_get_int32 , Ptr CInt -> Ptr <git_config> -> CString -> IO (CInt)+#ccall git_config_get_int64 , Ptr CLong -> Ptr <git_config> -> CString -> IO (CInt)+#ccall git_config_get_bool , Ptr CInt -> Ptr <git_config> -> CString -> IO (CInt)+#ccall git_config_get_string , Ptr (CString) -> Ptr <git_config> -> CString -> IO (CInt)+#ccall git_config_get_multivar , Ptr <git_config> -> CString -> CString -> Ptr () -> Ptr () -> IO (CInt)+#ccall git_config_set_int32 , Ptr <git_config> -> CString -> CInt -> IO (CInt)+#ccall git_config_set_int64 , Ptr <git_config> -> CString -> CLong -> IO (CInt) #ccall git_config_set_bool , Ptr <git_config> -> CString -> CInt -> IO (CInt) #ccall git_config_set_string , Ptr <git_config> -> CString -> CString -> IO (CInt)+#ccall git_config_set_multivar , Ptr <git_config> -> CString -> CString -> CString -> IO (CInt) #ccall git_config_delete , Ptr <git_config> -> CString -> IO (CInt)-#ccall git_config_foreach , Ptr <git_config> -> CInt -> IO (CInt)+#ccall git_config_foreach , Ptr <git_config> -> Ptr () -> Ptr () -> IO (CInt)+#ccall git_config_get_mapped , Ptr CInt -> Ptr <git_config> -> CString -> Ptr <git_cvar_map> -> CLong -> IO (CInt)++{- BEGIN MANUAL ENTRY -}+#starttype struct git_config_file+#field cfg, Ptr <git_config>+#field open, FunPtr (Ptr <git_config_file> -> IO CInt)+#field get, FunPtr (Ptr <git_config_file> -> CString -> Ptr CString -> IO CInt)+#field get_multivar, FunPtr (Ptr <git_config_file> -> CString -> CString -> FunPtr (CString -> Ptr () -> CInt) -> Ptr () -> IO CInt)+#field set, FunPtr (Ptr <git_config_file> -> CString -> CString -> IO CInt)+#field set_multivar, FunPtr (Ptr <git_config_file> -> CString -> CString -> CString -> IO CInt)+#field del, FunPtr (Ptr <git_config_file> -> CString -> IO CInt)+#field foreach, FunPtr (Ptr <git_config_file> -> FunPtr (CString -> CString -> Ptr () -> CInt) -> Ptr () -> IO CInt)+#field free, FunPtr (Ptr <git_config_file> -> IO ())+#stoptype+{- END MANUAL ENTRY -}
+ src/Bindings/Libgit2/Diff.hsc view
@@ -0,0 +1,108 @@+#include <bindings.dsl.h>+#include <git2.h>+module Bindings.Libgit2.Diff where+#strict_import++import Bindings.Libgit2.Common+import Bindings.Libgit2.Types+import Bindings.Libgit2.Oid+import Bindings.Libgit2.Tree+import Bindings.Libgit2.Refs+{- typedef struct {+            uint32_t flags;+            uint16_t context_lines;+            uint16_t interhunk_lines;+            char * old_prefix;+            char * new_prefix;+            git_strarray pathspec;+        } git_diff_options; -}+#starttype git_diff_options+#field flags , CUInt+#field context_lines , CUShort+#field interhunk_lines , CUShort+#field old_prefix , CString+#field new_prefix , CString+#field pathspec , <git_strarray>+#stoptype+{- typedef struct git_diff_list git_diff_list; -}+#opaque_t git_diff_list+{- typedef enum {+            GIT_DELTA_UNMODIFIED = 0,+            GIT_DELTA_ADDED = 1,+            GIT_DELTA_DELETED = 2,+            GIT_DELTA_MODIFIED = 3,+            GIT_DELTA_RENAMED = 4,+            GIT_DELTA_COPIED = 5,+            GIT_DELTA_IGNORED = 6,+            GIT_DELTA_UNTRACKED = 7+        } git_delta_t; -}+#integral_t git_delta_t+#num GIT_DELTA_UNMODIFIED+#num GIT_DELTA_ADDED+#num GIT_DELTA_DELETED+#num GIT_DELTA_MODIFIED+#num GIT_DELTA_RENAMED+#num GIT_DELTA_COPIED+#num GIT_DELTA_IGNORED+#num GIT_DELTA_UNTRACKED+{- typedef struct {+            git_oid oid;+            char * path;+            uint16_t mode;+            git_off_t size;+            unsigned int flags;+        } git_diff_file; -}+#starttype git_diff_file+#field oid , <git_oid>+#field path , CString+#field mode , CUShort+#field size , CLong+#field flags , CUInt+#stoptype+{- typedef struct {+            git_diff_file old_file;+            git_diff_file new_file;+            git_delta_t status;+            unsigned int similarity;+            int binary;+        } git_diff_delta; -}+#starttype git_diff_delta+#field old_file , <git_diff_file>+#field new_file , <git_diff_file>+#field status , <git_delta_t>+#field similarity , CUInt+#field binary , CInt+#stoptype+{- typedef int (* git_diff_file_fn)(void * cb_data,+                                 git_diff_delta * delta,+                                 float progress); -}+{- typedef struct {+            int old_start; int old_lines; int new_start; int new_lines;+        } git_diff_range; -}+#starttype git_diff_range+#field old_start , CInt+#field old_lines , CInt+#field new_start , CInt+#field new_lines , CInt+#stoptype+{- typedef int (* git_diff_hunk_fn)(void * cb_data,+                                 git_diff_delta * delta,+                                 git_diff_range * range,+                                 const char * header,+                                 size_t header_len); -}+{- typedef int (* git_diff_data_fn)(void * cb_data,+                                 git_diff_delta * delta,+                                 git_diff_range * range,+                                 char line_origin,+                                 const char * content,+                                 size_t content_len); -}+#ccall git_diff_list_free , Ptr <git_diff_list> -> IO ()+#ccall git_diff_tree_to_tree , Ptr <git_repository> -> Ptr <git_diff_options> -> Ptr <git_tree> -> Ptr <git_tree> -> Ptr (Ptr <git_diff_list>) -> IO (CInt)+#ccall git_diff_index_to_tree , Ptr <git_repository> -> Ptr <git_diff_options> -> Ptr <git_tree> -> Ptr (Ptr <git_diff_list>) -> IO (CInt)+#ccall git_diff_workdir_to_index , Ptr <git_repository> -> Ptr <git_diff_options> -> Ptr (Ptr <git_diff_list>) -> IO (CInt)+#ccall git_diff_workdir_to_tree , Ptr <git_repository> -> Ptr <git_diff_options> -> Ptr <git_tree> -> Ptr (Ptr <git_diff_list>) -> IO (CInt)+#ccall git_diff_merge , Ptr <git_diff_list> -> Ptr <git_diff_list> -> IO (CInt)+#ccall git_diff_foreach , Ptr <git_diff_list> -> Ptr () -> CInt -> CInt -> CInt -> IO (CInt)+#ccall git_diff_print_compact , Ptr <git_diff_list> -> Ptr () -> CInt -> IO (CInt)+#ccall git_diff_print_patch , Ptr <git_diff_list> -> Ptr () -> CInt -> IO (CInt)+#ccall git_diff_blobs , Ptr <git_blob> -> Ptr <git_blob> -> Ptr <git_diff_options> -> Ptr () -> CInt -> CInt -> CInt -> IO (CInt)
src/Bindings/Libgit2/Errors.hsc view
@@ -1,51 +1,33 @@- #include <bindings.dsl.h> #include <git2.h> module Bindings.Libgit2.Errors where #strict_import  import Bindings.Libgit2.Common-{- typedef enum {-	GIT_OK = 0,-	GIT_ERROR = -1,-	GIT_ENOTFOUND = -3,-	GIT_EEXISTS = -4,-	GIT_EAMBIGUOUS = -5,-	GIT_EBUFS = -6,--	GIT_PASSTHROUGH = -30,-	GIT_REVWALKOVER = -31,-}; -}-#num GIT_OK-#num GIT_ERROR-#num GIT_ENOTFOUND-#num GIT_EEXISTS-#num GIT_EAMBIGUOUS-#num GIT_EBUFS--#num GIT_PASSTHROUGH-#num GIT_REVWALKOVER-{- typedef struct git_error {-	char *message;-	int klass;-} git_error; -}+{- typedef struct {+            char * message; int klass;+        } git_error; -}+#starttype git_error+#field message , CString+#field klass , CInt+#stoptype {- typedef enum {-	GITERR_NOMEMORY,-	GITERR_OS,-	GITERR_INVALID,-	GITERR_REFERENCE,-	GITERR_ZLIB,-	GITERR_REPOSITORY,-	GITERR_CONFIG,-	GITERR_REGEX,-	GITERR_ODB,-	GITERR_INDEX,-	GITERR_OBJECT,-	GITERR_NET,-	GITERR_TAG,-	GITERR_TREE,-	GITERR_INDEXER,-} git_error_t; -}+            GITERR_NOMEMORY,+            GITERR_OS,+            GITERR_INVALID,+            GITERR_REFERENCE,+            GITERR_ZLIB,+            GITERR_REPOSITORY,+            GITERR_CONFIG,+            GITERR_REGEX,+            GITERR_ODB,+            GITERR_INDEX,+            GITERR_OBJECT,+            GITERR_NET,+            GITERR_TAG,+            GITERR_TREE,+            GITERR_INDEXER+        } git_error_t; -} #integral_t git_error_t #num GITERR_NOMEMORY #num GITERR_OS@@ -62,6 +44,5 @@ #num GITERR_TAG #num GITERR_TREE #num GITERR_INDEXER-#ccall git_lasterror , IO (CString)-#ccall git_strerror , CInt -> IO (CString)-#ccall git_clearerror , IO ()+#ccall giterr_last , IO (Ptr <git_error>)+#ccall giterr_clear , IO ()
src/Bindings/Libgit2/Index.hsc view
@@ -1,4 +1,3 @@- #include <bindings.dsl.h> #include <git2.h> module Bindings.Libgit2.Index where@@ -7,75 +6,48 @@ import Bindings.Libgit2.Common import Bindings.Libgit2.Types import Bindings.Libgit2.Oid-#num    GIT_IDXENTRY_NAMEMASK-#num    GIT_IDXENTRY_STAGEMASK-#num    GIT_IDXENTRY_EXTENDED-#num    GIT_IDXENTRY_VALID-#num    GIT_IDXENTRY_STAGESHIFT-#num    GIT_IDXENTRY_UPDATE-#num    GIT_IDXENTRY_REMOVE-#num    GIT_IDXENTRY_UPTODATE-#num    GIT_IDXENTRY_ADDED-#num    GIT_IDXENTRY_HASHED-#num    GIT_IDXENTRY_UNHASHED-#num    GIT_IDXENTRY_WT_REMOVE-#num    GIT_IDXENTRY_CONFLICTED-#num    GIT_IDXENTRY_UNPACKED-#num    GIT_IDXENTRY_NEW_SKIP_WORKTREE-#num    GIT_IDXENTRY_INTENT_TO_ADD-#num    GIT_IDXENTRY_SKIP_WORKTREE-#num    GIT_IDXENTRY_EXTENDED2-#num    GIT_IDXENTRY_EXTENDED_FLAGS {- typedef struct {-	git_time_t seconds;-	-	unsigned int nanoseconds;-} git_index_time; -}+            git_time_t seconds; unsigned int nanoseconds;+        } git_index_time; -} #starttype git_index_time-#field    seconds , CTime-#field    nanoseconds , CUInt+#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;--	const char *path;-} 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 , <git_index_time>-#field    mtime , <git_index_time>-#field    dev , CUInt-#field    ino , CUInt-#field    mode , CUInt-#field    uid , CUInt-#field    gid , CUInt-#field    file_size , <git_off_t>-#field    oid , <git_oid>-#field    flags , CUShort-#field    flags_extended , CUShort-#field    path , CString+#field ctime , <git_index_time>+#field mtime , <git_index_time>+#field dev , CUInt+#field ino , CUInt+#field mode , CUInt+#field uid , CUInt+#field gid , CUInt+#field file_size , CLong+#field oid , <git_oid>+#field flags , CUShort+#field flags_extended , CUShort+#field path , CString #stoptype {- typedef struct git_index_entry_unmerged {-	unsigned int mode[3];-	git_oid oid[3];-	const char *path;-} git_index_entry_unmerged; -}+            unsigned int mode[3]; git_oid oid[3]; char * path;+        } git_index_entry_unmerged; -} #starttype git_index_entry_unmerged-#array_field    mode , CUInt-#array_field    oid , <git_oid>-#field    path , CString+#array_field mode , CUInt+#array_field oid , <git_oid>+#field path , CString #stoptype #ccall git_index_open , Ptr (Ptr <git_index>) -> CString -> IO (CInt) #ccall git_index_clear , Ptr <git_index> -> IO ()@@ -95,3 +67,4 @@ #ccall git_index_get_unmerged_bypath , Ptr <git_index> -> CString -> IO (Ptr <git_index_entry_unmerged>) #ccall git_index_get_unmerged_byindex , Ptr <git_index> -> CUInt -> IO (Ptr <git_index_entry_unmerged>) #ccall git_index_entry_stage , Ptr <git_index_entry> -> IO (CInt)+#ccall git_index_read_tree , Ptr <git_index> -> Ptr <git_tree> -> IO (CInt)
+ src/Bindings/Libgit2/Indexer.hsc view
@@ -0,0 +1,28 @@+#include <bindings.dsl.h>+#include <git2.h>+module Bindings.Libgit2.Indexer where+#strict_import++import Bindings.Libgit2.Common+import Bindings.Libgit2.Oid+{- typedef struct git_indexer_stats {+            unsigned int total; unsigned int processed;+        } git_indexer_stats; -}+#starttype git_indexer_stats+#field total , CUInt+#field processed , CUInt+#stoptype+{- typedef struct git_indexer git_indexer; -}+#opaque_t git_indexer+{- typedef struct git_indexer_stream git_indexer_stream; -}+#opaque_t git_indexer_stream+#ccall git_indexer_stream_new , Ptr (Ptr <git_indexer_stream>) -> CString -> IO (CInt)+#ccall git_indexer_stream_add , Ptr <git_indexer_stream> -> Ptr () -> CLong -> Ptr <git_indexer_stats> -> IO (CInt)+#ccall git_indexer_stream_finalize , Ptr <git_indexer_stream> -> Ptr <git_indexer_stats> -> IO (CInt)+#ccall git_indexer_stream_hash , Ptr <git_indexer_stream> -> IO (Ptr <git_oid>)+#ccall git_indexer_stream_free , Ptr <git_indexer_stream> -> IO ()+#ccall git_indexer_new , Ptr (Ptr <git_indexer>) -> CString -> IO (CInt)+#ccall git_indexer_run , Ptr <git_indexer> -> Ptr <git_indexer_stats> -> IO (CInt)+#ccall git_indexer_write , Ptr <git_indexer> -> IO (CInt)+#ccall git_indexer_hash , Ptr <git_indexer> -> IO (Ptr <git_oid>)+#ccall git_indexer_free , Ptr <git_indexer> -> IO ()
+ src/Bindings/Libgit2/Merge.hsc view
@@ -0,0 +1,9 @@+#include <bindings.dsl.h>+#include <git2.h>+module Bindings.Libgit2.Merge where+#strict_import++import Bindings.Libgit2.Common+import Bindings.Libgit2.Types+import Bindings.Libgit2.Oid+#ccall git_merge_base , Ptr <git_oid> -> Ptr <git_repository> -> Ptr <git_oid> -> Ptr <git_oid> -> IO (CInt)
src/Bindings/Libgit2/Net.hsc view
@@ -1,4 +1,3 @@- #include <bindings.dsl.h> #include <git2.h> module Bindings.Libgit2.Net where@@ -7,6 +6,4 @@ import Bindings.Libgit2.Common import Bindings.Libgit2.Oid import Bindings.Libgit2.Types-#num    GIT_DEFAULT_PORT-#num    GIT_DIR_FETCH-#num    GIT_DIR_PUSH+{- typedef int (* git_headlist_cb)(git_remote_head *, void *); -}
+ src/Bindings/Libgit2/Notes.hsc view
@@ -0,0 +1,22 @@+#include <bindings.dsl.h>+#include <git2.h>+module Bindings.Libgit2.Notes where+#strict_import++import Bindings.Libgit2.Oid+import Bindings.Libgit2.Types+#ccall git_note_read , Ptr (Ptr <git_note>) -> Ptr <git_repository> -> CString -> Ptr <git_oid> -> IO (CInt)+#ccall git_note_message , Ptr <git_note> -> IO (CString)+#ccall git_note_oid , Ptr <git_note> -> IO (Ptr <git_oid>)+#ccall git_note_create , Ptr <git_oid> -> Ptr <git_repository> -> Ptr <git_signature> -> Ptr <git_signature> -> CString -> Ptr <git_oid> -> CString -> IO (CInt)+#ccall git_note_remove , Ptr <git_repository> -> CString -> Ptr <git_signature> -> Ptr <git_signature> -> Ptr <git_oid> -> IO (CInt)+#ccall git_note_free , Ptr <git_note> -> IO ()+#ccall git_note_default_ref , Ptr (CString) -> Ptr <git_repository> -> IO (CInt)+{- typedef struct {+            git_oid blob_oid; git_oid annotated_object_oid;+        } git_note_data; -}+#starttype git_note_data+#field blob_oid , <git_oid>+#field annotated_object_oid , <git_oid>+#stoptype+#ccall git_note_foreach , Ptr <git_repository> -> CString -> Ptr () -> Ptr () -> IO (CInt)
src/Bindings/Libgit2/Object.hsc view
@@ -1,4 +1,3 @@- #include <bindings.dsl.h> #include <git2.h> module Bindings.Libgit2.Object where@@ -12,8 +11,8 @@ #ccall git_object_id , Ptr <git_object> -> IO (Ptr <git_oid>) #ccall git_object_type , Ptr <git_object> -> IO (<git_otype>) #ccall git_object_owner , Ptr <git_object> -> IO (Ptr <git_repository>)-#ccall git_object_close , Ptr <git_object> -> IO ()+#ccall git_object_free , Ptr <git_object> -> IO () #ccall git_object_type2string , <git_otype> -> IO (CString) #ccall git_object_string2type , CString -> IO (<git_otype>) #ccall git_object_typeisloose , <git_otype> -> IO (CInt)-#ccall git_object__size , <git_otype> -> IO (CSize)+#ccall git_object__size , <git_otype> -> IO (CLong)
src/Bindings/Libgit2/Odb.hsc view
@@ -1,4 +1,3 @@- #include <bindings.dsl.h> #include <git2.h> module Bindings.Libgit2.Odb where@@ -12,18 +11,18 @@ #ccall git_odb_open , Ptr (Ptr <git_odb>) -> CString -> IO (CInt) #ccall git_odb_add_backend , Ptr <git_odb> -> Ptr <git_odb_backend> -> CInt -> IO (CInt) #ccall git_odb_add_alternate , Ptr <git_odb> -> Ptr <git_odb_backend> -> CInt -> IO (CInt)-#ccall git_odb_close , Ptr <git_odb> -> IO ()+#ccall git_odb_free , Ptr <git_odb> -> IO () #ccall git_odb_read , Ptr (Ptr <git_odb_object>) -> Ptr <git_odb> -> Ptr <git_oid> -> IO (CInt) #ccall git_odb_read_prefix , Ptr (Ptr <git_odb_object>) -> Ptr <git_odb> -> Ptr <git_oid> -> CUInt -> IO (CInt)-#ccall git_odb_read_header , Ptr CSize -> Ptr <git_otype> -> Ptr <git_odb> -> Ptr <git_oid> -> IO (CInt)+#ccall git_odb_read_header , Ptr CLong -> Ptr <git_otype> -> Ptr <git_odb> -> Ptr <git_oid> -> IO (CInt) #ccall git_odb_exists , Ptr <git_odb> -> Ptr <git_oid> -> IO (CInt)-#ccall git_odb_write , Ptr <git_oid> -> Ptr <git_odb> -> Ptr CChar -> CSize -> <git_otype> -> IO (CInt)-#ccall git_odb_open_wstream , Ptr (Ptr <git_odb_stream>) -> Ptr <git_odb> -> CSize -> <git_otype> -> IO (CInt)+#ccall git_odb_write , Ptr <git_oid> -> Ptr <git_odb> -> Ptr () -> CLong -> <git_otype> -> IO (CInt)+#ccall git_odb_open_wstream , Ptr (Ptr <git_odb_stream>) -> Ptr <git_odb> -> CLong -> <git_otype> -> IO (CInt) #ccall git_odb_open_rstream , Ptr (Ptr <git_odb_stream>) -> Ptr <git_odb> -> Ptr <git_oid> -> IO (CInt)-#ccall git_odb_hash , Ptr <git_oid> -> Ptr CChar -> CSize -> <git_otype> -> IO (CInt)+#ccall git_odb_hash , Ptr <git_oid> -> Ptr () -> CLong -> <git_otype> -> IO (CInt) #ccall git_odb_hashfile , Ptr <git_oid> -> CString -> <git_otype> -> IO (CInt)-#ccall git_odb_object_close , Ptr <git_odb_object> -> IO ()+#ccall git_odb_object_free , Ptr <git_odb_object> -> IO () #ccall git_odb_object_id , Ptr <git_odb_object> -> IO (Ptr <git_oid>)-#ccall git_odb_object_data , Ptr <git_odb_object> -> IO (Ptr CChar)-#ccall git_odb_object_size , Ptr <git_odb_object> -> IO (CSize)+#ccall git_odb_object_data , Ptr <git_odb_object> -> IO (Ptr ())+#ccall git_odb_object_size , Ptr <git_odb_object> -> IO (CLong) #ccall git_odb_object_type , Ptr <git_odb_object> -> IO (<git_otype>)
src/Bindings/Libgit2/OdbBackend.hsc view
@@ -1,4 +1,3 @@- #include <bindings.dsl.h> #include <git2.h> module Bindings.Libgit2.OdbBackend where@@ -7,13 +6,5 @@ import Bindings.Libgit2.Common import Bindings.Libgit2.Types import Bindings.Libgit2.Oid-{- typedef enum {-	GIT_STREAM_RDONLY = (1 << 1),-	GIT_STREAM_WRONLY = (1 << 2),-	GIT_STREAM_RW = (GIT_STREAM_RDONLY | GIT_STREAM_WRONLY),-} git_odb_streammode; -}-#num    GIT_STREAM_RDONLY-#num    GIT_STREAM_WRONLY-#num    GIT_STREAM_RW #ccall git_odb_backend_pack , Ptr (Ptr <git_odb_backend>) -> CString -> IO (CInt)-#ccall git_odb_backend_loose , Ptr (Ptr <git_odb_backend>) -> CString -> IO (CInt)+#ccall git_odb_backend_loose , Ptr (Ptr <git_odb_backend>) -> CString -> CInt -> CInt -> IO (CInt)
src/Bindings/Libgit2/Oid.hsc view
@@ -1,4 +1,3 @@- #include <bindings.dsl.h> #include <git2.h> module Bindings.Libgit2.Oid where@@ -6,24 +5,29 @@  import Bindings.Libgit2.Common import Bindings.Libgit2.Types-#num    GIT_OID_RAWSZ-#num    GIT_OID_HEXSZ-#num    GIT_OID_MINPREFIXLEN-#opaque_t git_oid_shorten+#num GIT_OID_RAWSZ+#num GIT_OID_HEXSZ+#num GIT_OID_MINPREFIXLEN {- typedef struct {-	 	unsigned char id[GIT_OID_RAWSZ]; } git_oid; -} #starttype git_oid #array_field    id , Word8 #stoptype #ccall git_oid_fromstr , Ptr <git_oid> -> CString -> IO (CInt)-#ccall git_oid_fromstrn , Ptr <git_oid> -> CString -> CSize -> IO (CInt)-#ccall git_oid_fromraw , Ptr <git_oid> -> Ptr Word8 -> IO ()+#ccall git_oid_fromstrn , Ptr <git_oid> -> CString -> CLong -> IO (CInt)+#ccall git_oid_fromraw , Ptr <git_oid> -> Ptr CUChar -> IO () #ccall git_oid_fmt , CString -> Ptr <git_oid> -> IO () #ccall git_oid_pathfmt , CString -> Ptr <git_oid> -> IO () #ccall git_oid_allocfmt , Ptr <git_oid> -> IO (CString)-#ccall git_oid_to_string , CString -> CSize -> Ptr <git_oid> -> IO (CString)+#ccall git_oid_tostr , CString -> CLong -> Ptr <git_oid> -> IO (CString) #ccall git_oid_cpy , Ptr <git_oid> -> Ptr <git_oid> -> IO () #ccall git_oid_cmp , Ptr <git_oid> -> Ptr <git_oid> -> IO (CInt) #ccall git_oid_ncmp , Ptr <git_oid> -> Ptr <git_oid> -> CUInt -> IO (CInt)+#ccall git_oid_streq , Ptr <git_oid> -> CString -> IO (CInt)+#ccall git_oid_iszero , Ptr <git_oid> -> IO (CInt)+{- typedef struct git_oid_shorten git_oid_shorten; -}+#opaque_t git_oid_shorten+#ccall git_oid_shorten_new , CLong -> IO (Ptr <git_oid_shorten>)+#ccall git_oid_shorten_add , Ptr <git_oid_shorten> -> CString -> IO (CInt)+#ccall git_oid_shorten_free , Ptr <git_oid_shorten> -> IO ()
src/Bindings/Libgit2/Reflog.hsc view
@@ -1,4 +1,3 @@- #include <bindings.dsl.h> #include <git2.h> module Bindings.Libgit2.Reflog where@@ -9,10 +8,12 @@ import Bindings.Libgit2.Oid #ccall git_reflog_read , Ptr (Ptr <git_reflog>) -> Ptr <git_reference> -> IO (CInt) #ccall git_reflog_write , Ptr <git_reference> -> Ptr <git_oid> -> Ptr <git_signature> -> CString -> IO (CInt)+#ccall git_reflog_rename , Ptr <git_reference> -> CString -> IO (CInt)+#ccall git_reflog_delete , Ptr <git_reference> -> IO (CInt) #ccall git_reflog_entrycount , Ptr <git_reflog> -> IO (CUInt) #ccall git_reflog_entry_byindex , Ptr <git_reflog> -> CUInt -> IO (Ptr <git_reflog_entry>)-#ccall git_reflog_entry_oidold , Ptr <git_reflog_entry> -> IO (CString)-#ccall git_reflog_entry_oidnew , Ptr <git_reflog_entry> -> IO (CString)+#ccall git_reflog_entry_oidold , Ptr <git_reflog_entry> -> IO (Ptr <git_oid>)+#ccall git_reflog_entry_oidnew , Ptr <git_reflog_entry> -> IO (Ptr <git_oid>) #ccall git_reflog_entry_committer , Ptr <git_reflog_entry> -> IO (Ptr <git_signature>) #ccall git_reflog_entry_msg , Ptr <git_reflog_entry> -> IO (CString) #ccall git_reflog_free , Ptr <git_reflog> -> IO ()
src/Bindings/Libgit2/Refs.hsc view
@@ -1,4 +1,3 @@- #include <bindings.dsl.h> #include <git2.h> module Bindings.Libgit2.Refs where@@ -8,6 +7,7 @@ import Bindings.Libgit2.Types import Bindings.Libgit2.Oid #ccall git_reference_lookup , Ptr (Ptr <git_reference>) -> Ptr <git_repository> -> CString -> IO (CInt)+#ccall git_reference_name_to_oid , Ptr <git_oid> -> Ptr <git_repository> -> CString -> IO (CInt) #ccall git_reference_create_symbolic , Ptr (Ptr <git_reference>) -> Ptr <git_repository> -> CString -> CString -> CInt -> IO (CInt) #ccall git_reference_create_oid , Ptr (Ptr <git_reference>) -> Ptr <git_repository> -> CString -> Ptr <git_oid> -> CInt -> IO (CInt) #ccall git_reference_oid , Ptr <git_reference> -> IO (Ptr <git_oid>)@@ -21,5 +21,9 @@ #ccall git_reference_rename , Ptr <git_reference> -> CString -> CInt -> IO (CInt) #ccall git_reference_delete , Ptr <git_reference> -> IO (CInt) #ccall git_reference_packall , Ptr <git_repository> -> IO (CInt)-#ccall git_reference_listall , Ptr <git_strarray> -> Ptr <git_repository> -> CUInt -> IO (CInt)-#ccall git_reference_foreach , Ptr <git_repository> -> CUInt -> CInt -> IO (CInt)+#ccall git_reference_list , Ptr <git_strarray> -> Ptr <git_repository> -> CUInt -> IO (CInt)+#ccall git_reference_foreach , Ptr <git_repository> -> CUInt -> Ptr () -> Ptr () -> IO (CInt)+#ccall git_reference_is_packed , Ptr <git_reference> -> IO (CInt)+#ccall git_reference_reload , Ptr <git_reference> -> IO (CInt)+#ccall git_reference_free , Ptr <git_reference> -> IO ()+#ccall git_reference_cmp , Ptr <git_reference> -> Ptr <git_reference> -> IO (CInt)
src/Bindings/Libgit2/Refspec.hsc view
@@ -1,6 +1,11 @@- #include <bindings.dsl.h> #include <git2.h>- module Bindings.Libgit2.Refspec where #strict_import++import Bindings.Libgit2.Common+import Bindings.Libgit2.Types+#ccall git_refspec_src , Ptr <git_refspec> -> IO (CString)+#ccall git_refspec_dst , Ptr <git_refspec> -> IO (CString)+#ccall git_refspec_src_matches , Ptr <git_refspec> -> CString -> IO (CInt)+#ccall git_refspec_transform , CString -> CLong -> Ptr <git_refspec> -> CString -> IO (CInt)
+ src/Bindings/Libgit2/Remote.hsc view
@@ -0,0 +1,31 @@+#include <bindings.dsl.h>+#include <git2.h>+module Bindings.Libgit2.Remote where+#strict_import++import Bindings.Libgit2.Common+import Bindings.Libgit2.Repository+import Bindings.Libgit2.Refspec+import Bindings.Libgit2.Net+import Bindings.Libgit2.Indexer+import Bindings.Libgit2.Types+#ccall git_remote_new , Ptr (Ptr <git_remote>) -> Ptr <git_repository> -> CString -> CString -> CString -> IO (CInt)+#ccall git_remote_load , Ptr (Ptr <git_remote>) -> Ptr <git_repository> -> CString -> IO (CInt)+#ccall git_remote_save , Ptr <git_remote> -> IO (CInt)+#ccall git_remote_name , Ptr <git_remote> -> IO (CString)+#ccall git_remote_url , Ptr <git_remote> -> IO (CString)+#ccall git_remote_set_fetchspec , Ptr <git_remote> -> CString -> IO (CInt)+#ccall git_remote_fetchspec , Ptr <git_remote> -> IO (Ptr <git_refspec>)+#ccall git_remote_set_pushspec , Ptr <git_remote> -> CString -> IO (CInt)+#ccall git_remote_pushspec , Ptr <git_remote> -> IO (Ptr <git_refspec>)+#ccall git_remote_connect , Ptr <git_remote> -> CInt -> IO (CInt)+#ccall git_remote_ls , Ptr <git_remote> -> CInt -> Ptr () -> IO (CInt)+#ccall git_remote_download , Ptr <git_remote> -> Ptr CLong -> Ptr <git_indexer_stats> -> IO (CInt)+#ccall git_remote_connected , Ptr <git_remote> -> IO (CInt)+#ccall git_remote_disconnect , Ptr <git_remote> -> IO ()+#ccall git_remote_free , Ptr <git_remote> -> IO ()+#ccall git_remote_update_tips , Ptr <git_remote> -> Ptr () -> IO (CInt)+#ccall git_remote_valid_url , CString -> IO (CInt)+#ccall git_remote_supported_url , CString -> IO (CInt)+#ccall git_remote_list , Ptr <git_strarray> -> Ptr <git_repository> -> IO (CInt)+#ccall git_remote_add , Ptr (Ptr <git_remote>) -> Ptr <git_repository> -> CString -> CString -> IO (CInt)
src/Bindings/Libgit2/Repository.hsc view
@@ -1,4 +1,3 @@- #include <bindings.dsl.h> #include <git2.h> module Bindings.Libgit2.Repository where@@ -8,16 +7,21 @@ import Bindings.Libgit2.Types import Bindings.Libgit2.Oid #ccall git_repository_open , Ptr (Ptr <git_repository>) -> CString -> IO (CInt)-#ccall git_repository_open2 , Ptr (Ptr <git_repository>) -> CString -> CString -> CString -> CString -> IO (CInt)-#ccall git_repository_open3 , Ptr (Ptr <git_repository>) -> CString -> Ptr <git_odb> -> CString -> CString -> IO (CInt)-#ccall git_repository_discover , CString -> CSize -> CString -> CInt -> CString -> IO (CInt)-#ccall git_repository_database , Ptr <git_repository> -> IO (Ptr <git_odb>)-#ccall git_repository_index , Ptr (Ptr <git_index>) -> Ptr <git_repository> -> IO (CInt)+#ccall git_repository_discover , CString -> CLong -> CString -> CInt -> CString -> IO (CInt)+#ccall git_repository_open_ext , Ptr (Ptr <git_repository>) -> CString -> CUInt -> CString -> IO (CInt) #ccall git_repository_free , Ptr <git_repository> -> IO () #ccall git_repository_init , Ptr (Ptr <git_repository>) -> CString -> CUInt -> IO (CInt)+#ccall git_repository_head , Ptr (Ptr <git_reference>) -> Ptr <git_repository> -> IO (CInt) #ccall git_repository_head_detached , Ptr <git_repository> -> IO (CInt) #ccall git_repository_head_orphan , Ptr <git_repository> -> IO (CInt) #ccall git_repository_is_empty , Ptr <git_repository> -> IO (CInt) #ccall git_repository_path , Ptr <git_repository> -> IO (CString)+#ccall git_repository_workdir , Ptr <git_repository> -> IO (CString)+#ccall git_repository_set_workdir , Ptr <git_repository> -> CString -> IO (CInt) #ccall git_repository_is_bare , Ptr <git_repository> -> IO (CInt)-#ccall git_repository_config , Ptr (Ptr <git_config>) -> Ptr <git_repository> -> CString -> CString -> IO (CInt)+#ccall git_repository_config , Ptr (Ptr <git_config>) -> Ptr <git_repository> -> IO (CInt)+#ccall git_repository_set_config , Ptr <git_repository> -> Ptr <git_config> -> IO ()+#ccall git_repository_odb , Ptr (Ptr <git_odb>) -> Ptr <git_repository> -> IO (CInt)+#ccall git_repository_set_odb , Ptr <git_repository> -> Ptr <git_odb> -> IO ()+#ccall git_repository_index , Ptr (Ptr <git_index>) -> Ptr <git_repository> -> IO (CInt)+#ccall git_repository_set_index , Ptr <git_repository> -> Ptr <git_index> -> IO ()
src/Bindings/Libgit2/Revwalk.hsc view
@@ -1,4 +1,3 @@- #include <bindings.dsl.h> #include <git2.h> module Bindings.Libgit2.Revwalk where@@ -7,14 +6,16 @@ import Bindings.Libgit2.Common import Bindings.Libgit2.Types import Bindings.Libgit2.Oid-#num    GIT_SORT_NONE-#num    GIT_SORT_TOPOLOGICAL-#num    GIT_SORT_TIME-#num    GIT_SORT_REVERSE #ccall git_revwalk_new , Ptr (Ptr <git_revwalk>) -> Ptr <git_repository> -> IO (CInt) #ccall git_revwalk_reset , Ptr <git_revwalk> -> IO () #ccall git_revwalk_push , Ptr <git_revwalk> -> Ptr <git_oid> -> IO (CInt)+#ccall git_revwalk_push_glob , Ptr <git_revwalk> -> CString -> IO (CInt)+#ccall git_revwalk_push_head , Ptr <git_revwalk> -> IO (CInt) #ccall git_revwalk_hide , Ptr <git_revwalk> -> Ptr <git_oid> -> IO (CInt)+#ccall git_revwalk_hide_glob , Ptr <git_revwalk> -> CString -> IO (CInt)+#ccall git_revwalk_hide_head , Ptr <git_revwalk> -> IO (CInt)+#ccall git_revwalk_push_ref , Ptr <git_revwalk> -> CString -> IO (CInt)+#ccall git_revwalk_hide_ref , Ptr <git_revwalk> -> CString -> IO (CInt) #ccall git_revwalk_next , Ptr <git_oid> -> Ptr <git_revwalk> -> IO (CInt) #ccall git_revwalk_sorting , Ptr <git_revwalk> -> CUInt -> IO () #ccall git_revwalk_free , Ptr <git_revwalk> -> IO ()
src/Bindings/Libgit2/Signature.hsc view
@@ -1,4 +1,3 @@- #include <bindings.dsl.h> #include <git2.h> module Bindings.Libgit2.Signature where@@ -6,7 +5,7 @@  import Bindings.Libgit2.Common import Bindings.Libgit2.Types-#ccall git_signature_new , CString -> CString -> CTime -> CInt -> IO (Ptr <git_signature>)-#ccall git_signature_now , CString -> CString -> IO (Ptr <git_signature>)+#ccall git_signature_new , Ptr (Ptr <git_signature>) -> CString -> CString -> CLong -> CInt -> IO (CInt)+#ccall git_signature_now , Ptr (Ptr <git_signature>) -> CString -> CString -> IO (CInt) #ccall git_signature_dup , Ptr <git_signature> -> IO (Ptr <git_signature>) #ccall git_signature_free , Ptr <git_signature> -> IO ()
+ src/Bindings/Libgit2/Status.hsc view
@@ -0,0 +1,30 @@+#include <bindings.dsl.h>+#include <git2.h>+module Bindings.Libgit2.Status where+#strict_import++import Bindings.Libgit2.Common+import Bindings.Libgit2.Types+#ccall git_status_foreach , Ptr <git_repository> -> Ptr () -> Ptr () -> IO (CInt)+{- typedef enum {+            GIT_STATUS_SHOW_INDEX_AND_WORKDIR = 0,+            GIT_STATUS_SHOW_INDEX_ONLY = 1,+            GIT_STATUS_SHOW_WORKDIR_ONLY = 2,+            GIT_STATUS_SHOW_INDEX_THEN_WORKDIR = 3+        } git_status_show_t; -}+#integral_t git_status_show_t+#num GIT_STATUS_SHOW_INDEX_AND_WORKDIR+#num GIT_STATUS_SHOW_INDEX_ONLY+#num GIT_STATUS_SHOW_WORKDIR_ONLY+#num GIT_STATUS_SHOW_INDEX_THEN_WORKDIR+{- typedef struct {+            git_status_show_t show; unsigned int flags; git_strarray pathspec;+        } git_status_options; -}+#starttype git_status_options+#field show , <git_status_show_t>+#field flags , CUInt+#field pathspec , <git_strarray>+#stoptype+#ccall git_status_foreach_ext , Ptr <git_repository> -> Ptr <git_status_options> -> Ptr () -> Ptr () -> IO (CInt)+#ccall git_status_file , Ptr CUInt -> Ptr <git_repository> -> CString -> IO (CInt)+#ccall git_status_should_ignore , Ptr CInt -> Ptr <git_repository> -> CString -> IO (CInt)
+ src/Bindings/Libgit2/Submodule.hsc view
@@ -0,0 +1,50 @@+#include <bindings.dsl.h>+#include <git2.h>+module Bindings.Libgit2.Submodule where+#strict_import++import Bindings.Libgit2.Common+import Bindings.Libgit2.Types+import Bindings.Libgit2.Oid+{- typedef enum {+            GIT_SUBMODULE_UPDATE_CHECKOUT = 0,+            GIT_SUBMODULE_UPDATE_REBASE = 1,+            GIT_SUBMODULE_UPDATE_MERGE = 2+        } git_submodule_update_t; -}+#integral_t git_submodule_update_t+#num GIT_SUBMODULE_UPDATE_CHECKOUT+#num GIT_SUBMODULE_UPDATE_REBASE+#num GIT_SUBMODULE_UPDATE_MERGE+{- typedef enum {+            GIT_SUBMODULE_IGNORE_ALL = 0,+            GIT_SUBMODULE_IGNORE_DIRTY = 1,+            GIT_SUBMODULE_IGNORE_UNTRACKED = 2,+            GIT_SUBMODULE_IGNORE_NONE = 3+        } git_submodule_ignore_t; -}+#integral_t git_submodule_ignore_t+#num GIT_SUBMODULE_IGNORE_ALL+#num GIT_SUBMODULE_IGNORE_DIRTY+#num GIT_SUBMODULE_IGNORE_UNTRACKED+#num GIT_SUBMODULE_IGNORE_NONE+{- typedef struct {+            char * name;+            char * path;+            char * url;+            git_oid oid;+            git_submodule_update_t update;+            git_submodule_ignore_t ignore;+            int fetch_recurse;+            int refcount;+        } git_submodule; -}+#starttype git_submodule+#field name , CString+#field path , CString+#field url , CString+#field oid , <git_oid>+#field update , <git_submodule_update_t>+#field ignore , <git_submodule_ignore_t>+#field fetch_recurse , CInt+#field refcount , CInt+#stoptype+#ccall git_submodule_foreach , Ptr <git_repository> -> Ptr () -> Ptr () -> IO (CInt)+#ccall git_submodule_lookup , Ptr (Ptr <git_submodule>) -> Ptr <git_repository> -> CString -> IO (CInt)
src/Bindings/Libgit2/Tag.hsc view
@@ -1,4 +1,3 @@- #include <bindings.dsl.h> #include <git2.h> module Bindings.Libgit2.Tag where@@ -8,6 +7,9 @@ import Bindings.Libgit2.Types import Bindings.Libgit2.Oid import Bindings.Libgit2.Object+#cinline git_tag_lookup , Ptr (Ptr <git_tag>) -> Ptr <git_repository> -> Ptr <git_oid> -> IO (CInt)+#cinline git_tag_lookup_prefix , Ptr (Ptr <git_tag>) -> Ptr <git_repository> -> Ptr <git_oid> -> CUInt -> IO (CInt)+#cinline git_tag_free , Ptr <git_tag> -> IO () #ccall git_tag_id , Ptr <git_tag> -> IO (Ptr <git_oid>) #ccall git_tag_target , Ptr (Ptr <git_object>) -> Ptr <git_tag> -> IO (CInt) #ccall git_tag_target_oid , Ptr <git_tag> -> IO (Ptr <git_oid>)@@ -17,9 +19,8 @@ #ccall git_tag_message , Ptr <git_tag> -> IO (CString) #ccall git_tag_create , Ptr <git_oid> -> Ptr <git_repository> -> CString -> Ptr <git_object> -> Ptr <git_signature> -> CString -> CInt -> IO (CInt) #ccall git_tag_create_frombuffer , Ptr <git_oid> -> Ptr <git_repository> -> CString -> CInt -> IO (CInt)+#ccall git_tag_create_lightweight , Ptr <git_oid> -> Ptr <git_repository> -> CString -> Ptr <git_object> -> CInt -> IO (CInt) #ccall git_tag_delete , Ptr <git_repository> -> CString -> IO (CInt) #ccall git_tag_list , Ptr <git_strarray> -> Ptr <git_repository> -> IO (CInt) #ccall git_tag_list_match , Ptr <git_strarray> -> CString -> Ptr <git_repository> -> IO (CInt)-#cinline git_tag_lookup , Ptr (Ptr <git_tag>) -> Ptr <git_repository> -> Ptr <git_oid> -> IO (CInt)-#cinline git_tag_lookup_prefix , Ptr (Ptr <git_tag>) -> Ptr <git_repository> -> Ptr <git_oid> -> CUInt -> IO (CInt)-#cinline git_tag_close , Ptr <git_tag> -> IO ()+#ccall git_tag_peel , Ptr (Ptr <git_object>) -> Ptr <git_tag> -> IO (CInt)
src/Bindings/Libgit2/Tag.hsc.helper.c view
@@ -1,7 +1,6 @@- #include <bindings.cmacros.h> #include <git2.h> -BC_INLINE3(git_tag_lookup, git_tag **, git_repository *, const git_oid *,int)-BC_INLINE4(git_tag_lookup_prefix, git_tag **, git_repository *, const git_oid *, unsigned int ,int)-BC_INLINE1VOID(git_tag_close, git_tag *)+BC_INLINE3(git_tag_lookup, git_tag * *, git_repository *, const git_oid *, int)+BC_INLINE4(git_tag_lookup_prefix, git_tag * *, git_repository *, const git_oid *, unsigned int, int)+BC_INLINE1VOID(git_tag_free, git_tag *)
+ src/Bindings/Libgit2/Threads.hsc view
@@ -0,0 +1,8 @@+#include <bindings.dsl.h>+#include <git2.h>+module Bindings.Libgit2.Threads where+#strict_import++import Bindings.Libgit2.Common+#ccall git_threads_init , IO ()+#ccall git_threads_shutdown , IO ()
src/Bindings/Libgit2/Tree.hsc view
@@ -1,4 +1,3 @@- #include <bindings.dsl.h> #include <git2.h> module Bindings.Libgit2.Tree where@@ -8,6 +7,9 @@ import Bindings.Libgit2.Types import Bindings.Libgit2.Oid import Bindings.Libgit2.Object+#cinline git_tree_lookup , Ptr (Ptr <git_tree>) -> Ptr <git_repository> -> Ptr <git_oid> -> IO (CInt)+#cinline git_tree_lookup_prefix , Ptr (Ptr <git_tree>) -> Ptr <git_repository> -> Ptr <git_oid> -> CUInt -> IO (CInt)+#cinline git_tree_free , Ptr <git_tree> -> IO () #ccall git_tree_id , Ptr <git_tree> -> IO (Ptr <git_oid>) #ccall git_tree_entrycount , Ptr <git_tree> -> IO (CUInt) #ccall git_tree_entry_byname , Ptr <git_tree> -> CString -> IO (Ptr <git_tree_entry>)@@ -16,7 +18,7 @@ #ccall git_tree_entry_name , Ptr <git_tree_entry> -> IO (CString) #ccall git_tree_entry_id , Ptr <git_tree_entry> -> IO (Ptr <git_oid>) #ccall git_tree_entry_type , Ptr <git_tree_entry> -> IO (<git_otype>)-#ccall git_tree_entry_2object , Ptr (Ptr <git_object>) -> Ptr <git_repository> -> Ptr <git_tree_entry> -> IO (CInt)+#ccall git_tree_entry_to_object , Ptr (Ptr <git_object>) -> Ptr <git_repository> -> Ptr <git_tree_entry> -> IO (CInt) #ccall git_tree_create_fromindex , Ptr <git_oid> -> Ptr <git_index> -> IO (CInt) #ccall git_treebuilder_create , Ptr (Ptr <git_treebuilder>) -> Ptr <git_tree> -> IO (CInt) #ccall git_treebuilder_clear , Ptr <git_treebuilder> -> IO ()@@ -24,8 +26,10 @@ #ccall git_treebuilder_get , Ptr <git_treebuilder> -> CString -> IO (Ptr <git_tree_entry>) #ccall git_treebuilder_insert , Ptr (Ptr <git_tree_entry>) -> Ptr <git_treebuilder> -> CString -> Ptr <git_oid> -> CUInt -> IO (CInt) #ccall git_treebuilder_remove , Ptr <git_treebuilder> -> CString -> IO (CInt)-#ccall git_treebuilder_filter , Ptr <git_treebuilder> -> CInt -> IO ()+#ccall git_treebuilder_filter , Ptr <git_treebuilder> -> Ptr () -> Ptr () -> IO () #ccall git_treebuilder_write , Ptr <git_oid> -> Ptr <git_repository> -> Ptr <git_treebuilder> -> IO (CInt)-#cinline git_tree_lookup , Ptr (Ptr <git_tree>) -> Ptr <git_repository> -> Ptr <git_oid> -> IO (CInt)-#cinline git_tree_lookup_prefix , Ptr (Ptr <git_tree>) -> Ptr <git_repository> -> Ptr <git_oid> -> CUInt -> IO (CInt)-#cinline git_tree_close , Ptr <git_tree> -> IO ()+#ccall git_tree_get_subtree , Ptr (Ptr <git_tree>) -> Ptr <git_tree> -> CString -> IO (CInt)+{- typedef int (* git_treewalk_cb)(const char * root,+                                git_tree_entry * entry,+                                void * payload); -}+#ccall git_tree_walk , Ptr <git_tree> -> CInt -> CInt -> Ptr () -> IO (CInt)
src/Bindings/Libgit2/Tree.hsc.helper.c view
@@ -1,7 +1,6 @@- #include <bindings.cmacros.h> #include <git2.h> -BC_INLINE3(git_tree_lookup, git_tree **, git_repository *, const git_oid *,int)-BC_INLINE4(git_tree_lookup_prefix, git_tree **, git_repository *, const git_oid *, unsigned int ,int)-BC_INLINE1VOID(git_tree_close, git_tree *)+BC_INLINE3(git_tree_lookup, git_tree * *, git_repository *, const git_oid *, int)+BC_INLINE4(git_tree_lookup_prefix, git_tree * *, git_repository *, const git_oid *, unsigned int, int)+BC_INLINE1VOID(git_tree_free, git_tree *)
src/Bindings/Libgit2/Types.hsc view
@@ -1,87 +1,111 @@- #include <bindings.dsl.h> #include <git2.h> module Bindings.Libgit2.Types where #strict_import --#integral_t git_off_t+import Bindings.Libgit2.Common+{- typedef int64_t git_off_t; -}+{- typedef int64_t git_time_t; -} {- typedef enum {-	GIT_OBJ_ANY = -2,		/**< Object can be any of the following */-	GIT_OBJ_BAD = -1,       /**< Object is invalid. */-	GIT_OBJ__EXT1 = 0,      /**< Reserved for future use. */-	GIT_OBJ_COMMIT = 1,     /**< A commit object. */-	GIT_OBJ_TREE = 2,       /**< A tree (directory listing) object. */-	GIT_OBJ_BLOB = 3,       /**< A file revision object. */-	GIT_OBJ_TAG = 4,        /**< An annotated tag object. */-	GIT_OBJ__EXT2 = 5,      /**< Reserved for future use. */-	GIT_OBJ_OFS_DELTA = 6,  /**< A delta, base is given by an offset. */-	GIT_OBJ_REF_DELTA = 7,  /**< A delta, base is given by object id. */-} git_otype; -}+            GIT_OBJ_ANY = -2,+            GIT_OBJ_BAD = -1,+            GIT_OBJ__EXT1 = 0,+            GIT_OBJ_COMMIT = 1,+            GIT_OBJ_TREE = 2,+            GIT_OBJ_BLOB = 3,+            GIT_OBJ_TAG = 4,+            GIT_OBJ__EXT2 = 5,+            GIT_OBJ_OFS_DELTA = 6,+            GIT_OBJ_REF_DELTA = 7+        } git_otype; -} #integral_t git_otype-#num    GIT_OBJ_ANY-#num    GIT_OBJ_BAD-#num    GIT_OBJ__EXT1-#num    GIT_OBJ_COMMIT-#num    GIT_OBJ_TREE-#num    GIT_OBJ_BLOB-#num    GIT_OBJ_TAG-#num    GIT_OBJ__EXT2-#num    GIT_OBJ_OFS_DELTA-#num    GIT_OBJ_REF_DELTA-{- typedef enum {-	GIT_REF_INVALID = 0, /** Invalid reference */-	GIT_REF_OID = 1, /** A reference which points at an object id */-	GIT_REF_SYMBOLIC = 2, /** A reference which points at another reference */-	GIT_REF_PACKED = 4,-	GIT_REF_HAS_PEEL = 8,-	GIT_REF_LISTALL = GIT_REF_OID|GIT_REF_SYMBOLIC|GIT_REF_PACKED,-} git_ref_t; -}-#integral_t git_ref_t-#num    GIT_REF_INVALID-#num    GIT_REF_OID-#num    GIT_REF_SYMBOLIC-#num    GIT_REF_PACKED-#num    GIT_REF_HAS_PEEL-#num    GIT_REF_LISTALL+#num GIT_OBJ_ANY+#num GIT_OBJ_BAD+#num GIT_OBJ__EXT1+#num GIT_OBJ_COMMIT+#num GIT_OBJ_TREE+#num GIT_OBJ_BLOB+#num GIT_OBJ_TAG+#num GIT_OBJ__EXT2+#num GIT_OBJ_OFS_DELTA+#num GIT_OBJ_REF_DELTA+{- typedef struct git_odb git_odb; -} #opaque_t git_odb+{- typedef struct git_odb_backend git_odb_backend; -} #opaque_t git_odb_backend+{- typedef struct git_odb_object git_odb_object; -} #opaque_t git_odb_object+{- typedef struct git_odb_stream git_odb_stream; -} #opaque_t git_odb_stream+{- typedef struct git_repository git_repository; -} #opaque_t git_repository+{- typedef struct git_object git_object; -} #opaque_t git_object+{- typedef struct git_revwalk git_revwalk; -} #opaque_t git_revwalk+{- typedef struct git_tag git_tag; -} #opaque_t git_tag+{- typedef struct git_blob git_blob; -} #opaque_t git_blob+{- typedef struct git_commit git_commit; -} #opaque_t git_commit+{- typedef struct git_tree_entry git_tree_entry; -} #opaque_t git_tree_entry+{- typedef struct git_tree git_tree; -} #opaque_t git_tree+{- typedef struct git_treebuilder git_treebuilder; -} #opaque_t git_treebuilder+{- typedef struct git_index git_index; -} #opaque_t git_index+{- typedef struct git_config git_config; -} #opaque_t git_config+{- typedef struct git_reflog_entry git_reflog_entry; -} #opaque_t git_reflog_entry+{- typedef struct git_reflog git_reflog; -} #opaque_t git_reflog-#opaque_t git_reference-#opaque_t git_refspec-#opaque_t git_remote-#opaque_t git_transport-#opaque_t git_remote_head-#opaque_t git_headarray+{- typedef struct git_note git_note; -}+#opaque_t git_note {- typedef struct git_time {-	git_time_t time; -	int offset; -} git_time; -}+            git_time_t time; int offset;+        } git_time; -} #starttype git_time-#field    time , CTime-#field    offset , CInt+#field time , CLong+#field offset , CInt #stoptype {- typedef struct git_signature {-	char *name; -	char *email; -	git_time when; -} git_signature; -}+            char * name; char * email; git_time when;+        } git_signature; -} #starttype git_signature-#field    name , CString-#field    email , CString-#field    when , <git_time>+#field name , CString+#field email , CString+#field when , <git_time> #stoptype+{- typedef struct git_reference git_reference; -}+#opaque_t git_reference+{- typedef enum {+            GIT_REF_INVALID = 0,+            GIT_REF_OID = 1,+            GIT_REF_SYMBOLIC = 2,+            GIT_REF_PACKED = 4,+            GIT_REF_HAS_PEEL = 8,+            GIT_REF_LISTALL = GIT_REF_OID | GIT_REF_SYMBOLIC | GIT_REF_PACKED+        } git_ref_t; -}+#integral_t git_ref_t+#num GIT_REF_INVALID+#num GIT_REF_OID+#num GIT_REF_SYMBOLIC+#num GIT_REF_PACKED+#num GIT_REF_HAS_PEEL+#num GIT_REF_LISTALL+{- typedef enum {+            GIT_BRANCH_LOCAL = 1, GIT_BRANCH_REMOTE = 2+        } git_branch_t; -}+#integral_t git_branch_t+#num GIT_BRANCH_LOCAL+#num GIT_BRANCH_REMOTE+{- typedef struct git_refspec git_refspec; -}+#opaque_t git_refspec+{- typedef struct git_remote git_remote; -}+#opaque_t git_remote+{- typedef struct git_remote_head git_remote_head; -}+#opaque_t git_remote_head
+ src/Bindings/Libgit2/Version.hsc view
@@ -0,0 +1,5 @@+#include <bindings.dsl.h>+#include <git2.h>+module Bindings.Libgit2.Version where+#strict_import+
+ src/Bindings/Libgit2/Windows.hsc view
@@ -0,0 +1,9 @@+#include <bindings.dsl.h>+#include <git2.h>+module Bindings.Libgit2.Windows where+#strict_import++import Bindings.Libgit2.Common+#ccall gitwin_set_codepage , CUInt -> IO ()+#ccall gitwin_get_codepage , IO (CUInt)+#ccall gitwin_set_utf8 , IO ()