You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to determine how to use git_push_options with a remote push. I'm unable to find any documentation, tests or working examples.
My goal is to implement something similar to git using the following: git push --push-option somevar=someval
What I have gleaned from the remote.py context manager is that I probably need to pass libgit2 custom_headers parameter. But, I'm not sure if I'm missing something or just off base.
class CustomRemoteCallbacks(RemoteCallbacks):
"""Provide callback with push options."""
def __init__(
self,
credentials: Optional[Credentials] = None,
certificate: Optional[Certificate] = None,
**kwargs: Any,
) -> None:
"""Initialize remote callback with custom headers."""
super().__init__(credentials=credentials, certificate=certificate)
self.custom_headers = [f"{k}={v}" for k, v in kwargs.items()]
The text was updated successfully, but these errors were encountered:
kuwv
changed the title
Push options support within pytgit2
Push options support within pygit2
Feb 10, 2022
I am trying to determine how to use git_push_options with a remote push. I'm unable to find any documentation, tests or working examples.
My goal is to implement something similar to git using the following:
git push --push-option somevar=someval
What I have gleaned from the
remote.py
context manager is that I probably need to pass libgit2custom_headers
parameter. But, I'm not sure if I'm missing something or just off base.The text was updated successfully, but these errors were encountered: