Skip to content

Make Binding public #940

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

Merged
merged 1 commit into from
Aug 15, 2025
Merged

Make Binding public #940

merged 1 commit into from
Aug 15, 2025

Conversation

edrevo
Copy link
Contributor

@edrevo edrevo commented Mar 23, 2023

Fixes #928

This allows users to use the libgit2-sys binding for things that might not have git2 support yet.

@titaniumtraveler
Copy link

@edrevo You might need to rebase and ping the bot to make this PR get reviewed/merged.

@edrevo
Copy link
Contributor Author

edrevo commented Aug 15, 2025

@rustbot ready

@rustbot rustbot added the S-waiting-on-review Status: Waiting on review label Aug 15, 2025
@weihanglo weihanglo self-requested a review August 15, 2025 19:20
#[doc(hidden)]
/// Provides access to the raw libgit2 pointer to be able to interact with libgit2-sys.
///
/// If you are going to depend on this trait on your code, do consider contributing to the git2
Copy link
Member

Choose a reason for hiding this comment

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

I love this being called out. Thank you.

Copy link
Member

Choose a reason for hiding this comment

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

How does exporting this trait sound? It would allow for an escape hatch to be able to interact with libgit2-sys.

I think the change is small and fine to merge. However, I'd like to understand what can't be done or hard to do before this patch. Would you mind showing some examples of before and after?

Choose a reason for hiding this comment

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

The reason I initially pinged @edrevo to update the PR and ping rustbot to get it merged was because of WorktreeAddOptions missing an API to set checkout_options.

I ended up solving it a different way and I was in fact holding it wrong, but giving the user the capability to access the underlying C-API seems generally useful.

Copy link
Member

Choose a reason for hiding this comment

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

I see. Thanks!

@weihanglo weihanglo added this pull request to the merge queue Aug 15, 2025
Merged via the queue into rust-lang:master with commit b238d16 Aug 15, 2025
7 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Waiting on review label Aug 15, 2025
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.

Making Binding public
4 participants