Add support for server push options parameters by pablonardone · Pull Request #2148 · libgit2/libgit2sharp · GitHub
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions LibGit2Sharp/Core/GitPushOptionsWrapper.cs
6 changes: 6 additions & 0 deletions LibGit2Sharp/Network.cs
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,12 @@ public virtual void Push(Remote remote, IEnumerable<string> pushRefSpecs, PushOp
gitPushOptions.CustomHeaders = GitStrArrayManaged.BuildFrom(pushOptions.CustomHeaders);
}

// If there are remot-push-options, create a managed string array.
if (pushOptions.RemotePushOptions != null && pushOptions.RemotePushOptions.Length > 0)
{
gitPushOptions.remote_push_options = GitStrArrayManaged.BuildFrom(pushOptions.RemotePushOptions);
}

Proxy.git_remote_push(remoteHandle,
pushRefSpecs,
gitPushOptions);
Expand Down
6 changes: 6 additions & 0 deletions LibGit2Sharp/PushOptions.cs