Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
f000ee4e
Commit
f000ee4e
authored
Jan 24, 2014
by
Carlos Martín Nieto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tree: remove legacy 'oid' naming
Rename git_tree_entry_byoid() to _byid() as per the convention.
parent
47e28349
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
include/git2/tree.h
+3
-3
src/tree.c
+3
-3
No files found.
include/git2/tree.h
View file @
f000ee4e
...
...
@@ -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.
*
* @param tree a previously loaded tree.
* @param
o
id the sha being looked for
* @param id the sha being looked for
* @return the tree entry; NULL if not found
*/
GIT_EXTERN
(
const
git_tree_entry
*
)
git_tree_entry_by
o
id
(
const
git_tree
*
tree
,
const
git_oid
*
o
id
);
GIT_EXTERN
(
const
git_tree_entry
*
)
git_tree_entry_byid
(
const
git_tree
*
tree
,
const
git_oid
*
id
);
/**
* Retrieve a tree entry contained in a tree or in any of its subtrees,
...
...
src/tree.c
View file @
f000ee4e
...
...
@@ -305,8 +305,8 @@ const git_tree_entry *git_tree_entry_byindex(
return
git_vector_get
(
&
tree
->
entries
,
idx
);
}
const
git_tree_entry
*
git_tree_entry_by
o
id
(
const
git_tree
*
tree
,
const
git_oid
*
o
id
)
const
git_tree_entry
*
git_tree_entry_byid
(
const
git_tree
*
tree
,
const
git_oid
*
id
)
{
size_t
i
;
const
git_tree_entry
*
e
;
...
...
@@ -314,7 +314,7 @@ const git_tree_entry *git_tree_entry_byoid(
assert
(
tree
);
git_vector_foreach
(
&
tree
->
entries
,
i
,
e
)
{
if
(
memcmp
(
&
e
->
oid
.
id
,
&
oid
->
id
,
sizeof
(
o
id
->
id
))
==
0
)
if
(
memcmp
(
&
e
->
oid
.
id
,
&
id
->
id
,
sizeof
(
id
->
id
))
==
0
)
return
e
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment