@@ -408,9 +408,9 @@ public static string git_commit_message_encoding(GitObjectSafeHandle obj)
408408 return NativeMethods . git_commit_message_encoding ( obj ) ;
409409 }
410410
411- public static ObjectId git_commit_parent_id ( GitObjectSafeHandle obj , uint i )
411+ public static unsafe ObjectId git_commit_parent_id ( GitObjectSafeHandle obj , uint i )
412412 {
413- return NativeMethods . git_commit_parent_id ( obj , i ) . MarshalAsObjectId ( ) ;
413+ return ObjectId . BuildFromPtr ( NativeMethods . git_commit_parent_id ( obj , i ) ) ;
414414 }
415415
416416 public static int git_commit_parentcount ( RepositorySafeHandle repo , ObjectId id )
@@ -426,9 +426,9 @@ public static int git_commit_parentcount(ObjectSafeWrapper obj)
426426 return ( int ) NativeMethods . git_commit_parentcount ( obj . ObjectPtr ) ;
427427 }
428428
429- public static ObjectId git_commit_tree_id ( GitObjectSafeHandle obj )
429+ public static unsafe ObjectId git_commit_tree_id ( GitObjectSafeHandle obj )
430430 {
431- return NativeMethods . git_commit_tree_id ( obj ) . MarshalAsObjectId ( ) ;
431+ return ObjectId . BuildFromPtr ( NativeMethods . git_commit_tree_id ( obj ) ) ;
432432 }
433433
434434 #endregion
@@ -1187,9 +1187,9 @@ public static GitAnnotatedCommitHandle git_annotated_commit_from_revspec(Reposit
11871187 return their_head ;
11881188 }
11891189
1190- public static ObjectId git_annotated_commit_id ( GitAnnotatedCommitHandle mergeHead )
1190+ public static unsafe ObjectId git_annotated_commit_id ( GitAnnotatedCommitHandle mergeHead )
11911191 {
1192- return NativeMethods . git_annotated_commit_id ( mergeHead ) . MarshalAsObjectId ( ) ;
1192+ return ObjectId . BuildFromPtr ( NativeMethods . git_annotated_commit_id ( mergeHead ) ) ;
11931193 }
11941194
11951195 public static void git_merge ( RepositorySafeHandle repo , GitAnnotatedCommitHandle [ ] heads , GitMergeOpts mergeOptions , GitCheckoutOpts checkoutOptions )
@@ -1308,9 +1308,9 @@ public static string git_note_message(NoteSafeHandle note)
13081308 return NativeMethods . git_note_message ( note ) ;
13091309 }
13101310
1311- public static ObjectId git_note_id ( NoteSafeHandle note )
1311+ public static unsafe ObjectId git_note_id ( NoteSafeHandle note )
13121312 {
1313- return NativeMethods . git_note_id ( note ) . MarshalAsObjectId ( ) ;
1313+ return ObjectId . BuildFromPtr ( NativeMethods . git_note_id ( note ) ) ;
13141314 }
13151315
13161316 public static NoteSafeHandle git_note_read ( RepositorySafeHandle repo , string notes_ref , ObjectId id )
@@ -1352,9 +1352,9 @@ public static void git_note_remove(RepositorySafeHandle repo, string notes_ref,
13521352
13531353 #region git_object_
13541354
1355- public static ObjectId git_object_id ( GitObjectSafeHandle obj )
1355+ public static unsafe ObjectId git_object_id ( GitObjectSafeHandle obj )
13561356 {
1357- return NativeMethods . git_object_id ( obj ) . MarshalAsObjectId ( ) ;
1357+ return ObjectId . BuildFromPtr ( NativeMethods . git_object_id ( obj ) ) ;
13581358 }
13591359
13601360 public static void git_object_free ( IntPtr obj )
@@ -1883,7 +1883,7 @@ public static void git_reference_remove(RepositorySafeHandle repo, string name)
18831883
18841884 public static unsafe ObjectId git_reference_target ( git_reference * reference )
18851885 {
1886- return NativeMethods . git_reference_target ( reference ) . MarshalAsObjectId ( ) ;
1886+ return ObjectId . BuildFromPtr ( NativeMethods . git_reference_target ( reference ) ) ;
18871887 }
18881888
18891889 public static unsafe ReferenceHandle git_reference_rename (
@@ -1966,14 +1966,14 @@ public static ReflogEntrySafeHandle git_reflog_entry_byindex(ReflogSafeHandle re
19661966 return NativeMethods . git_reflog_entry_byindex ( reflog , ( UIntPtr ) idx ) ;
19671967 }
19681968
1969- public static ObjectId git_reflog_entry_id_old ( SafeHandle entry )
1969+ public static unsafe ObjectId git_reflog_entry_id_old ( SafeHandle entry )
19701970 {
1971- return NativeMethods . git_reflog_entry_id_old ( entry ) . MarshalAsObjectId ( ) ;
1971+ return ObjectId . BuildFromPtr ( NativeMethods . git_reflog_entry_id_old ( entry ) ) ;
19721972 }
19731973
1974- public static ObjectId git_reflog_entry_id_new ( SafeHandle entry )
1974+ public static unsafe ObjectId git_reflog_entry_id_new ( SafeHandle entry )
19751975 {
1976- return NativeMethods . git_reflog_entry_id_new ( entry ) . MarshalAsObjectId ( ) ;
1976+ return ObjectId . BuildFromPtr ( NativeMethods . git_reflog_entry_id_new ( entry ) ) ;
19771977 }
19781978
19791979 public static Signature git_reflog_entry_committer ( SafeHandle entry )
@@ -2938,19 +2938,20 @@ public static string git_submodule_url(SubmoduleSafeHandle submodule)
29382938 return NativeMethods . git_submodule_url ( submodule ) ;
29392939 }
29402940
2941- public static ObjectId git_submodule_index_id ( SubmoduleSafeHandle submodule )
2941+ public static unsafe ObjectId git_submodule_index_id ( SubmoduleSafeHandle submodule )
29422942 {
2943- return NativeMethods . git_submodule_index_id ( submodule ) . MarshalAsObjectId ( ) ;
2943+ return ObjectId . BuildFromPtr ( NativeMethods . git_submodule_index_id ( submodule ) ) ;
29442944 }
29452945
2946- public static ObjectId git_submodule_head_id ( SubmoduleSafeHandle submodule )
2946+ public static unsafe ObjectId git_submodule_head_id ( SubmoduleSafeHandle submodule )
29472947 {
2948- return NativeMethods . git_submodule_head_id ( submodule ) . MarshalAsObjectId ( ) ;
2948+ Console . WriteLine ( "got git_oid for head {0}" , NativeMethods . git_submodule_head_id ( submodule ) == null ) ;
2949+ return ObjectId . BuildFromPtr ( NativeMethods . git_submodule_head_id ( submodule ) ) ;
29492950 }
29502951
2951- public static ObjectId git_submodule_wd_id ( SubmoduleSafeHandle submodule )
2952+ public static unsafe ObjectId git_submodule_wd_id ( SubmoduleSafeHandle submodule )
29522953 {
2953- return NativeMethods . git_submodule_wd_id ( submodule ) . MarshalAsObjectId ( ) ;
2954+ return ObjectId . BuildFromPtr ( NativeMethods . git_submodule_wd_id ( submodule ) ) ;
29542955 }
29552956
29562957 public static SubmoduleIgnore git_submodule_ignore ( SubmoduleSafeHandle submodule )
@@ -3089,9 +3090,9 @@ public static Signature git_tag_tagger(GitObjectSafeHandle tag)
30893090 return tagger ;
30903091 }
30913092
3092- public static ObjectId git_tag_target_id ( GitObjectSafeHandle tag )
3093+ public static unsafe ObjectId git_tag_target_id ( GitObjectSafeHandle tag )
30933094 {
3094- return NativeMethods . git_tag_target_id ( tag ) . MarshalAsObjectId ( ) ;
3095+ return ObjectId . BuildFromPtr ( NativeMethods . git_tag_target_id ( tag ) ) ;
30953096 }
30963097
30973098 public static GitObjectType git_tag_target_type ( GitObjectSafeHandle tag )
@@ -3190,7 +3191,7 @@ public static unsafe TreeEntryHandle git_tree_entry_bypath(RepositorySafeHandle
31903191
31913192 public static unsafe ObjectId git_tree_entry_id ( git_tree_entry * entry )
31923193 {
3193- return NativeMethods . git_tree_entry_id ( entry ) . MarshalAsObjectId ( ) ;
3194+ return ObjectId . BuildFromPtr ( NativeMethods . git_tree_entry_id ( entry ) ) ;
31943195 }
31953196
31963197 public static unsafe string git_tree_entry_name ( git_tree_entry * entry )
0 commit comments