Hash :
c4034e63
Author :
Date :
2010-12-02T04:31:54
Refactor all 'vector' functions into common code All the operations on the 'git_index_entry' array and the 'git_tree_entry' array have been refactored into common code in the src/vector.c file. The new vector methods support: - insertion: O(1) (avg) - deletion: O(n) - searching: O(logn) - sorting: O(logn) - r. access: O(1) Signed-off-by: Vicent Marti <tanoku@gmail.com>
#ifndef INCLUDE_tree_h__
#define INCLUDE_tree_h__
#include <git/tree.h>
#include "repository.h"
#include "vector.h"
struct git_tree_entry {
unsigned int attr;
char *filename;
git_oid oid;
git_tree *owner;
};
struct git_tree {
git_object object;
git_vector entries;
};
void git_tree__free(git_tree *tree);
int git_tree__parse(git_tree *tree);
int git_tree__writeback(git_tree *tree, git_odb_source *src);
#endif