diff options
| author | Vicent Marti <tanoku@gmail.com> | 2010-10-29 02:22:38 +0300 |
|---|---|---|
| committer | Vicent Marti <tanoku@gmail.com> | 2010-10-29 02:22:38 +0300 |
| commit | a13bc8e74f31d9d326153cb375521c47851eb1eb (patch) | |
| tree | a0a8c00ca870d11aa8c22d6b241834926c6e5205 /src/repository.c | |
| parent | aaf68dc443bf60f1703b4b9fabd75d7a901f663f (diff) | |
| download | libgit2-a13bc8e74f31d9d326153cb375521c47851eb1eb.tar.gz | |
Add getter methods for object owners
You can know access the owning repository of any existing object, or the
repository on which a revision walker is working on.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
Diffstat (limited to 'src/repository.c')
| -rw-r--r-- | src/repository.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/repository.c b/src/repository.c index 202fa04ab..fe7b870fe 100644 --- a/src/repository.c +++ b/src/repository.c @@ -333,6 +333,12 @@ git_otype git_object_type(git_object *obj) return obj->source.raw.type; } +git_repository *git_object_owner(git_object *obj) +{ + assert(obj); + return obj->repo; +} + git_object *git_object_new(git_repository *repo, git_otype type) { git_object *object = NULL; |
