mirror of
https://git.proxmox.com/git/libgit2
synced 2025-06-21 06:47:22 +00:00
tree: remove legacy 'oid' naming
Rename git_tree_entry_byoid() to _byid() as per the convention.
This commit is contained in:
parent
47e28349bc
commit
f000ee4e5b
@ -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(
|
|||||||
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(
|
|||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user