diff options
| author | Vicent Marti <tanoku@gmail.com> | 2011-02-28 12:12:26 +0200 |
|---|---|---|
| committer | Vicent Marti <tanoku@gmail.com> | 2011-03-03 20:23:52 +0200 |
| commit | 5de079b86dcf8744f71fa3d0bb496a2cf9b20c0d (patch) | |
| tree | 3bfac650e63c3d924d0e64638d1254fc4ee13f63 /src/refs.c | |
| parent | 3dccfed16382c64370dd0fd88668c9d9accae6ed (diff) | |
| download | libgit2-5de079b86dcf8744f71fa3d0bb496a2cf9b20c0d.tar.gz | |
Change the object creation/lookup API
The methods previously known as
git_repository_lookup
git_repository_newobject
git_repository_lookup_ref
are now part of their respective namespaces:
git_object_lookup
git_object_new
git_reference_lookup
This makes the API more consistent with the new references API.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
Diffstat (limited to 'src/refs.c')
| -rw-r--r-- | src/refs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/refs.c b/src/refs.c index 90123f1bb..f8da56154 100644 --- a/src/refs.c +++ b/src/refs.c @@ -818,7 +818,7 @@ cleanup: /** * Constructors */ -int git_repository_lookup_ref(git_reference **ref_out, git_repository *repo, const char *name) +int git_reference_lookup(git_reference **ref_out, git_repository *repo, const char *name) { int error; char normalized_name[GIT_PATH_MAX]; @@ -1118,7 +1118,7 @@ int git_reference_delete(git_reference *ref) /* When deleting a loose reference, we have to ensure that an older * packed version of it doesn't exist */ - if (!git_repository_lookup_ref(&reference, ref->owner, ref->name)) { + if (!git_reference_lookup(&reference, ref->owner, ref->name)) { assert((reference->type & GIT_REF_PACKED) != 0); error = git_reference_delete(reference); } @@ -1157,7 +1157,7 @@ int git_reference_rename(git_reference *ref, const char *new_name) return error; /* Ensure we're not going to overwrite an existing reference */ - error = git_repository_lookup_ref(&looked_up_ref, ref->owner, new_name); + error = git_reference_lookup(&looked_up_ref, ref->owner, new_name); if (error == GIT_SUCCESS) return GIT_EINVALIDREFNAME; @@ -1269,7 +1269,7 @@ int git_reference_resolve(git_reference **resolved_ref, git_reference *ref) } ref_sym = (reference_symbolic *)ref; - if ((error = git_repository_lookup_ref(&ref, repo, ref_sym->target)) < GIT_SUCCESS) + if ((error = git_reference_lookup(&ref, repo, ref_sym->target)) < GIT_SUCCESS) return error; } |
