Commit f000ee4e by Carlos Martín Nieto

tree: remove legacy 'oid' naming

Rename git_tree_entry_byoid() to _byid() as per the convention.
parent 47e28349
...@@ -121,11 +121,11 @@ GIT_EXTERN(const git_tree_entry *) git_tree_entry_byindex( ...@@ -121,11 +121,11 @@ GIT_EXTERN(const git_tree_entry *) git_tree_entry_byindex(
* Warning: this must examine every entry in the tree, so it is not fast. * Warning: this must examine every entry in the tree, so it is not fast.
* *
* @param tree a previously loaded tree. * @param tree a previously loaded tree.
* @param oid the sha being looked for * @param id the sha being looked for
* @return the tree entry; NULL if not found * @return the tree entry; NULL if not found
*/ */
GIT_EXTERN(const git_tree_entry *) git_tree_entry_byoid( GIT_EXTERN(const git_tree_entry *) git_tree_entry_byid(
const git_tree *tree, const git_oid *oid); const git_tree *tree, const git_oid *id);
/** /**
* Retrieve a tree entry contained in a tree or in any of its subtrees, * Retrieve a tree entry contained in a tree or in any of its subtrees,
......
...@@ -305,8 +305,8 @@ const git_tree_entry *git_tree_entry_byindex( ...@@ -305,8 +305,8 @@ const git_tree_entry *git_tree_entry_byindex(
return git_vector_get(&tree->entries, idx); return git_vector_get(&tree->entries, idx);
} }
const git_tree_entry *git_tree_entry_byoid( const git_tree_entry *git_tree_entry_byid(
const git_tree *tree, const git_oid *oid) const git_tree *tree, const git_oid *id)
{ {
size_t i; size_t i;
const git_tree_entry *e; const git_tree_entry *e;
...@@ -314,7 +314,7 @@ const git_tree_entry *git_tree_entry_byoid( ...@@ -314,7 +314,7 @@ const git_tree_entry *git_tree_entry_byoid(
assert(tree); assert(tree);
git_vector_foreach(&tree->entries, i, e) { git_vector_foreach(&tree->entries, i, e) {
if (memcmp(&e->oid.id, &oid->id, sizeof(oid->id)) == 0) if (memcmp(&e->oid.id, &id->id, sizeof(id->id)) == 0)
return e; return e;
} }
......
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