C# Class LibGit2Sharp.Network

Provides access to network functionality for a repository.
Show file Open project: nulltoken/libgit2sharp

Private Properties

Property Type Description
DoFetch void
Network System

Public Methods

Method Description
Fetch ( Remote remote, FetchOptions options = null, Signature signature = null, string logMessage = null ) : void

Fetch from the Remote.

Fetch ( Remote remote, IEnumerable refspecs, FetchOptions options = null, Signature signature = null, string logMessage = null ) : void

Fetch from the Remote, using custom refspecs.

Fetch ( string url, IEnumerable refspecs, FetchOptions options = null, Signature signature = null, string logMessage = null ) : void

Fetch from a url with a set of fetch refspecs

ListReferences ( Remote remote, CredentialsHandler credentialsProvider = null ) : IEnumerable

List references in a Remote repository.

When the remote tips are ahead of the local ones, the retrieved DirectReferences may point to non existing GitObjects in the local repository. In that case, DirectReference.Target will return null.

ListReferences ( string url ) : IEnumerable

List references in a remote repository.

When the remote tips are ahead of the local ones, the retrieved DirectReferences may point to non existing GitObjects in the local repository. In that case, DirectReference.Target will return null.

Pull ( Signature merger, LibGit2Sharp.PullOptions options ) : LibGit2Sharp.MergeResult

Pull changes from the configured upstream remote and branch into the branch pointed at by HEAD.

Push ( Remote remote, IEnumerable pushRefSpecs, LibGit2Sharp.PushOptions pushOptions = null, Signature signature = null, string logMessage = null ) : void

Push specified references to the Remote.

Push ( Remote remote, string pushRefSpec, LibGit2Sharp.PushOptions pushOptions = null, Signature signature = null, string logMessage = null ) : void

Push specified reference to the Remote.

Push ( Remote remote, string objectish, string destinationSpec, LibGit2Sharp.PushOptions pushOptions = null, Signature signature = null, string logMessage = null ) : void

Push the objectish to the destination reference on the Remote.

Protected Methods

Method Description
Network ( ) : System

Needed for mocking purposes.

Private Methods

Method Description
DoFetch ( RemoteSafeHandle remoteHandle, FetchOptions options, Signature signature, string logMessage ) : void
Network ( Repository repository ) : System

Method Details

Fetch() public method

Fetch from the Remote.
public Fetch ( Remote remote, FetchOptions options = null, Signature signature = null, string logMessage = null ) : void
remote Remote The remote to fetch
options FetchOptions controlling fetch behavior
signature Signature Identity for use when updating the reflog.
logMessage string Message to use when updating the reflog.
return void

Fetch() public method

Fetch from the Remote, using custom refspecs.
public Fetch ( Remote remote, IEnumerable refspecs, FetchOptions options = null, Signature signature = null, string logMessage = null ) : void
remote Remote The remote to fetch
refspecs IEnumerable Refspecs to use, replacing the remote's fetch refspecs
options FetchOptions controlling fetch behavior
signature Signature Identity for use when updating the reflog.
logMessage string Message to use when updating the reflog.
return void

Fetch() public method

Fetch from a url with a set of fetch refspecs
public Fetch ( string url, IEnumerable refspecs, FetchOptions options = null, Signature signature = null, string logMessage = null ) : void
url string The url to fetch from
refspecs IEnumerable The list of resfpecs to use
options FetchOptions controlling fetch behavior
signature Signature Identity for use when updating the reflog.
logMessage string Message to use when updating the reflog.
return void

ListReferences() public method

List references in a Remote repository.

When the remote tips are ahead of the local ones, the retrieved DirectReferences may point to non existing GitObjects in the local repository. In that case, DirectReference.Target will return null.

public ListReferences ( Remote remote, CredentialsHandler credentialsProvider = null ) : IEnumerable
remote Remote The to list from.
credentialsProvider CredentialsHandler The optional used to connect to remote repository.
return IEnumerable

ListReferences() public method

List references in a remote repository.

When the remote tips are ahead of the local ones, the retrieved DirectReferences may point to non existing GitObjects in the local repository. In that case, DirectReference.Target will return null.

public ListReferences ( string url ) : IEnumerable
url string The url to list from.
return IEnumerable

Network() protected method

Needed for mocking purposes.
protected Network ( ) : System
return System

Pull() public method

Pull changes from the configured upstream remote and branch into the branch pointed at by HEAD.
public Pull ( Signature merger, LibGit2Sharp.PullOptions options ) : LibGit2Sharp.MergeResult
merger Signature If the merge is a non-fast forward merge that generates a merge commit, the of who made the merge.
options LibGit2Sharp.PullOptions Specifies optional parameters controlling merge behavior of pull; if null, the defaults are used.
return LibGit2Sharp.MergeResult

Push() public method

Push specified references to the Remote.
public Push ( Remote remote, IEnumerable pushRefSpecs, LibGit2Sharp.PushOptions pushOptions = null, Signature signature = null, string logMessage = null ) : void
remote Remote The to push to.
pushRefSpecs IEnumerable The pushRefSpecs to push.
pushOptions LibGit2Sharp.PushOptions controlling push behavior
signature Signature Identity for use when updating the reflog.
logMessage string Message to use when updating the reflog.
return void

Push() public method

Push specified reference to the Remote.
public Push ( Remote remote, string pushRefSpec, LibGit2Sharp.PushOptions pushOptions = null, Signature signature = null, string logMessage = null ) : void
remote Remote The to push to.
pushRefSpec string The pushRefSpec to push.
pushOptions LibGit2Sharp.PushOptions controlling push behavior
signature Signature Identity for use when updating the reflog.
logMessage string Message to use when updating the reflog.
return void

Push() public method

Push the objectish to the destination reference on the Remote.
public Push ( Remote remote, string objectish, string destinationSpec, LibGit2Sharp.PushOptions pushOptions = null, Signature signature = null, string logMessage = null ) : void
remote Remote The to push to.
objectish string The source objectish to push.
destinationSpec string The reference to update on the remote.
pushOptions LibGit2Sharp.PushOptions controlling push behavior
signature Signature Identity for use when updating the reflog.
logMessage string Message to use when updating the reflog.
return void