C# 클래스 GitHub.Services.GitService

상속: IGitService
파일 보기 프로젝트 열기: github/VisualStudio 1 사용 예제들

공개 메소드들

메소드 설명
GetLatestPushedSha ( string path ) : Task

Finds the latest pushed commit of a file and returns the sha of that commit. Returns null when no commits have been found in any remote branches or the current local branch.

GetRemoteUri ( IRepository repo, string remote = "origin" ) : UriString

Returns a UriString representing the uri of a remote

GetRepository ( string path ) : IRepository

Probes for a git repository and if one is found, returns a IRepositoryModel instance for the repository.

The lookup checks to see if the specified path is a repository. If it's not, it then walks up the parent directories until it either finds a repository, or reaches the root disk.

GetUri ( IRepository repository, string remote = "origin" ) : UriString

Returns the URL of the remote for the specified repository. If the repository is null or no remote named origin exists, this method returns null

GetUri ( string path, string remote = "origin" ) : UriString

Probes for a git repository and if one is found, returns a normalized GitHub uri UriString for the repository's remote if one is found

The lookup checks to see if the specified path is a repository. If it's not, it then walks up the parent directories until it either finds a repository, or reaches the root disk.

메소드 상세

GetLatestPushedSha() 공개 메소드

Finds the latest pushed commit of a file and returns the sha of that commit. Returns null when no commits have been found in any remote branches or the current local branch.
public GetLatestPushedSha ( string path ) : Task
path string The local path of a repository or a file inside a repository. This cannot be null.
리턴 Task

GetRemoteUri() 공개 메소드

Returns a UriString representing the uri of a remote
public GetRemoteUri ( IRepository repo, string remote = "origin" ) : UriString
repo IRepository
remote string The name of the remote to look for
리턴 UriString

GetRepository() 공개 메소드

Probes for a git repository and if one is found, returns a IRepositoryModel instance for the repository.
The lookup checks to see if the specified path is a repository. If it's not, it then walks up the parent directories until it either finds a repository, or reaches the root disk.
public GetRepository ( string path ) : IRepository
path string The path to start probing
리턴 IRepository

GetUri() 공개 메소드

Returns the URL of the remote for the specified repository. If the repository is null or no remote named origin exists, this method returns null
public GetUri ( IRepository repository, string remote = "origin" ) : UriString
repository IRepository The repository to look at for the remote.
remote string The name of the remote to look for
리턴 UriString

GetUri() 공개 메소드

Probes for a git repository and if one is found, returns a normalized GitHub uri UriString for the repository's remote if one is found
The lookup checks to see if the specified path is a repository. If it's not, it then walks up the parent directories until it either finds a repository, or reaches the root disk.
public GetUri ( string path, string remote = "origin" ) : UriString
path string The path to start probing
remote string The name of the remote to look for
리턴 UriString