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

Add support for adding and clearing multi-valued configuration #1720

Merged
merged 3 commits into from Oct 9, 2019

Conversation

kzu
Copy link
Contributor

@kzu kzu commented Sep 27, 2019

Implement value adding by exposing the underlying set_multivar,
which supports only string values in the underlying libgit2, so no
other typed overloads are provided at this point.

The counterpart for deleting keys exposes the underlying delete_multivar.
No regex-based overload is exposed for consistency with the existing Set<T>
overloads which don't expose it either.

Also exposed the boolean return value from the Unset calls which
is already present in the Proxy API.

Fixes #1719.

@kzu
Copy link
Contributor Author

kzu commented Sep 27, 2019

All green! 👍

image

@kzu
Copy link
Contributor Author

kzu commented Sep 27, 2019

heya @bording this PR also gets travis back to green ;)

Implement value adding by exposing the underlying `set_multivar`,
which supports only string values in the underlying libgit2, so no
other typed overloads are provided at this point.

The counterpart for deleting keys exposes the underlying `delete_multivar`.
No regex-based overload is exposed for consistency with the existing `Set<T>`
overloads which don't expose it either.

Also exposed the boolean return value from the `Unset` calls which
is already present in the Proxy API.

Fixes libgit2#1719.

Fix
This should fix travis failures in CI
Copy link
Member

@bording bording left a comment

Choose a reason for hiding this comment

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

One minor tweak needed, otherwise LGTM

LibGit2Sharp/Configuration.cs Outdated Show resolved Hide resolved
Co-Authored-By: Brandon Ording <bording@gmail.com>
@bording bording merged commit 0e8a3ca into libgit2:master Oct 9, 2019
@bording
Copy link
Member

bording commented Oct 9, 2019

This change is available in 0.27.0-preview-0024 on nuget.org.

@kzu kzu deleted the multivar branch October 10, 2019 20:17
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.

Add API for unsetting multivar entry
2 participants