Skip to content
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

Make owner validation configurable #2093

Merged
merged 3 commits into from
Nov 26, 2024

Conversation

ltrzesniewski
Copy link
Contributor

@ltrzesniewski ltrzesniewski commented May 7, 2024

This adds a GlobalSettings.OwnerValidation property which wraps git_libgit2_opts(GIT_OPT_[GET/SET]_OWNER_VALIDATION).

I needed to disable this (I'm using a safe environment), and I had to do this through reflection, but I suppose other people may have the same problem so exposing the feature in the library would be better. 🙂

Closes #2036

Edit: I'm an idiot, I forgot to check whether someone else submitted a PR for this, so this duplicates #2042, sorry 🤦
I'm leaving this open so you can choose the implementation, and this one also lets you retrieve the current option value.

@bording
Copy link
Member

bording commented Nov 26, 2024

@ltrzesniewski Thanks for the PR. Of the open PRs for this feature, yours was was the most complete (it even included a test!) so I decided to it to get this feature in.

I made a few tweaks, primarily moving away from a property and instead having separate get/set methods. Overall I think separate methods make more sense when there are separate libgit2 methods that need to be called.

@bording bording merged commit b8f974f into libgit2:master Nov 26, 2024
28 checks passed
@ltrzesniewski ltrzesniewski deleted the owner-validation branch November 26, 2024 12:24
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.

Expose the repository directory ownership validation option
2 participants