Skip to content

feat: Add unset argument to git_config_set() and git_config_global_set()#273

Open
iofarm wants to merge 3 commits intor-lib:mainfrom
iofarm:git-config-unset
Open

feat: Add unset argument to git_config_set() and git_config_global_set()#273
iofarm wants to merge 3 commits intor-lib:mainfrom
iofarm:git-config-unset

Conversation

@iofarm
Copy link
Copy Markdown

@iofarm iofarm commented Apr 21, 2026

Proposal to resolve #264 by adding an unset argument to git_config_set() and git_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. Because git_libgit2_feature_backend() was only added in libgit2 1.9, this is reported as "unknown" if the libgit2 version is older.

@iofarm iofarm marked this pull request as ready for review April 21, 2026 17:46
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.

FR: Interface to set multivalued config variables

1 participant