diff options
| author | Vicent Marti <tanoku@gmail.com> | 2010-05-23 17:12:28 +0200 |
|---|---|---|
| committer | Andreas Ericsson <ae@op5.se> | 2010-06-02 10:32:07 +0200 |
| commit | 9bdb75947178f72df30314d66bc9bcc90df643d7 (patch) | |
| tree | 0c51be2c8e9c40f947c9527b1c633c78c3d56e0b /src/revwalk.c | |
| parent | 655d381a1948783d7d26ff9ec5ef54ed6bbefb29 (diff) | |
| download | libgit2-9bdb75947178f72df30314d66bc9bcc90df643d7.tar.gz | |
Properly reset all commit properties when doing a gitrp_reset().
Add git_revpool_table_free() method.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
Signed-off-by: Andreas Ericsson <ae@op5.se>
Diffstat (limited to 'src/revwalk.c')
| -rw-r--r-- | src/revwalk.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/revwalk.c b/src/revwalk.c index 4575d8b63..60ea5e87d 100644 --- a/src/revwalk.c +++ b/src/revwalk.c @@ -144,6 +144,18 @@ git_commit *gitrp_next(git_revpool *pool) void gitrp_reset(git_revpool *pool) { + git_commit *commit; + git_revpool_tableit it; + + git_revpool_tableit_init(pool->commits, &it); + + while ((commit = (git_commit *)git_revpool_tableit_next(&it)) != NULL) + { + commit->seen = 0; + commit->topo_delay = 0; + commit->in_degree = 0; + } + git_commit_list_clear(&pool->iterator, 0); pool->walking = 0; } |
