summaryrefslogtreecommitdiff
path: root/src/git2/tree.h
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2011-02-07 18:25:42 +0200
committerVicent Marti <tanoku@gmail.com>2011-02-07 18:25:42 +0200
commit122c3405830d116f23bf92b879263220be585871 (patch)
tree2955067bf9465bb685b03a8115e660c71b17e723 /src/git2/tree.h
parent8212e2d7d0fec7e53efddc7e23fc65798afa12a3 (diff)
downloadlibgit2-122c3405830d116f23bf92b879263220be585871.tar.gz
Git trees are now always lazily sorted
Removed `git_tree_add_entry_unsorted`. Now the `git_tree_add_entry` method doesn't sort the entries array by default; entries are only sorted lazily when required. This is done automatically by the library (the `git_tree_sort_entries` call has been removed). This should improve performance. No point on sorting entries all the time, anyway. Signed-off-by: Vicent Marti <tanoku@gmail.com>
Diffstat (limited to 'src/git2/tree.h')
-rw-r--r--src/git2/tree.h30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/git2/tree.h b/src/git2/tree.h
index 6f79ac455..20c367574 100644
--- a/src/git2/tree.h
+++ b/src/git2/tree.h
@@ -149,36 +149,6 @@ GIT_EXTERN(int) git_tree_entry_2object(git_object **object, git_tree_entry *entr
GIT_EXTERN(int) git_tree_add_entry(git_tree_entry **entry_out, git_tree *tree, const git_oid *id, const char *filename, int attributes);
/**
- * Add a new entry to a tree, returning that new entry.
- * The only difference with this call is that it does not sort
- * tree afterwards, this requirement is left to the caller.
- *
- * This will mark the tree as modified; the new entry will
- * be written back to disk on the next git_object_write()
- *
- * @param entry Entry object which will be created
- * @param tree Tree object to store the entry
- * @iparam id OID for the tree entry
- * @param filename Filename for the tree entry
- * @param attributes UNIX file attributes for the entry
- * @return 0 on success; otherwise error code
- */
-GIT_EXTERN(int) git_tree_add_entry_unsorted(git_tree_entry **entry, git_tree *tree, const git_oid *id, const char *filename, int attributes);
-
-/**
- * Sort the entries in a tree created using git_tree_add_entry2.
- *
- * This does not mark the tree as modified. It is intended to be used
- * after several invocations of git_tree_add_entry2.
- * git_tree_add_entry, on the other hand, sorts after each entry is
- * added.
- *
- * @param tree Tree object whose entries are to be sorted
- * @return 0 on success; otherwise error code
- */
-GIT_EXTERN(int) git_tree_sort_entries(git_tree *tree);
-
-/**
* Remove an entry by its index.
*
* Index must be >= 0 and < than git_tree_entrycount().