diff options
author | Ben Straub <bs@github.com> | 2012-11-26 19:47:47 -0800 |
---|---|---|
committer | Ben Straub <bs@github.com> | 2012-11-27 13:18:29 -0800 |
commit | 4ff192d3f224c780c741e62146c3350e54cba759 (patch) | |
tree | 2bd321725806845dc45d6c00ef5c96f0c6715cc6 /src/revwalk.h | |
parent | 839c5f574f40726f6fbdb82c947635bd14bdc9aa (diff) | |
download | libgit2-4ff192d3f224c780c741e62146c3350e54cba759.tar.gz |
Move merge functions to merge.c
In so doing, promote commit_list to git_commit_list,
with its own internal API header.
Diffstat (limited to 'src/revwalk.h')
-rw-r--r-- | src/revwalk.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/revwalk.h b/src/revwalk.h new file mode 100644 index 000000000..2d482cfcc --- /dev/null +++ b/src/revwalk.h @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2009-2012 the libgit2 contributors + * + * This file is part of libgit2, distributed under the GNU GPL v2 with + * a Linking Exception. For full terms see the included COPYING file. + */ +#ifndef INCLUDE_revwalk_h__ +#define INCLUDE_revwalk_h__ + +#include "git2/revwalk.h" +#include "oidmap.h" +#include "commit_list.h" +#include "pqueue.h" +#include "pool.h" +#include "vector.h" + +GIT__USE_OIDMAP; + +struct git_revwalk { + git_repository *repo; + git_odb *odb; + + git_oidmap *commits; + git_pool commit_pool; + + git_commit_list *iterator_topo; + git_commit_list *iterator_rand; + git_commit_list *iterator_reverse; + git_pqueue iterator_time; + + int (*get_next)(git_commit_list_node **, git_revwalk *); + int (*enqueue)(git_revwalk *, git_commit_list_node *); + + unsigned walking:1; + unsigned int sorting; + + /* merge base calculation */ + git_commit_list_node *one; + git_vector twos; +}; + +git_commit_list_node *commit_lookup(git_revwalk *walk, const git_oid *oid); + +#endif |