File tree Expand file tree Collapse file tree 2 files changed +41
-1
lines changed Expand file tree Collapse file tree 2 files changed +41
-1
lines changed Original file line number Diff line number Diff line change @@ -3429,7 +3429,29 @@ public static void git_libgit2_opts_set_enable_caching(bool enabled)
34293429 Ensure . ZeroResult ( res ) ;
34303430 }
34313431
3432- #endregion
3432+ /// <summary>
3433+ /// Enable or disable the ofs_delta capabilty
3434+ /// </summary>
3435+ /// <param name="enabled">true to enable the ofs_delta capabilty, false otherwise</param>
3436+ public static void git_libgit2_opts_set_enable_ofsdelta ( bool enabled )
3437+ {
3438+ // libgit2 expects non-zero value for true
3439+ var res = NativeMethods . git_libgit2_opts ( ( int ) LibGit2Option . EnableOfsDelta , enabled ? 1 : 0 ) ;
3440+ Ensure . ZeroResult ( res ) ;
3441+ }
3442+
3443+ /// <summary>
3444+ /// Enable or disable the strict_object_creation capabilty
3445+ /// </summary>
3446+ /// <param name="enabled">true to enable the strict_object_creation capabilty, false otherwise</param>
3447+ public static void git_libgit2_opts_set_enable_strictobjectcreation ( bool enabled )
3448+ {
3449+ // libgit2 expects non-zero value for true
3450+ var res = NativeMethods . git_libgit2_opts ( ( int ) LibGit2Option . EnableStrictObjectCreation , enabled ? 1 : 0 ) ;
3451+ Ensure . ZeroResult ( res ) ;
3452+ }
3453+
3454+ #endregion
34333455
34343456 private static ICollection < TResult > git_foreach < T , TResult > (
34353457 Func < T , TResult > resultSelector ,
Original file line number Diff line number Diff line change @@ -338,5 +338,23 @@ public static void SetEnableCaching(bool enabled)
338338 {
339339 Proxy . git_libgit2_opts_set_enable_caching ( enabled ) ;
340340 }
341+
342+ /// <summary>
343+ /// Enable or disable the ofs_delta capability
344+ /// </summary>
345+ /// <param name="enabled">true to enable the ofs_delta capability, false otherwise</param>
346+ public static void SetEnableOfsDelta ( bool enabled )
347+ {
348+ Proxy . git_libgit2_opts_set_enable_ofsdelta ( enabled ) ;
349+ }
350+
351+ /// <summary>
352+ /// Enable or disable the libgit2 strict_object_creation capability
353+ /// </summary>
354+ /// <param name="enabled">true to enable the strict_object_creation capability, false otherwise</param>
355+ public static void SetEnableStrictObjectCreation ( bool enabled )
356+ {
357+ Proxy . git_libgit2_opts_set_enable_strictobjectcreation ( enabled ) ;
358+ }
341359 }
342360}
You can’t perform that action at this time.
0 commit comments