Commit 3f8086e0 by Vicent Martí

Merge pull request #1729 from tiennou/remote-owner

Add `git_remote_owner`.
parents 35173312 85e1eded
...@@ -96,6 +96,14 @@ GIT_EXTERN(int) git_remote_load(git_remote **out, git_repository *repo, const ch ...@@ -96,6 +96,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); 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 * Get the remote's name
* *
* @param remote the remote * @param remote the remote
......
...@@ -467,6 +467,12 @@ const char *git_remote_name(const git_remote *remote) ...@@ -467,6 +467,12 @@ const char *git_remote_name(const git_remote *remote)
return remote->name; 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) const char *git_remote_url(const git_remote *remote)
{ {
assert(remote); assert(remote);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment