@@ -905,11 +905,11 @@ public static void git_index_add_bypath(IndexSafeHandle index, FilePath path)
905905 Ensure . ZeroResult ( res ) ;
906906 }
907907
908- public static Conflict git_index_conflict_get (
908+ public static unsafe Conflict git_index_conflict_get (
909909 IndexSafeHandle index ,
910910 FilePath path )
911911 {
912- IndexEntrySafeHandle ancestor , ours , theirs ;
912+ git_index_entry * ancestor , ours , theirs ;
913913
914914 int res = NativeMethods . git_index_conflict_get ( out ancestor ,
915915 out ours ,
@@ -938,9 +938,9 @@ public static ConflictIteratorSafeHandle git_index_conflict_iterator_new(IndexSa
938938 return iter ;
939939 }
940940
941- public static Conflict git_index_conflict_next ( ConflictIteratorSafeHandle iterator )
941+ public static unsafe Conflict git_index_conflict_next ( ConflictIteratorSafeHandle iterator )
942942 {
943- IndexEntrySafeHandle ancestor , ours , theirs ;
943+ git_index_entry * ancestor , ours , theirs ;
944944
945945 int res = NativeMethods . git_index_conflict_next ( out ancestor , out ours , out theirs , iterator ) ;
946946
@@ -951,14 +951,9 @@ public static Conflict git_index_conflict_next(ConflictIteratorSafeHandle iterat
951951
952952 Ensure . ZeroResult ( res ) ;
953953
954- using ( ancestor )
955- using ( ours )
956- using ( theirs )
957- {
958- return new Conflict ( IndexEntry . BuildFromPtr ( ancestor ) ,
959- IndexEntry . BuildFromPtr ( ours ) ,
960- IndexEntry . BuildFromPtr ( theirs ) ) ;
961- }
954+ return new Conflict ( IndexEntry . BuildFromPtr ( ancestor ) ,
955+ IndexEntry . BuildFromPtr ( ours ) ,
956+ IndexEntry . BuildFromPtr ( theirs ) ) ;
962957 }
963958
964959 public static void git_index_conflict_iterator_free ( IntPtr iterator )
@@ -972,26 +967,24 @@ public static int git_index_entrycount(IndexSafeHandle index)
972967 . ConvertToInt ( ) ;
973968 }
974969
975- public static StageLevel git_index_entry_stage ( IndexEntrySafeHandle index )
970+ public static unsafe StageLevel git_index_entry_stage ( git_index_entry * entry )
976971 {
977- return ( StageLevel ) NativeMethods . git_index_entry_stage ( index ) ;
972+ return ( StageLevel ) NativeMethods . git_index_entry_stage ( entry ) ;
978973 }
979974
980975 public static void git_index_free ( IntPtr index )
981976 {
982977 NativeMethods . git_index_free ( index ) ;
983978 }
984979
985- public static IndexEntrySafeHandle git_index_get_byindex ( IndexSafeHandle index , UIntPtr n )
980+ public static unsafe git_index_entry * git_index_get_byindex ( IndexSafeHandle index , UIntPtr n )
986981 {
987982 return NativeMethods . git_index_get_byindex ( index , n ) ;
988983 }
989984
990- public static IndexEntrySafeHandle git_index_get_bypath ( IndexSafeHandle index , FilePath path , int stage )
985+ public static unsafe git_index_entry * git_index_get_bypath ( IndexSafeHandle index , FilePath path , int stage )
991986 {
992- IndexEntrySafeHandle handle = NativeMethods . git_index_get_bypath ( index , path , stage ) ;
993-
994- return handle . IsZero ? null : handle ;
987+ return NativeMethods . git_index_get_bypath ( index , path , stage ) ;
995988 }
996989
997990 public static bool git_index_has_conflicts ( IndexSafeHandle index )
0 commit comments