Skip to content

Expose enable/disable ofs delta and strict object creation settings #1505

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

jianges
Copy link
Contributor

@jianges jianges commented Nov 10, 2017

Expose the existing GIT_OPT_ENABLE_OFS_DELTA and GIT_OPT_ENABLE_STRICT_OBJECT_CREATION setting in libgit2.
See https://github.com/libgit2/libgit2/blob/master/src/settings.c#L225 and https://github.com/libgit2/libgit2/blob/master/src/settings.c#L193

Copy link
Member

@ethomson ethomson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree that we should expose this. It looks like there's a typo that's causing the build breaks. When you fix that could you squash into a single commit that doesn't reference internal pull request IDs?

Thanks!

public static void git_libgit2_opts_set_enable_ofsdelta(bool enabled)
{
// libgit2 expects non-zero value for true
var res = NativeMethods.git_libgit2_opts((int)LibGitOption.EnableOfsDelta, (uint)(enabled ? 1 : 0));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be LibGit2Option.

@jianges jianges force-pushed the ExposeOfsDeltaAndStrictCreationMode branch 2 times, most recently from 5585de2 to 5985c93 Compare November 13, 2017 14:01
@jianges jianges force-pushed the ExposeOfsDeltaAndStrictCreationMode branch from 5985c93 to e090ca0 Compare February 5, 2018 15:39
@ethomson ethomson merged commit 1a9c2ac into libgit2:master Feb 28, 2018
@ethomson
Copy link
Member

Thanks @jianges!

alex-weaver pushed a commit to alex-weaver/libgit2sharp that referenced this pull request Mar 23, 2023
…reationMode

Expose enable/disable ofs delta and strict object creation settings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants