@@ -460,14 +460,14 @@ public static git_result git_repository_wrap_odb(out git_repository @out, git_od
460
460
/// The method will automatically detect if the repository is bare
461
461
/// (if there is a repository).
462
462
/// </remarks>
463
- public static git_result git_repository_discover ( out git_buf @out , [ MarshalAs ( UnmanagedType . LPUTF8Str ) ] string start_path , [ MarshalAs ( UnmanagedType . I4 ) ] bool across_fs , [ MarshalAs ( UnmanagedType . LPUTF8Str ) ] string ceiling_dirs )
463
+ public static git_result git_repository_discover ( out git_buf @out , [ MarshalAs ( UnmanagedType . LPUTF8Str ) ] string start_path , [ MarshalAs ( UnmanagedType . Bool ) ] bool across_fs , [ MarshalAs ( UnmanagedType . LPUTF8Str ) ] string ceiling_dirs )
464
464
{
465
465
var __result__ = git_repository_discover__ ( out @out , start_path , across_fs , ceiling_dirs ) . Check ( ) ;
466
466
return __result__ ;
467
467
}
468
468
469
469
[ DllImport ( LibGit2Name , EntryPoint = "git_repository_discover" , CallingConvention = CallingConvention . Cdecl ) ]
470
- private static extern git_result git_repository_discover__ ( out git_buf @out , [ MarshalAs ( UnmanagedType . LPUTF8Str ) ] string start_path , [ MarshalAs ( UnmanagedType . I4 ) ] bool across_fs , [ MarshalAs ( UnmanagedType . LPUTF8Str ) ] string ceiling_dirs ) ;
470
+ private static extern git_result git_repository_discover__ ( out git_buf @out , [ MarshalAs ( UnmanagedType . LPUTF8Str ) ] string start_path , [ MarshalAs ( UnmanagedType . Bool ) ] bool across_fs , [ MarshalAs ( UnmanagedType . LPUTF8Str ) ] string ceiling_dirs ) ;
471
471
472
472
/// <summary>
473
473
/// Find and open a repository with extended controls.
@@ -537,14 +537,14 @@ public static git_result git_repository_open_bare(out git_repository @out, [Mars
537
537
/// TODO:
538
538
/// - Reinit the repository
539
539
/// </remarks>
540
- public static git_result git_repository_init ( out git_repository @out , [ MarshalAs ( UnmanagedType . LPUTF8Str ) ] string path , [ MarshalAs ( UnmanagedType . I4 ) ] bool is_bare )
540
+ public static git_result git_repository_init ( out git_repository @out , [ MarshalAs ( UnmanagedType . LPUTF8Str ) ] string path , [ MarshalAs ( UnmanagedType . Bool ) ] bool is_bare )
541
541
{
542
542
var __result__ = git_repository_init__ ( out @out , path , is_bare ) . Check ( ) ;
543
543
return __result__ ;
544
544
}
545
545
546
546
[ DllImport ( LibGit2Name , EntryPoint = "git_repository_init" , CallingConvention = CallingConvention . Cdecl ) ]
547
- private static extern git_result git_repository_init__ ( out git_repository @out , [ MarshalAs ( UnmanagedType . LPUTF8Str ) ] string path , [ MarshalAs ( UnmanagedType . I4 ) ] bool is_bare ) ;
547
+ private static extern git_result git_repository_init__ ( out git_repository @out , [ MarshalAs ( UnmanagedType . LPUTF8Str ) ] string path , [ MarshalAs ( UnmanagedType . Bool ) ] bool is_bare ) ;
548
548
549
549
/// <summary>
550
550
/// Initialize git_repository_init_options structure
@@ -669,7 +669,8 @@ public static git_result git_repository_head(out git_reference @out, git_reposit
669
669
/// apart from HEAD, which must be pointing to the unborn master branch.
670
670
/// </remarks>
671
671
[ DllImport ( LibGit2Name , CallingConvention = CallingConvention . Cdecl ) ]
672
- public static extern int git_repository_is_empty ( git_repository repo ) ;
672
+ [ return : MarshalAs ( UnmanagedType . Bool ) ]
673
+ public static extern bool git_repository_is_empty ( git_repository repo ) ;
673
674
674
675
/// <summary>
675
676
/// Get the location of a specific repository file or directory
@@ -748,30 +749,32 @@ public static git_result git_repository_item_path(out git_buf @out, git_reposito
748
749
/// all the common workdir operations (checkout, status, index
749
750
/// manipulation, etc).
750
751
/// </remarks>
751
- public static git_result git_repository_set_workdir ( git_repository repo , [ MarshalAs ( UnmanagedType . LPUTF8Str ) ] string workdir , [ MarshalAs ( UnmanagedType . I4 ) ] bool update_gitlink )
752
+ public static git_result git_repository_set_workdir ( git_repository repo , [ MarshalAs ( UnmanagedType . LPUTF8Str ) ] string workdir , [ MarshalAs ( UnmanagedType . Bool ) ] bool update_gitlink )
752
753
{
753
754
var __result__ = git_repository_set_workdir__ ( repo , workdir , update_gitlink ) . Check ( ) ;
754
755
return __result__ ;
755
756
}
756
757
757
758
[ DllImport ( LibGit2Name , EntryPoint = "git_repository_set_workdir" , CallingConvention = CallingConvention . Cdecl ) ]
758
- private static extern git_result git_repository_set_workdir__ ( git_repository repo , [ MarshalAs ( UnmanagedType . LPUTF8Str ) ] string workdir , [ MarshalAs ( UnmanagedType . I4 ) ] bool update_gitlink ) ;
759
+ private static extern git_result git_repository_set_workdir__ ( git_repository repo , [ MarshalAs ( UnmanagedType . LPUTF8Str ) ] string workdir , [ MarshalAs ( UnmanagedType . Bool ) ] bool update_gitlink ) ;
759
760
760
761
/// <summary>
761
762
/// Check if a repository is bare
762
763
/// </summary>
763
764
/// <param name="repo">Repo to test</param>
764
765
/// <returns>1 if the repository is bare, 0 otherwise.</returns>
765
766
[ DllImport ( LibGit2Name , CallingConvention = CallingConvention . Cdecl ) ]
766
- public static extern int git_repository_is_bare ( git_repository repo ) ;
767
+ [ return : MarshalAs ( UnmanagedType . Bool ) ]
768
+ public static extern bool git_repository_is_bare ( git_repository repo ) ;
767
769
768
770
/// <summary>
769
771
/// Check if a repository is a linked work tree
770
772
/// </summary>
771
773
/// <param name="repo">Repo to test</param>
772
774
/// <returns>1 if the repository is a linked work tree, 0 otherwise.</returns>
773
775
[ DllImport ( LibGit2Name , CallingConvention = CallingConvention . Cdecl ) ]
774
- public static extern int git_repository_is_worktree ( git_repository repo ) ;
776
+ [ return : MarshalAs ( UnmanagedType . Bool ) ]
777
+ public static extern bool git_repository_is_worktree ( git_repository repo ) ;
775
778
776
779
/// <summary>
777
780
/// Get the configuration file for this repository.
@@ -936,8 +939,14 @@ public static git_result git_repository_state_cleanup(git_repository repo)
936
939
/// <remarks>
937
940
/// Return a non-zero value from the callback to stop the loop.
938
941
/// </remarks>
939
- [ DllImport ( LibGit2Name , CallingConvention = CallingConvention . Cdecl ) ]
940
- public static extern int git_repository_fetchhead_foreach ( git_repository repo , git_repository_fetchhead_foreach_cb callback , IntPtr payload ) ;
942
+ public static git_result git_repository_fetchhead_foreach ( git_repository repo , git_repository_fetchhead_foreach_cb callback , IntPtr payload )
943
+ {
944
+ var __result__ = git_repository_fetchhead_foreach__ ( repo , callback , payload ) . Check ( ) ;
945
+ return __result__ ;
946
+ }
947
+
948
+ [ DllImport ( LibGit2Name , EntryPoint = "git_repository_fetchhead_foreach" , CallingConvention = CallingConvention . Cdecl ) ]
949
+ private static extern git_result git_repository_fetchhead_foreach__ ( git_repository repo , git_repository_fetchhead_foreach_cb callback , IntPtr payload ) ;
941
950
942
951
/// <summary>
943
952
/// If a merge is in progress, invoke 'callback' for each commit ID in the
@@ -951,8 +960,14 @@ public static git_result git_repository_state_cleanup(git_repository repo)
951
960
/// <remarks>
952
961
/// Return a non-zero value from the callback to stop the loop.
953
962
/// </remarks>
954
- [ DllImport ( LibGit2Name , CallingConvention = CallingConvention . Cdecl ) ]
955
- public static extern int git_repository_mergehead_foreach ( git_repository repo , git_repository_mergehead_foreach_cb callback , IntPtr payload ) ;
963
+ public static git_result git_repository_mergehead_foreach ( git_repository repo , git_repository_mergehead_foreach_cb callback , IntPtr payload )
964
+ {
965
+ var __result__ = git_repository_mergehead_foreach__ ( repo , callback , payload ) . Check ( ) ;
966
+ return __result__ ;
967
+ }
968
+
969
+ [ DllImport ( LibGit2Name , EntryPoint = "git_repository_mergehead_foreach" , CallingConvention = CallingConvention . Cdecl ) ]
970
+ private static extern git_result git_repository_mergehead_foreach__ ( git_repository repo , git_repository_mergehead_foreach_cb callback , IntPtr payload ) ;
956
971
957
972
/// <summary>
958
973
/// Calculate hash of file using repository filtering rules.
@@ -1107,7 +1122,7 @@ public static git_result git_repository_set_namespace(git_repository repo, [Mars
1107
1122
/// <param name="repo">The repository</param>
1108
1123
/// <returns>1 if shallow, zero if not</returns>
1109
1124
[ DllImport ( LibGit2Name , CallingConvention = CallingConvention . Cdecl ) ]
1110
- [ return : MarshalAs ( UnmanagedType . I4 ) ]
1125
+ [ return : MarshalAs ( UnmanagedType . Bool ) ]
1111
1126
public static extern bool git_repository_is_shallow ( git_repository repo ) ;
1112
1127
1113
1128
/// <summary>
0 commit comments