Add git_remote_owner

This commit is contained in:
Etienne Samson 2013-07-15 16:31:25 +02:00
parent 351733128c
commit 85e1eded6a
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);