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
d698929c
Commit
d698929c
authored
Dec 08, 2015
by
Edward Thomson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3537 from libgit2/cmn/tree-is-sorted
tree: mark a tree as already sorted
parents
a3dc4190
fc436469
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletions
+6
-1
CHANGELOG.md
+4
-0
src/tree.c
+2
-1
No files found.
CHANGELOG.md
View file @
d698929c
...
...
@@ -13,6 +13,10 @@ v0.23 + 1
*
You can now set your own user-agent to be sent for HTTP requests by
using the
`GIT_OPT_SET_USER_AGENT`
with
`git_libgit2_opts()`
.
*
Tree objects are now assumed to be sorted. If a tree is not
correctly formed, it will give bad results. This is the git approach
and cuts a significant amount of time when reading the trees.
### API additions
*
`git_config_lock()`
has been added, which allow for
...
...
src/tree.c
View file @
d698929c
...
...
@@ -476,7 +476,8 @@ int git_tree__parse(void *_tree, git_odb_object *odb_obj)
buffer
+=
GIT_OID_RAWSZ
;
}
git_vector_sort
(
&
tree
->
entries
);
/* The tree is sorted by definition. Bad inputs give bad outputs */
tree
->
entries
.
flags
|=
GIT_VECTOR_SORTED
;
return
0
;
}
...
...
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