@@ -145,16 +145,16 @@ internal static extern int git_blob_filtered_content(
145145 internal static extern Int64 git_blob_rawsize ( GitObjectSafeHandle blob ) ;
146146
147147 [ DllImport ( libgit2 ) ]
148- internal static extern int git_branch_create_from_annotated (
149- out ReferenceSafeHandle ref_out ,
148+ internal static extern unsafe int git_branch_create_from_annotated (
149+ out git_reference * ref_out ,
150150 RepositorySafeHandle repo ,
151151 [ MarshalAs ( UnmanagedType . CustomMarshaler , MarshalCookie = UniqueId . UniqueIdentifier , MarshalTypeRef = typeof ( StrictUtf8Marshaler ) ) ] string branch_name ,
152152 GitAnnotatedCommitHandle target ,
153153 [ MarshalAs ( UnmanagedType . Bool ) ] bool force ) ;
154154
155155 [ DllImport ( libgit2 ) ]
156- internal static extern int git_branch_delete (
157- ReferenceSafeHandle reference ) ;
156+ internal static extern unsafe int git_branch_delete (
157+ git_reference * reference ) ;
158158
159159 internal delegate int branch_foreach_callback (
160160 IntPtr branch_name ,
@@ -172,15 +172,15 @@ internal static extern int git_branch_iterator_new(
172172 GitBranchType branch_type ) ;
173173
174174 [ DllImport ( libgit2 ) ]
175- internal static extern int git_branch_move (
176- out ReferenceSafeHandle ref_out ,
177- ReferenceSafeHandle reference ,
175+ internal static extern unsafe int git_branch_move (
176+ out git_reference * ref_out ,
177+ git_reference * reference ,
178178 [ MarshalAs ( UnmanagedType . CustomMarshaler , MarshalCookie = UniqueId . UniqueIdentifier , MarshalTypeRef = typeof ( StrictUtf8Marshaler ) ) ] string new_branch_name ,
179179 [ MarshalAs ( UnmanagedType . Bool ) ] bool force ) ;
180180
181181 [ DllImport ( libgit2 ) ]
182182 internal static extern int git_branch_next (
183- out ReferenceSafeHandle ref_out ,
183+ out IntPtr ref_out ,
184184 out GitBranchType type_out ,
185185 BranchIteratorSafeHandle iter ) ;
186186
@@ -741,10 +741,10 @@ internal static extern int git_merge_base_octopus(
741741 [ In ] GitOid [ ] input_array ) ;
742742
743743 [ DllImport ( libgit2 ) ]
744- internal static extern int git_annotated_commit_from_ref (
744+ internal static extern unsafe int git_annotated_commit_from_ref (
745745 out GitAnnotatedCommitHandle annotatedCommit ,
746746 RepositorySafeHandle repo ,
747- ReferenceSafeHandle reference ) ;
747+ git_reference * reference ) ;
748748
749749 [ DllImport ( libgit2 ) ]
750750 internal static extern int git_annotated_commit_from_fetchhead (
@@ -984,17 +984,17 @@ internal static extern int git_packbuilder_write(
984984 internal static extern UInt32 git_packbuilder_written ( PackBuilderSafeHandle packbuilder ) ;
985985
986986 [ DllImport ( libgit2 ) ]
987- internal static extern int git_reference_create (
988- out ReferenceSafeHandle reference ,
987+ internal static extern unsafe int git_reference_create (
988+ out git_reference * reference ,
989989 RepositorySafeHandle repo ,
990990 [ MarshalAs ( UnmanagedType . CustomMarshaler , MarshalCookie = UniqueId . UniqueIdentifier , MarshalTypeRef = typeof ( StrictUtf8Marshaler ) ) ] string name ,
991991 ref GitOid oid ,
992992 [ MarshalAs ( UnmanagedType . Bool ) ] bool force ,
993993 [ MarshalAs ( UnmanagedType . CustomMarshaler , MarshalCookie = UniqueId . UniqueIdentifier , MarshalTypeRef = typeof ( StrictUtf8Marshaler ) ) ] string log_message ) ;
994994
995995 [ DllImport ( libgit2 ) ]
996- internal static extern int git_reference_symbolic_create (
997- out ReferenceSafeHandle reference ,
996+ internal static extern unsafe int git_reference_symbolic_create (
997+ out git_reference * reference ,
998998 RepositorySafeHandle repo ,
999999 [ MarshalAs ( UnmanagedType . CustomMarshaler , MarshalCookie = UniqueId . UniqueIdentifier , MarshalTypeRef = typeof ( StrictUtf8Marshaler ) ) ] string name ,
10001000 [ MarshalAs ( UnmanagedType . CustomMarshaler , MarshalCookie = UniqueId . UniqueIdentifier , MarshalTypeRef = typeof ( StrictUtf8Marshaler ) ) ] string target ,
@@ -1023,51 +1023,51 @@ internal static extern int git_reference_is_valid_name(
10231023 internal static extern int git_reference_list ( out GitStrArray array , RepositorySafeHandle repo ) ;
10241024
10251025 [ DllImport ( libgit2 ) ]
1026- internal static extern int git_reference_lookup (
1027- out ReferenceSafeHandle reference ,
1026+ internal static extern unsafe int git_reference_lookup (
1027+ out git_reference * reference ,
10281028 RepositorySafeHandle repo ,
10291029 [ MarshalAs ( UnmanagedType . CustomMarshaler , MarshalCookie = UniqueId . UniqueIdentifier , MarshalTypeRef = typeof ( StrictUtf8Marshaler ) ) ] string name ) ;
10301030
10311031 [ DllImport ( libgit2 ) ]
10321032 [ return : MarshalAs ( UnmanagedType . CustomMarshaler , MarshalCookie = UniqueId . UniqueIdentifier , MarshalTypeRef = typeof ( LaxUtf8NoCleanupMarshaler ) ) ]
1033- internal static extern string git_reference_name ( ReferenceSafeHandle reference ) ;
1033+ internal static extern unsafe string git_reference_name ( git_reference * reference ) ;
10341034
10351035 [ DllImport ( libgit2 ) ]
10361036 internal static extern int git_reference_remove (
10371037 RepositorySafeHandle repo ,
10381038 [ MarshalAs ( UnmanagedType . CustomMarshaler , MarshalCookie = UniqueId . UniqueIdentifier , MarshalTypeRef = typeof ( StrictUtf8Marshaler ) ) ] string name ) ;
10391039
10401040 [ DllImport ( libgit2 ) ]
1041- internal static extern OidSafeHandle git_reference_target ( ReferenceSafeHandle reference ) ;
1041+ internal static extern unsafe OidSafeHandle git_reference_target ( git_reference * reference ) ;
10421042
10431043 [ DllImport ( libgit2 ) ]
1044- internal static extern int git_reference_rename (
1045- out ReferenceSafeHandle ref_out ,
1046- ReferenceSafeHandle reference ,
1044+ internal static extern unsafe int git_reference_rename (
1045+ out git_reference * ref_out ,
1046+ git_reference * reference ,
10471047 [ MarshalAs ( UnmanagedType . CustomMarshaler , MarshalCookie = UniqueId . UniqueIdentifier , MarshalTypeRef = typeof ( StrictUtf8Marshaler ) ) ] string newName ,
10481048 [ MarshalAs ( UnmanagedType . Bool ) ] bool force ,
10491049 [ MarshalAs ( UnmanagedType . CustomMarshaler , MarshalCookie = UniqueId . UniqueIdentifier , MarshalTypeRef = typeof ( StrictUtf8Marshaler ) ) ] string log_message ) ;
10501050
10511051 [ DllImport ( libgit2 ) ]
1052- internal static extern int git_reference_set_target (
1053- out ReferenceSafeHandle ref_out ,
1054- ReferenceSafeHandle reference ,
1052+ internal static extern unsafe int git_reference_set_target (
1053+ out git_reference * ref_out ,
1054+ git_reference * reference ,
10551055 ref GitOid id ,
10561056 [ MarshalAs ( UnmanagedType . CustomMarshaler , MarshalCookie = UniqueId . UniqueIdentifier , MarshalTypeRef = typeof ( StrictUtf8Marshaler ) ) ] string log_message ) ;
10571057
10581058 [ DllImport ( libgit2 ) ]
1059- internal static extern int git_reference_symbolic_set_target (
1060- out ReferenceSafeHandle ref_out ,
1061- ReferenceSafeHandle reference ,
1059+ internal static extern unsafe int git_reference_symbolic_set_target (
1060+ out git_reference * ref_out ,
1061+ git_reference * reference ,
10621062 [ MarshalAs ( UnmanagedType . CustomMarshaler , MarshalCookie = UniqueId . UniqueIdentifier , MarshalTypeRef = typeof ( StrictUtf8Marshaler ) ) ] string target ,
10631063 [ MarshalAs ( UnmanagedType . CustomMarshaler , MarshalCookie = UniqueId . UniqueIdentifier , MarshalTypeRef = typeof ( StrictUtf8Marshaler ) ) ] string log_message ) ;
10641064
10651065 [ DllImport ( libgit2 ) ]
10661066 [ return : MarshalAs ( UnmanagedType . CustomMarshaler , MarshalCookie = UniqueId . UniqueIdentifier , MarshalTypeRef = typeof ( LaxUtf8NoCleanupMarshaler ) ) ]
1067- internal static extern string git_reference_symbolic_target ( ReferenceSafeHandle reference ) ;
1067+ internal static extern unsafe string git_reference_symbolic_target ( git_reference * reference ) ;
10681068
10691069 [ DllImport ( libgit2 ) ]
1070- internal static extern GitReferenceType git_reference_type ( ReferenceSafeHandle reference ) ;
1070+ internal static extern unsafe GitReferenceType git_reference_type ( git_reference * reference ) ;
10711071
10721072 [ DllImport ( libgit2 ) ]
10731073 internal static extern int git_reference_ensure_log (
@@ -1442,9 +1442,9 @@ internal static extern int git_revert(
14421442 GitRevertOpts opts ) ;
14431443
14441444 [ DllImport ( libgit2 ) ]
1445- internal static extern int git_revparse_ext (
1445+ internal static extern unsafe int git_revparse_ext (
14461446 out GitObjectSafeHandle obj ,
1447- out ReferenceSafeHandle reference ,
1447+ out git_reference * reference ,
14481448 RepositorySafeHandle repo ,
14491449 [ MarshalAs ( UnmanagedType . CustomMarshaler , MarshalCookie = UniqueId . UniqueIdentifier , MarshalTypeRef = typeof ( StrictUtf8Marshaler ) ) ] string spec ) ;
14501450
0 commit comments