Skip to content

Allow creating git config from strings (v2)#1249

Open
DanielEScherzer wants to merge 2 commits into
rust-lang:mainfrom
DanielEScherzer:config-from-str-2
Open

Allow creating git config from strings (v2)#1249
DanielEScherzer wants to merge 2 commits into
rust-lang:mainfrom
DanielEScherzer:config-from-str-2

Conversation

@DanielEScherzer
Copy link
Copy Markdown
Contributor

@rustbot label +enhancement, "new bindings"

This reverts commit 58d206c.

Now that the libgit2 version has been updated (rust-lang#1242) the upstream fix
(libgit2/libgit2#7232) is incorporated and this should work again. A follow-up
commit will expand the tests, including the case from rust-lang#1226 that failed after
the first attempt.
Includes the test case from rust-lang#1226 that previously failed, as well as other
cases confirming that strings, booleans, and integers can be read from the
config individually.
@rustbot rustbot added S-waiting-on-review Status: Waiting on review enhancement new bindings Missing bindings for existing libgit2 functions. labels May 12, 2026
@DanielEScherzer
Copy link
Copy Markdown
Contributor Author

Cross link #1225, #1226, #1227

@ehuss
Copy link
Copy Markdown
Contributor

ehuss commented May 13, 2026

Sorry if I wasn't clear in the last PR, but I would prefer to not expose private APIs.

@DanielEScherzer
Copy link
Copy Markdown
Contributor Author

Sorry if I wasn't clear in the last PR, but I would prefer to not expose private APIs.

I don't think this is a private API, since it is publicly documented in the reference, and it addresses a real use case https://github.com/rust-lang/thanks/blob/3600ac7559d242dda9f9c952f70450f3f91281e3/src/config.rs

If the issue is that it is listed under the "System Groups (Advanced)" part on https://libgit2.org/docs/reference/main/index.html, we already have bindings for functions from that section

and probably more, I stopped looking after that

Do you want me to try and get some kind of upstream confirmation that this isn't a private API?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement new bindings Missing bindings for existing libgit2 functions. S-waiting-on-review Status: Waiting on review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants