Merge pull request #1729 from tiennou/remote-owner

Add `git_remote_owner`.
This commit is contained in:
Vicent Martí 2013-07-15 09:44:02 -07:00
commit 3f8086e069
2 changed files with 14 additions and 0 deletions

View File

@ -95,6 +95,14 @@ GIT_EXTERN(int) git_remote_load(git_remote **out, git_repository *repo, const ch
*/
GIT_EXTERN(int) git_remote_save(const git_remote *remote);
/**
* Get the remote's repository
*
* @param remote the remote
* @return a pointer to the repository
*/
GIT_EXTERN(git_repository *) git_remote_owner(const git_remote *remote);
/**
* Get the remote's name
*

View File

@ -467,6 +467,12 @@ const char *git_remote_name(const git_remote *remote)
return remote->name;
}
git_repository *git_remote_owner(const git_remote *remote)
{
assert(remote);
return remote->repo;
}
const char *git_remote_url(const git_remote *remote)
{
assert(remote);