/// <summary> /// Push specified reference to the <see cref="Remote"/>. /// </summary> /// <param name="remote">The <see cref="Remote"/> to push to.</param> /// <param name="pushRefSpec">The pushRefSpec to push.</param> /// <param name="pushOptions"><see cref="PushOptions"/> controlling push behavior</param> public virtual void Push( Remote remote, string pushRefSpec, PushOptions pushOptions) { Ensure.ArgumentNotNullOrEmptyString(pushRefSpec, "pushRefSpec"); Push(remote, new[] { pushRefSpec }, pushOptions); }
internal RemoteCallbacks(PushOptions pushOptions) { if (pushOptions == null) { return; } PushTransferProgress = pushOptions.OnPushTransferProgress; PackBuilderProgress = pushOptions.OnPackBuilderProgress; CredentialsProvider = pushOptions.CredentialsProvider; CertificateCheck = pushOptions.CertificateCheck; PushStatusError = pushOptions.OnPushStatusError; PrePushCallback = pushOptions.OnNegotiationCompletedBeforePush; }
/// <summary> /// Push the objectish to the destination reference on the <see cref="Remote"/>. /// </summary> /// <param name="remote">The <see cref="Remote"/> to push to.</param> /// <param name="objectish">The source objectish to push.</param> /// <param name="destinationSpec">The reference to update on the remote.</param> /// <param name="pushOptions"><see cref="PushOptions"/> controlling push behavior</param> public virtual void Push( Remote remote, string objectish, string destinationSpec, PushOptions pushOptions) { Ensure.ArgumentNotNull(objectish, "objectish"); Ensure.ArgumentNotNullOrEmptyString(destinationSpec, "destinationSpec"); Push(remote, string.Format(CultureInfo.InvariantCulture, "{0}:{1}", objectish, destinationSpec), pushOptions); }
/// <summary> /// Push the specified branch to its tracked branch on the remote. /// </summary> /// <param name="branch">The branch to push.</param> /// <param name="pushOptions"><see cref="PushOptions"/> controlling push behavior</param> /// <exception cref="GitException">Throws if either the Remote or the UpstreamBranchCanonicalName is not set.</exception> public virtual void Push( Branch branch, PushOptions pushOptions) { Push(new[] { branch }, pushOptions); }