feat: Add unset argument to git_config_set() and git_config_global_set()#273
Open
iofarm wants to merge 3 commits intor-lib:mainfrom
Open
feat: Add unset argument to git_config_set() and git_config_global_set()#273iofarm wants to merge 3 commits intor-lib:mainfrom
unset argument to git_config_set() and git_config_global_set()#273iofarm wants to merge 3 commits intor-lib:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposal to resolve #264 by adding an
unsetargument togit_config_set()andgit_config_global_set(). This would allow removing specific values of multivalued config variables. In conjunction with #261 (merged), this allows full manipulation of multivalued config variables.Example usage is demonstrated in test-config.R ("multivar, local, custom config roundtrip"). A different interface for unsetting values might be more intuitive - I'm open to suggestions.
In addition: Because libgit2 uses regular expressions to match config values to delete, and it may be linked against different regex engines on different machines, this PR also patches
libgit2_config()to report the regex engine in$regex_backend. Becausegit_libgit2_feature_backend()was only added in libgit2 1.9, this is reported as"unknown"if the libgit2 version is older.